diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index bf1f9bfb704..1a9234d9d19 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -109,7 +109,9 @@ Positive floating-point infinity. This is the result of floating-point division **NAN** = ``nan`` :ref:`πŸ”—` -"Not a Number", an invalid floating-point value. :ref:`NAN` has special properties, including that ``!=`` always returns ``true``, while other comparison operators always return ``false``. This is true even when comparing with itself (``NAN == NAN`` returns ``false`` and ``NAN != NAN`` returns ``true``). It is returned by some invalid operations, such as dividing floating-point ``0.0`` by ``0.0``. +"Not a Number", an invalid floating-point value. It is returned by some invalid operations, such as dividing floating-point ``0.0`` by ``0.0``. + +\ :ref:`NAN` has special properties, including that ``!=`` always returns ``true``, while other comparison operators always return ``false``. This is true even when comparing with itself (``NAN == NAN`` returns ``false`` and ``NAN != NAN`` returns ``true``). Due to this, you must use :ref:`@GlobalScope.is_nan()` to check whether a number is equal to :ref:`NAN`. \ **Warning:** "Not a Number" is only a concept with floating-point numbers, and has no equivalent for integers. Dividing an integer ``0`` by ``0`` will not result in :ref:`NAN` and will result in a run-time error instead. @@ -673,7 +675,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_RANGE` -Export a property with :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` flag. The property is not displayed in the editor, but it is serialized and stored in the scene or resource file. This can be useful for :ref:`@tool` scripts. Also the property value is copied when :ref:`Resource.duplicate` or :ref:`Node.duplicate` is called, unlike non-exported variables. +Export a property with :ref:`@GlobalScope.PROPERTY_USAGE_STORAGE` flag. The property is not displayed in the editor, but it is serialized and stored in the scene or resource file. This can be useful for :ref:`@tool` scripts. Also the property value is copied when :ref:`Resource.duplicate()` or :ref:`Node.duplicate()` is called, unlike non-exported variables. :: @@ -732,7 +734,7 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP` property as a clickable button with the label ``text``. When the button is pressed, the callable is called. -If ``icon`` is specified, it is used to fetch an icon for the button via :ref:`Control.get_theme_icon`, from the ``"EditorIcons"`` theme type. If ``icon`` is omitted, the default ``"Callable"`` icon is used instead. +If ``icon`` is specified, it is used to fetch an icon for the button via :ref:`Control.get_theme_icon()`, from the ``"EditorIcons"`` theme type. If ``icon`` is omitted, the default ``"Callable"`` icon is used instead. Consider using the :ref:`EditorUndoRedoManager` to allow the action to be reverted safely. @@ -759,13 +761,13 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_TOOL_BUTTON` flag because a :ref:`Callable` cannot be properly serialized and stored in a file. -\ **Note:** In an exported project neither :ref:`EditorInterface` nor :ref:`EditorUndoRedoManager` exist, which may cause some scripts to break. To prevent this, you can use :ref:`Engine.get_singleton` and omit the static type from the variable declaration: +\ **Note:** In an exported project neither :ref:`EditorInterface` nor :ref:`EditorUndoRedoManager` exist, which may cause some scripts to break. To prevent this, you can use :ref:`Engine.get_singleton()` and omit the static type from the variable declaration: :: var undo_redo = Engine.get_singleton(&"EditorInterface").get_editor_undo_redo() -\ **Note:** Avoid storing lambda callables in member variables of :ref:`RefCounted`-based classes (e.g. resources), as this can lead to memory leaks. Use only method callables and optionally :ref:`Callable.bind` or :ref:`Callable.unbind`. +\ **Note:** Avoid storing lambda callables in member variables of :ref:`RefCounted`-based classes (e.g. resources), as this can lead to memory leaks. Use only method callables and optionally :ref:`Callable.bind()` or :ref:`Callable.unbind()`. .. rst-class:: classref-item-separator @@ -799,7 +801,7 @@ Add a custom icon to the current script. The icon specified at ``icon_path`` is **@onready**\ (\ ) :ref:`πŸ”—` -Mark the following property as assigned when the :ref:`Node` is ready. Values for these properties are not assigned immediately when the node is initialized (:ref:`Object._init`), and instead are computed and stored right before :ref:`Node._ready`. +Mark the following property as assigned when the :ref:`Node` is ready. Values for these properties are not assigned immediately when the node is initialized (:ref:`Object._init()`), and instead are computed and stored right before :ref:`Node._ready()`. :: @@ -817,9 +819,9 @@ Mark the following property as assigned when the :ref:`Node` is read Mark the following method for remote procedure calls. See :doc:`High-level multiplayer <../tutorials/networking/high_level_multiplayer>`. -If ``mode`` is set as ``"any_peer"``, allows any peer to call this RPC function. Otherwise, only the authority peer is allowed to call it and ``mode`` should be kept as ``"authority"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, each of these modes respectively corresponds to the :ref:`MultiplayerAPI.RPC_MODE_AUTHORITY` and :ref:`MultiplayerAPI.RPC_MODE_ANY_PEER` RPC modes. See :ref:`RPCMode`. If a peer that is not the authority tries to call a function that is only allowed for the authority, the function will not be executed. If the error can be detected locally (when the RPC configuration is consistent between the local and the remote peer), an error message will be displayed on the sender peer. Otherwise, the remote peer will detect the error and print an error there. +If ``mode`` is set as ``"any_peer"``, allows any peer to call this RPC function. Otherwise, only the authority peer is allowed to call it and ``mode`` should be kept as ``"authority"``. When configuring functions as RPCs with :ref:`Node.rpc_config()`, each of these modes respectively corresponds to the :ref:`MultiplayerAPI.RPC_MODE_AUTHORITY` and :ref:`MultiplayerAPI.RPC_MODE_ANY_PEER` RPC modes. See :ref:`RPCMode`. If a peer that is not the authority tries to call a function that is only allowed for the authority, the function will not be executed. If the error can be detected locally (when the RPC configuration is consistent between the local and the remote peer), an error message will be displayed on the sender peer. Otherwise, the remote peer will detect the error and print an error there. -If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config`, this is equivalent to setting ``call_local`` to ``true``. +If ``sync`` is set as ``"call_remote"``, the function will only be executed on the remote peer, but not locally. To run this function locally too, set ``sync`` to ``"call_local"``. When configuring functions as RPCs with :ref:`Node.rpc_config()`, this is equivalent to setting ``call_local`` to ``true``. The ``transfer_mode`` accepted values are ``"unreliable"``, ``"unreliable_ordered"``, or ``"reliable"``. It sets the transfer mode of the underlying :ref:`MultiplayerPeer`. See :ref:`MultiplayerPeer.transfer_mode`. @@ -950,7 +952,9 @@ Method Descriptions :ref:`Color` **Color8**\ (\ r8\: :ref:`int`, g8\: :ref:`int`, b8\: :ref:`int`, a8\: :ref:`int` = 255\ ) :ref:`πŸ”—` -Returns a :ref:`Color` constructed from red (``r8``), green (``g8``), blue (``b8``), and optionally alpha (``a8``) integer channels, each divided by ``255.0`` for their final value. Using :ref:`Color8` instead of the standard :ref:`Color` constructor is useful when you need to match exact color values in an :ref:`Image`. +**Deprecated:** Use :ref:`Color.from_rgba8()` instead. + +Returns a :ref:`Color` constructed from red (``r8``), green (``g8``), blue (``b8``), and optionally alpha (``a8``) integer channels, each divided by ``255.0`` for their final value. Using :ref:`Color8()` instead of the standard :ref:`Color` constructor is useful when you need to match exact color values in an :ref:`Image`. :: @@ -958,7 +962,7 @@ Returns a :ref:`Color` constructed from red (``r8``), green (``g8`` var dark_blue = Color8(0, 0, 51) # Same as Color(0, 0, 0.2). var my_color = Color8(306, 255, 0, 102) # Same as Color(1.2, 1, 0, 0.4). -\ **Note:** Due to the lower precision of :ref:`Color8` compared to the standard :ref:`Color` constructor, a color created with :ref:`Color8` will generally not be equal to the same color created with the standard :ref:`Color` constructor. Use :ref:`Color.is_equal_approx` for comparisons to avoid issues with floating-point precision error. +\ **Note:** Due to the lower precision of :ref:`Color8()` compared to the standard :ref:`Color` constructor, a color created with :ref:`Color8()` will generally not be equal to the same color created with the standard :ref:`Color` constructor. Use :ref:`Color.is_equal_approx()` for comparisons to avoid issues with floating-point precision error. .. rst-class:: classref-item-separator @@ -970,11 +974,11 @@ Returns a :ref:`Color` constructed from red (``r8``), green (``g8`` |void| **assert**\ (\ condition\: :ref:`bool`, message\: :ref:`String` = ""\ ) :ref:`πŸ”—` -Asserts that the ``condition`` is ``true``. If the ``condition`` is ``false``, an error is generated. When running from the editor, the running project will also be paused until you resume it. This can be used as a stronger form of :ref:`@GlobalScope.push_error` for reporting errors to project developers or add-on users. +Asserts that the ``condition`` is ``true``. If the ``condition`` is ``false``, an error is generated. When running from the editor, the running project will also be paused until you resume it. This can be used as a stronger form of :ref:`@GlobalScope.push_error()` for reporting errors to project developers or add-on users. An optional ``message`` can be shown in addition to the generic "Assertion failed" message. You can use this to provide additional details about why the assertion failed. -\ **Warning:** For performance reasons, the code inside :ref:`assert` is only executed in debug builds or when running the project from the editor. Don't include code that has side effects in an :ref:`assert` call. Otherwise, the project will behave differently when exported in release mode. +\ **Warning:** For performance reasons, the code inside :ref:`assert()` is only executed in debug builds or when running the project from the editor. Don't include code that has side effects in an :ref:`assert()` call. Otherwise, the project will behave differently when exported in release mode. :: @@ -985,7 +989,7 @@ An optional ``message`` can be shown in addition to the generic "Assertion faile assert(speed >= 0 and speed < 20) # You can also combine the two conditional statements in one check. assert(speed < 20, "the speed limit is 20") # Show a message. -\ **Note:** :ref:`assert` is a keyword, not a function. So you cannot access it as a :ref:`Callable` or use it inside expressions. +\ **Note:** :ref:`assert()` is a keyword, not a function. So you cannot access it as a :ref:`Callable` or use it inside expressions. .. rst-class:: classref-item-separator @@ -1015,7 +1019,7 @@ Returns a single character (as a :ref:`String`) of the given Unico :ref:`Variant` **convert**\ (\ what\: :ref:`Variant`, type\: :ref:`Variant.Type`\ ) :ref:`πŸ”—` -**Deprecated:** Use :ref:`@GlobalScope.type_convert` instead. +**Deprecated:** Use :ref:`@GlobalScope.type_convert()` instead. Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :ref:`Variant.Type` values. @@ -1038,7 +1042,9 @@ Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :r :ref:`Object` **dict_to_inst**\ (\ dictionary\: :ref:`Dictionary`\ ) :ref:`πŸ”—` -Converts a ``dictionary`` (created with :ref:`inst_to_dict`) back to an Object instance. Can be useful for deserializing. +**Deprecated:** Consider using :ref:`JSON.to_native()` or :ref:`Object.get_property_list()` instead. + +Converts a ``dictionary`` (created with :ref:`inst_to_dict()`) back to an Object instance. Can be useful for deserializing. .. rst-class:: classref-item-separator @@ -1050,7 +1056,7 @@ Converts a ``dictionary`` (created with :ref:`inst_to_dict` **get_stack**\ (\ ) :ref:`πŸ”—` -Returns an array of dictionaries representing the current call stack. See also :ref:`print_stack`. +Returns an array of dictionaries representing the current call stack. See also :ref:`print_stack()`. :: @@ -1069,7 +1075,7 @@ Starting from ``_ready()``, ``bar()`` would print: [{function:bar, line:12, source:res://script.gd}, {function:foo, line:9, source:res://script.gd}, {function:_ready, line:6, source:res://script.gd}] -\ **Note:** This function only works if the running instance is connected to a debugging server (i.e. an editor instance). :ref:`get_stack` will not work in projects exported in release mode, or in projects exported in debug mode if not connected to a debugging server. +\ **Note:** This function only works if the running instance is connected to a debugging server (i.e. an editor instance). :ref:`get_stack()` will not work in projects exported in release mode, or in projects exported in debug mode if not connected to a debugging server. \ **Note:** Calling this function from a :ref:`Thread` is not supported. Doing so will return an empty array. @@ -1083,9 +1089,9 @@ Starting from ``_ready()``, ``bar()`` would print: :ref:`Dictionary` **inst_to_dict**\ (\ instance\: :ref:`Object`\ ) :ref:`πŸ”—` -Returns the passed ``instance`` converted to a Dictionary. Can be useful for serializing. +**Deprecated:** Consider using :ref:`JSON.from_native()` or :ref:`Object.get_property_list()` instead. -\ **Note:** Cannot be used to serialize objects with built-in scripts attached or objects allocated within built-in scripts. +Returns the passed ``instance`` converted to a :ref:`Dictionary`. Can be useful for serializing. :: @@ -1102,6 +1108,10 @@ Prints out: [@subpath, @path, foo] [, res://test.gd, bar] +\ **Note:** This function can only be used to serialize objects with an attached :ref:`GDScript` stored in a separate file. Objects without an attached script, with a script written in another language, or with a built-in script are not supported. + +\ **Note:** This function is not recursive, which means that nested objects will not be represented as dictionaries. Also, properties passed by reference (:ref:`Object`, :ref:`Dictionary`, :ref:`Array`, and packed arrays) are copied by reference, not duplicated. + .. rst-class:: classref-item-separator ---- @@ -1120,7 +1130,7 @@ Returns ``true`` if ``value`` is an instance of ``type``. The ``type`` value mus - A :ref:`Script` (you can use any class, including inner one). -Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant value. The ``is`` operator supports more features (such as typed arrays). Use the operator instead of this method if you do not need dynamic type checking. +Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant value. The ``is`` operator supports more features (such as typed arrays). Use the operator instead of this method if you do not need to check the type dynamically. \ **Examples:**\ @@ -1131,9 +1141,9 @@ Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant print(is_instance_of(a, MyClass)) print(is_instance_of(a, MyClass.InnerClass)) -\ **Note:** If ``value`` and/or ``type`` are freed objects (see :ref:`@GlobalScope.is_instance_valid`), or ``type`` is not one of the above options, this method will raise a runtime error. +\ **Note:** If ``value`` and/or ``type`` are freed objects (see :ref:`@GlobalScope.is_instance_valid()`), or ``type`` is not one of the above options, this method will raise a runtime error. -See also :ref:`@GlobalScope.typeof`, :ref:`type_exists`, :ref:`Array.is_same_typed` (and other :ref:`Array` methods). +See also :ref:`@GlobalScope.typeof()`, :ref:`type_exists()`, :ref:`Array.is_same_typed()` (and other :ref:`Array` methods). .. rst-class:: classref-item-separator @@ -1165,7 +1175,7 @@ Returns the length of the given Variant ``var``. The length can be the character :ref:`Resource` **load**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Returns a :ref:`Resource` from the filesystem located at the absolute ``path``. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use :ref:`preload`. This method is equivalent of using :ref:`ResourceLoader.load` with :ref:`ResourceLoader.CACHE_MODE_REUSE`. +Returns a :ref:`Resource` from the filesystem located at the absolute ``path``. Unless it's already referenced elsewhere (such as in another script or in the scene), the resource is loaded from disk on function call, which might cause a slight delay, especially when loading large scenes. To avoid unnecessary delays when loading something multiple times, either store the resource in a variable or use :ref:`preload()`. This method is equivalent of using :ref:`ResourceLoader.load()` with :ref:`ResourceLoader.CACHE_MODE_REUSE`. \ **Note:** Resource paths can be obtained by right-clicking on a resource in the FileSystem dock and choosing "Copy Path", or by dragging the file from the FileSystem dock into the current script. @@ -1176,11 +1186,11 @@ Returns a :ref:`Resource` from the filesystem located at the abs \ **Important:** Relative paths are *not* relative to the script calling this method, instead it is prefixed with ``"res://"``. Loading from relative paths might not work as expected. -This function is a simplified version of :ref:`ResourceLoader.load`, which can be used for more advanced scenarios. +This function is a simplified version of :ref:`ResourceLoader.load()`, which can be used for more advanced scenarios. -\ **Note:** Files have to be imported into the engine first to load them using this function. If you want to load :ref:`Image`\ s at run-time, you may use :ref:`Image.load`. If you want to import audio files, you can use the snippet described in :ref:`AudioStreamMP3.data`. +\ **Note:** Files have to be imported into the engine first to load them using this function. If you want to load :ref:`Image`\ s at run-time, you may use :ref:`Image.load()`. If you want to import audio files, you can use the snippet described in :ref:`AudioStreamMP3.data`. -\ **Note:** If :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary` is ``true``, :ref:`load` will not be able to read converted files in an exported project. If you rely on run-time loading of files present within the PCK, set :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary` to ``false``. +\ **Note:** If :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary` is ``true``, :ref:`load()` will not be able to read converted files in an exported project. If you rely on run-time loading of files present within the PCK, set :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary` to ``false``. .. rst-class:: classref-item-separator @@ -1192,7 +1202,7 @@ This function is a simplified version of :ref:`ResourceLoader.load` **preload**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Returns a :ref:`Resource` from the filesystem located at ``path``. During run-time, the resource is loaded when the script is being parsed. This function effectively acts as a reference to that resource. Note that this function requires ``path`` to be a constant :ref:`String`. If you want to load a resource from a dynamic/variable path, use :ref:`load`. +Returns a :ref:`Resource` from the filesystem located at ``path``. During run-time, the resource is loaded when the script is being parsed. This function effectively acts as a reference to that resource. Note that this function requires ``path`` to be a constant :ref:`String`. If you want to load a resource from a dynamic/variable path, use :ref:`load()`. \ **Note:** Resource paths can be obtained by right-clicking on a resource in the Assets Panel and choosing "Copy Path", or by dragging the file from the FileSystem dock into the current script. @@ -1201,7 +1211,7 @@ Returns a :ref:`Resource` from the filesystem located at ``path` # Create instance of a scene. var diamond = preload("res://diamond.tscn").instantiate() -\ **Note:** :ref:`preload` is a keyword, not a function. So you cannot access it as a :ref:`Callable`. +\ **Note:** :ref:`preload()` is a keyword, not a function. So you cannot access it as a :ref:`Callable`. .. rst-class:: classref-item-separator @@ -1213,7 +1223,7 @@ Returns a :ref:`Resource` from the filesystem located at ``path` |void| **print_debug**\ (\ ...\ ) |vararg| :ref:`πŸ”—` -Like :ref:`@GlobalScope.print`, but includes the current stack frame when running with the debugger turned on. +Like :ref:`@GlobalScope.print()`, but includes the current stack frame when running with the debugger turned on. The output in the console may look like the following: @@ -1234,7 +1244,7 @@ The output in the console may look like the following: |void| **print_stack**\ (\ ) :ref:`πŸ”—` -Prints a stack trace at the current code location. See also :ref:`get_stack`. +Prints a stack trace at the current code location. See also :ref:`get_stack()`. The output in the console may look like the following: @@ -1242,7 +1252,7 @@ The output in the console may look like the following: Frame 0 - res://test.gd:16 in function '_process' -\ **Note:** This function only works if the running instance is connected to a debugging server (i.e. an editor instance). :ref:`print_stack` will not work in projects exported in release mode, or in projects exported in debug mode if not connected to a debugging server. +\ **Note:** This function only works if the running instance is connected to a debugging server (i.e. an editor instance). :ref:`print_stack()` will not work in projects exported in release mode, or in projects exported in debug mode if not connected to a debugging server. \ **Note:** Calling this function from a :ref:`Thread` is not supported. Doing so will instead print the thread ID. @@ -1256,7 +1266,7 @@ The output in the console may look like the following: :ref:`Array` **range**\ (\ ...\ ) |vararg| :ref:`πŸ”—` -Returns an array with the given range. :ref:`range` can be called in three ways: +Returns an array with the given range. :ref:`range()` can be called in three ways: \ ``range(n: int)``: Starts from 0, increases by steps of 1, and stops *before* ``n``. The argument ``n`` is **exclusive**. @@ -1264,7 +1274,7 @@ Returns an array with the given range. :ref:`range \ ``range(b: int, n: int, s: int)``: Starts from ``b``, increases/decreases by steps of ``s``, and stops *before* ``n``. The arguments ``b`` and ``n`` are **inclusive** and **exclusive**, respectively. The argument ``s`` **can** be negative, but not ``0``. If ``s`` is ``0``, an error message is printed. -\ :ref:`range` converts all arguments to :ref:`int` before processing. +\ :ref:`range()` converts all arguments to :ref:`int` before processing. \ **Note:** Returns an empty array if no value meets the value constraint (e.g. ``range(2, 5, -1)`` or ``range(5, 5, 1)``). diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index ab1ee76ea6b..2795538c474 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -305,6 +305,14 @@ Methods +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`seed`\ (\ base\: :ref:`int`\ ) | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sigmoid`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sigmoid_affine`\ (\ x\: :ref:`float`, amplitude\: :ref:`float`, y_translation\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sigmoid_affine_approx`\ (\ x\: :ref:`float`, amplitude\: :ref:`float`, y_translation\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`sigmoid_approx`\ (\ x\: :ref:`float`\ ) | + +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`sign`\ (\ x\: :ref:`Variant`\ ) | +-------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`signf`\ (\ x\: :ref:`float`\ ) | @@ -487,7 +495,7 @@ enum **ClockDirection**: :ref:`πŸ”—` :ref:`ClockDirection` **CLOCKWISE** = ``0`` -Clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90`). +Clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90()`). .. _class_@GlobalScope_constant_COUNTERCLOCKWISE: @@ -495,7 +503,7 @@ Clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90` **COUNTERCLOCKWISE** = ``1`` -Counter-clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90`). +Counter-clockwise rotation. Used by some methods (e.g. :ref:`Image.rotate_90()`). .. rst-class:: classref-item-separator @@ -2329,7 +2337,7 @@ Key Code mask. .. rst-class:: classref-enumeration-constant -:ref:`KeyModifierMask` **KEY_MODIFIER_MASK** = ``532676608`` +:ref:`KeyModifierMask` **KEY_MODIFIER_MASK** = ``2130706432`` Modifier key mask. @@ -2407,7 +2415,7 @@ enum **KeyLocation**: :ref:`πŸ”—` Used for keys which only appear once, or when a comparison doesn't need to differentiate the ``LEFT`` and ``RIGHT`` versions. -For example, when using :ref:`InputEvent.is_match`, an event which has :ref:`KEY_LOCATION_UNSPECIFIED` will match any :ref:`KeyLocation` on the passed event. +For example, when using :ref:`InputEvent.is_match()`, an event which has :ref:`KEY_LOCATION_UNSPECIFIED` will match any :ref:`KeyLocation` on the passed event. .. _class_@GlobalScope_constant_KEY_LOCATION_LEFT: @@ -3671,6 +3679,8 @@ If a property is :ref:`String`, hints that the property represents If a property is :ref:`Array`, hints the editor how to show elements. The ``hint_string`` must encode nested types using ``":"`` and ``"/"``. +If a property is :ref:`Dictionary`, hints the editor how to show elements. The ``hint_string`` is the same as :ref:`Array`, with a ``";"`` separating the key and value. + .. tabs:: @@ -3802,7 +3812,9 @@ Hints that an :ref:`int` property is a pointer. Used by GDExtension. :ref:`PropertyHint` **PROPERTY_HINT_ARRAY_TYPE** = ``31`` -Hints that a property is an :ref:`Array` with the stored type specified in the hint string. +Hints that a property is an :ref:`Array` with the stored type specified in the hint string. The hint string contains the type of the array (e.g. ``"String"``). + +Use the hint string format from :ref:`PROPERTY_HINT_TYPE_STRING` for more control over the stored type. .. _class_@GlobalScope_constant_PROPERTY_HINT_DICTIONARY_TYPE: @@ -3810,7 +3822,9 @@ Hints that a property is an :ref:`Array` with the stored type speci :ref:`PropertyHint` **PROPERTY_HINT_DICTIONARY_TYPE** = ``38`` -Hints that a property is a :ref:`Dictionary` with the stored types specified in the hint string. +Hints that a property is a :ref:`Dictionary` with the stored types specified in the hint string. The hint string contains the key and value types separated by a semicolon (e.g. ``"int;String"``). + +Use the hint string format from :ref:`PROPERTY_HINT_TYPE_STRING` for more control over the stored types. .. _class_@GlobalScope_constant_PROPERTY_HINT_LOCALE_ID: @@ -3875,11 +3889,19 @@ Hints that a :ref:`Callable` property should be displayed as a c Hints that a property will be changed on its own after setting, such as :ref:`AudioStreamPlayer.playing` or :ref:`GPUParticles3D.emitting`. +.. _class_@GlobalScope_constant_PROPERTY_HINT_GROUP_ENABLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_GROUP_ENABLE** = ``42`` + +Hints that a boolean property will enable the feature associated with the group that it occurs in. Only works within a group or subgroup. + .. _class_@GlobalScope_constant_PROPERTY_HINT_MAX: .. rst-class:: classref-enumeration-constant -:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``42`` +:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``43`` Represents the size of the :ref:`PropertyHint` enum. @@ -3995,7 +4017,7 @@ Editing the property prompts the user for restarting the editor. :ref:`PropertyUsageFlags` **PROPERTY_USAGE_SCRIPT_VARIABLE** = ``4096`` -The property is a script variable. :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` can be used to distinguish between exported script variables from built-in variables (which don't have this usage flag). By default, :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` is **not** applied to variables that are created by overriding :ref:`Object._get_property_list` in a script. +The property is a script variable. :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` can be used to distinguish between exported script variables from built-in variables (which don't have this usage flag). By default, :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` is **not** applied to variables that are created by overriding :ref:`Object._get_property_list()` in a script. .. _class_@GlobalScope_constant_PROPERTY_USAGE_STORE_IF_NULL: @@ -4053,7 +4075,7 @@ The property is an array. :ref:`PropertyUsageFlags` **PROPERTY_USAGE_ALWAYS_DUPLICATE** = ``524288`` -When duplicating a resource with :ref:`Resource.duplicate`, and this flag is set on a property of that resource, the property should always be duplicated, regardless of the ``subresources`` bool parameter. +When duplicating a resource with :ref:`Resource.duplicate()`, and this flag is set on a property of that resource, the property should always be duplicated, regardless of the ``subresources`` bool parameter. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NEVER_DUPLICATE: @@ -4061,7 +4083,7 @@ When duplicating a resource with :ref:`Resource.duplicate` **PROPERTY_USAGE_NEVER_DUPLICATE** = ``1048576`` -When duplicating a resource with :ref:`Resource.duplicate`, and this flag is set on a property of that resource, the property should never be duplicated, regardless of the ``subresources`` bool parameter. +When duplicating a resource with :ref:`Resource.duplicate()`, and this flag is set on a property of that resource, the property should never be duplicated, regardless of the ``subresources`` bool parameter. .. _class_@GlobalScope_constant_PROPERTY_USAGE_HIGH_END_GFX: @@ -4217,7 +4239,15 @@ Flag for a static method. :ref:`MethodFlags` **METHOD_FLAG_OBJECT_CORE** = ``64`` -Used internally. Allows to not dump core virtual methods (such as :ref:`Object._notification`) to the JSON API. +Used internally. Allows to not dump core virtual methods (such as :ref:`Object._notification()`) to the JSON API. + +.. _class_@GlobalScope_constant_METHOD_FLAG_VIRTUAL_REQUIRED: + +.. rst-class:: classref-enumeration-constant + +:ref:`MethodFlags` **METHOD_FLAG_VIRTUAL_REQUIRED** = ``128`` + +Flag for a virtual method that is required. .. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT: @@ -5269,7 +5299,7 @@ Returns the absolute value of a :ref:`Variant` parameter ``x`` (i var f = abs(Vector3i(-7, -8, -9)) # f is (7, 8, 9) -\ **Note:** For better type safety, use :ref:`absf`, :ref:`absi`, :ref:`Vector2.abs`, :ref:`Vector2i.abs`, :ref:`Vector3.abs`, :ref:`Vector3i.abs`, :ref:`Vector4.abs`, or :ref:`Vector4i.abs`. +\ **Note:** For better type safety, use :ref:`absf()`, :ref:`absi()`, :ref:`Vector2.abs()`, :ref:`Vector2i.abs()`, :ref:`Vector3.abs()`, :ref:`Vector3i.abs()`, :ref:`Vector4.abs()`, or :ref:`Vector4i.abs()`. .. rst-class:: classref-item-separator @@ -5315,7 +5345,7 @@ Returns the absolute value of int parameter ``x`` (i.e. positive value). :ref:`float` **acos**\ (\ x\: :ref:`float`\ ) :ref:`πŸ”—` -Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`acos` from returning :ref:`@GDScript.NAN`. +Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`acos()` from returning :ref:`@GDScript.NAN`. :: @@ -5332,7 +5362,7 @@ Returns the arc cosine of ``x`` in radians. Use to get the angle of cosine ``x`` :ref:`float` **acosh**\ (\ x\: :ref:`float`\ ) :ref:`πŸ”—` -Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a value in radians. Use it to get the angle from an angle's cosine in hyperbolic space if ``x`` is larger or equal to 1. For values of ``x`` lower than 1, it will return 0, in order to prevent :ref:`acosh` from returning :ref:`@GDScript.NAN`. +Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a value in radians. Use it to get the angle from an angle's cosine in hyperbolic space if ``x`` is larger or equal to 1. For values of ``x`` lower than 1, it will return 0, in order to prevent :ref:`acosh()` from returning :ref:`@GDScript.NAN`. :: @@ -5363,7 +5393,7 @@ Returns the difference between the two angles (in radians), in the range of ``[- :ref:`float` **asin**\ (\ x\: :ref:`float`\ ) :ref:`πŸ”—` -Returns the arc sine of ``x`` in radians. Use to get the angle of sine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`asin` from returning :ref:`@GDScript.NAN`. +Returns the arc sine of ``x`` in radians. Use to get the angle of sine ``x``. ``x`` will be clamped between ``-1.0`` and ``1.0`` (inclusive), in order to prevent :ref:`asin()` from returning :ref:`@GDScript.NAN`. :: @@ -5399,7 +5429,7 @@ Returns the hyperbolic arc (also called inverse) sine of ``x``, returning a valu Returns the arc tangent of ``x`` in radians. Use it to get the angle from an angle's tangent in trigonometry. -The method cannot know in which quadrant the angle should fall. See :ref:`atan2` if you have both ``y`` and ``x``. +The method cannot know in which quadrant the angle should fall. See :ref:`atan2()` if you have both ``y`` and ``x``. :: @@ -5437,7 +5467,7 @@ Important note: The Y coordinate comes first, by convention. Returns the hyperbolic arc (also called inverse) tangent of ``x``, returning a value in radians. Use it to get the angle from an angle's tangent in hyperbolic space if ``x`` is between -1 and 1 (non-inclusive). -In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < 1 in the real set, so values equal or lower to -1 for ``x`` return negative :ref:`@GDScript.INF` and values equal or higher than 1 return positive :ref:`@GDScript.INF` in order to prevent :ref:`atanh` from returning :ref:`@GDScript.NAN`. +In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < 1 in the real set, so values equal or lower to -1 for ``x`` return negative :ref:`@GDScript.INF` and values equal or higher than 1 return positive :ref:`@GDScript.INF` in order to prevent :ref:`atanh()` from returning :ref:`@GDScript.NAN`. :: @@ -5483,7 +5513,7 @@ Returns the point at the given ``t`` on a one-dimensional `BΓ©zier curve ` value, without decoding objects. -\ **Note:** If you need object deserialization, see :ref:`bytes_to_var_with_objects`. +\ **Note:** If you need object deserialization, see :ref:`bytes_to_var_with_objects()`. .. rst-class:: classref-item-separator @@ -5516,9 +5546,9 @@ Rounds ``x`` upward (towards positive infinity), returning the smallest whole nu var i = ceil(1.45) # i is 2.0 i = ceil(1.001) # i is 2.0 -See also :ref:`floor`, :ref:`round`, and :ref:`snapped`. +See also :ref:`floor()`, :ref:`round()`, and :ref:`snapped()`. -\ **Note:** For better type safety, use :ref:`ceilf`, :ref:`ceili`, :ref:`Vector2.ceil`, :ref:`Vector3.ceil`, or :ref:`Vector4.ceil`. +\ **Note:** For better type safety, use :ref:`ceilf()`, :ref:`ceili()`, :ref:`Vector2.ceil()`, :ref:`Vector3.ceil()`, or :ref:`Vector4.ceil()`. .. rst-class:: classref-item-separator @@ -5532,7 +5562,7 @@ See also :ref:`floor`, :ref:`round`, returning a :ref:`float`. +A type-safe version of :ref:`ceil()`, returning a :ref:`float`. .. rst-class:: classref-item-separator @@ -5546,7 +5576,7 @@ A type-safe version of :ref:`ceil`, returning a Rounds ``x`` upward (towards positive infinity), returning the smallest whole number that is not less than ``x``. -A type-safe version of :ref:`ceil`, returning an :ref:`int`. +A type-safe version of :ref:`ceil()`, returning an :ref:`int`. .. rst-class:: classref-item-separator @@ -5568,7 +5598,7 @@ Clamps the ``value``, returning a :ref:`Variant` not less than `` var b = clamp(8.1, 0.9, 5.5) # b is 5.5 -\ **Note:** For better type safety, use :ref:`clampf`, :ref:`clampi`, :ref:`Vector2.clamp`, :ref:`Vector2i.clamp`, :ref:`Vector3.clamp`, :ref:`Vector3i.clamp`, :ref:`Vector4.clamp`, :ref:`Vector4i.clamp`, or :ref:`Color.clamp` (not currently supported by this method). +\ **Note:** For better type safety, use :ref:`clampf()`, :ref:`clampi()`, :ref:`Vector2.clamp()`, :ref:`Vector2i.clamp()`, :ref:`Vector3.clamp()`, :ref:`Vector3i.clamp()`, :ref:`Vector4.clamp()`, :ref:`Vector4i.clamp()`, or :ref:`Color.clamp()` (not currently supported by this method). \ **Note:** When using this on vectors it will *not* perform component-wise clamping, and will pick ``min`` if ``value < min`` or ``max`` if ``value > max``. To perform component-wise clamping use the methods listed above. @@ -5668,7 +5698,7 @@ Cubic interpolates between two values by the factor defined in ``weight`` with ` :ref:`float` **cubic_interpolate_angle**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`πŸ”—` -Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle`. +Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle()`. .. rst-class:: classref-item-separator @@ -5680,9 +5710,9 @@ Cubic interpolates between two rotation values with shortest path by the factor :ref:`float` **cubic_interpolate_angle_in_time**\ (\ from\: :ref:`float`, to\: :ref:`float`, pre\: :ref:`float`, post\: :ref:`float`, weight\: :ref:`float`, to_t\: :ref:`float`, pre_t\: :ref:`float`, post_t\: :ref:`float`\ ) :ref:`πŸ”—` -Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle`. +Cubic interpolates between two rotation values with shortest path by the factor defined in ``weight`` with ``pre`` and ``post`` values. See also :ref:`lerp_angle()`. -It can perform smoother interpolation than :ref:`cubic_interpolate` by the time values. +It can perform smoother interpolation than :ref:`cubic_interpolate()` by the time values. .. rst-class:: classref-item-separator @@ -5696,7 +5726,7 @@ It can perform smoother interpolation than :ref:`cubic_interpolate` by the time values. +It can perform smoother interpolation than :ref:`cubic_interpolate()` by the time values. .. rst-class:: classref-item-separator @@ -5750,7 +5780,7 @@ Returns an "eased" value of ``x`` based on an easing function defined with ``cur \ `ease() curve values cheatsheet `__\ -See also :ref:`smoothstep`. If you need to perform more advanced transitions, use :ref:`Tween.interpolate_value`. +See also :ref:`smoothstep()`. If you need to perform more advanced transitions, use :ref:`Tween.interpolate_value()`. .. rst-class:: classref-item-separator @@ -5767,9 +5797,9 @@ Returns a human-readable name for the given :ref:`Error :: print(OK) # Prints 0 - print(error_string(OK)) # Prints OK - print(error_string(ERR_BUSY)) # Prints Busy - print(error_string(ERR_OUT_OF_MEMORY)) # Prints Out of memory + print(error_string(OK)) # Prints "OK" + print(error_string(ERR_BUSY)) # Prints "Busy" + print(error_string(ERR_OUT_OF_MEMORY)) # Prints "Out of memory" .. rst-class:: classref-item-separator @@ -5785,7 +5815,7 @@ The natural exponential function. It raises the mathematical constant *e* to the \ *e* has an approximate value of 2.71828, and can be obtained with ``exp(1)``. -For exponents to other bases use the method :ref:`pow`. +For exponents to other bases use the method :ref:`pow()`. :: @@ -5808,9 +5838,9 @@ Rounds ``x`` downward (towards negative infinity), returning the largest whole n var a = floor(2.99) # a is 2.0 a = floor(-2.99) # a is -3.0 -See also :ref:`ceil`, :ref:`round`, and :ref:`snapped`. +See also :ref:`ceil()`, :ref:`round()`, and :ref:`snapped()`. -\ **Note:** For better type safety, use :ref:`floorf`, :ref:`floori`, :ref:`Vector2.floor`, :ref:`Vector3.floor`, or :ref:`Vector4.floor`. +\ **Note:** For better type safety, use :ref:`floorf()`, :ref:`floori()`, :ref:`Vector2.floor()`, :ref:`Vector3.floor()`, or :ref:`Vector4.floor()`. .. rst-class:: classref-item-separator @@ -5824,7 +5854,7 @@ See also :ref:`ceil`, :ref:`round`, returning a :ref:`float`. +A type-safe version of :ref:`floor()`, returning a :ref:`float`. .. rst-class:: classref-item-separator @@ -5838,7 +5868,7 @@ A type-safe version of :ref:`floor`, returning Rounds ``x`` downward (towards negative infinity), returning the largest whole number that is not more than ``x``. -A type-safe version of :ref:`floor`, returning an :ref:`int`. +A type-safe version of :ref:`floor()`, returning an :ref:`int`. \ **Note:** This function is *not* the same as ``int(x)``, which rounds towards 0. @@ -5927,31 +5957,31 @@ Returns the integer hash of the passed ``variable``. :ref:`Object` **instance_from_id**\ (\ instance_id\: :ref:`int`\ ) :ref:`πŸ”—` -Returns the :ref:`Object` that corresponds to ``instance_id``. All Objects have a unique instance ID. See also :ref:`Object.get_instance_id`. +Returns the :ref:`Object` that corresponds to ``instance_id``. All Objects have a unique instance ID. See also :ref:`Object.get_instance_id()`. .. tabs:: .. code-tab:: gdscript - var foo = "bar" + var drink = "water" func _ready(): var id = get_instance_id() - var inst = instance_from_id(id) - print(inst.foo) # Prints bar + var instance = instance_from_id(id) + print(instance.foo) # Prints "water" .. code-tab:: csharp public partial class MyNode : Node { - public string Foo { get; set; } = "bar"; + public string Drink { get; set; } = "water"; public override void _Ready() { ulong id = GetInstanceId(); - var inst = (MyNode)InstanceFromId(Id); - GD.Print(inst.Foo); // Prints bar + var instance = (MyNode)InstanceFromId(Id); + GD.Print(instance.Drink); // Prints "water" } } @@ -5967,7 +5997,7 @@ Returns the :ref:`Object` that corresponds to ``instance_id``. All :ref:`float` **inverse_lerp**\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`πŸ”—` -Returns an interpolation or extrapolation factor considering the range specified in ``from`` and ``to``, and the interpolated value specified in ``weight``. The returned value will be between ``0.0`` and ``1.0`` if ``weight`` is between ``from`` and ``to`` (inclusive). If ``weight`` is located outside this range, then an extrapolation factor will be returned (return value lower than ``0.0`` or greater than ``1.0``). Use :ref:`clamp` on the result of :ref:`inverse_lerp` if this is not desired. +Returns an interpolation or extrapolation factor considering the range specified in ``from`` and ``to``, and the interpolated value specified in ``weight``. The returned value will be between ``0.0`` and ``1.0`` if ``weight`` is between ``from`` and ``to`` (inclusive). If ``weight`` is located outside this range, then an extrapolation factor will be returned (return value lower than ``0.0`` or greater than ``1.0``). Use :ref:`clamp()` on the result of :ref:`inverse_lerp()` if this is not desired. :: @@ -5979,7 +6009,7 @@ Returns an interpolation or extrapolation factor considering the range specified var ratio = inverse_lerp(20, 30, 27.5) # ratio is now 0.75. -See also :ref:`lerp`, which performs the reverse of this operation, and :ref:`remap` to map a continuous series of values to another. +See also :ref:`lerp()`, which performs the reverse of this operation, and :ref:`remap()` to map a continuous series of values to another. .. rst-class:: classref-item-separator @@ -6007,7 +6037,7 @@ Infinity values of the same sign are considered equal. :ref:`bool` **is_finite**\ (\ x\: :ref:`float`\ ) :ref:`πŸ”—` -Returns whether ``x`` is a finite value, i.e. it is not :ref:`@GDScript.NAN`, positive infinity, or negative infinity. +Returns whether ``x`` is a finite value, i.e. it is not :ref:`@GDScript.NAN`, positive infinity, or negative infinity. See also :ref:`is_inf()` and :ref:`is_nan()`. .. rst-class:: classref-item-separator @@ -6019,7 +6049,7 @@ Returns whether ``x`` is a finite value, i.e. it is not :ref:`@GDScript.NAN` **is_inf**\ (\ x\: :ref:`float`\ ) :ref:`πŸ”—` -Returns ``true`` if ``x`` is either positive infinity or negative infinity. +Returns ``true`` if ``x`` is either positive infinity or negative infinity. See also :ref:`is_finite()` and :ref:`is_nan()`. .. rst-class:: classref-item-separator @@ -6055,7 +6085,7 @@ Returns ``true`` if ``instance`` is a valid Object (e.g. has not been deleted fr :ref:`bool` **is_nan**\ (\ x\: :ref:`float`\ ) :ref:`πŸ”—` -Returns ``true`` if ``x`` is a NaN ("Not a Number" or invalid) value. +Returns ``true`` if ``x`` is a NaN ("Not a Number" or invalid) value. This method is needed as :ref:`@GDScript.NAN` is not equal to itself, which means ``x == NAN`` can't be used to check whether a value is a NaN. .. rst-class:: classref-item-separator @@ -6101,7 +6131,7 @@ These are :ref:`Variant` reference types: :ref:`Object` with one value as zero. +This function is faster than using :ref:`is_equal_approx()` with one value as zero. .. rst-class:: classref-item-separator @@ -6113,7 +6143,7 @@ This function is faster than using :ref:`is_equal_approx` **lerp**\ (\ from\: :ref:`Variant`, to\: :ref:`Variant`, weight\: :ref:`Variant`\ ) :ref:`πŸ”—` -Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf` to limit ``weight``. +Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf()` to limit ``weight``. Both ``from`` and ``to`` must be the same type. Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2`, :ref:`Vector3`, :ref:`Vector4`, :ref:`Color`, :ref:`Quaternion`, :ref:`Basis`, :ref:`Transform2D`, :ref:`Transform3D`. @@ -6121,9 +6151,9 @@ Both ``from`` and ``to`` must be the same type. Supported types: :ref:`int` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp`, combine it with :ref:`ease` or :ref:`smoothstep`. See also :ref:`remap` to map a continuous series of values to another. +See also :ref:`inverse_lerp()` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp()`, combine it with :ref:`ease()` or :ref:`smoothstep()`. See also :ref:`remap()` to map a continuous series of values to another. -\ **Note:** For better type safety, use :ref:`lerpf`, :ref:`Vector2.lerp`, :ref:`Vector3.lerp`, :ref:`Vector4.lerp`, :ref:`Color.lerp`, :ref:`Quaternion.slerp`, :ref:`Basis.slerp`, :ref:`Transform2D.interpolate_with`, or :ref:`Transform3D.interpolate_with`. +\ **Note:** For better type safety, use :ref:`lerpf()`, :ref:`Vector2.lerp()`, :ref:`Vector3.lerp()`, :ref:`Vector4.lerp()`, :ref:`Color.lerp()`, :ref:`Quaternion.slerp()`, :ref:`Basis.slerp()`, :ref:`Transform2D.interpolate_with()`, or :ref:`Transform3D.interpolate_with()`. .. rst-class:: classref-item-separator @@ -6137,7 +6167,7 @@ See also :ref:`inverse_lerp` which perfo Linearly interpolates between two angles (in radians) by a ``weight`` value between 0.0 and 1.0. -Similar to :ref:`lerp`, but interpolates correctly when the angles wrap around :ref:`@GDScript.TAU`. To perform eased interpolation with :ref:`lerp_angle`, combine it with :ref:`ease` or :ref:`smoothstep`. +Similar to :ref:`lerp()`, but interpolates correctly when the angles wrap around :ref:`@GDScript.TAU`. To perform eased interpolation with :ref:`lerp_angle()`, combine it with :ref:`ease()` or :ref:`smoothstep()`. :: @@ -6161,13 +6191,13 @@ Similar to :ref:`lerp`, but interpolates correct :ref:`float` **lerpf**\ (\ from\: :ref:`float`, to\: :ref:`float`, weight\: :ref:`float`\ ) :ref:`πŸ”—` -Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf` on the result of this function. +Linearly interpolates between two values by the factor defined in ``weight``. To perform interpolation, ``weight`` should be between ``0.0`` and ``1.0`` (inclusive). However, values outside this range are allowed and can be used to perform *extrapolation*. If this is not desired, use :ref:`clampf()` on the result of this function. :: lerpf(0, 4, 0.75) # Returns 3.0 -See also :ref:`inverse_lerp` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp`, combine it with :ref:`ease` or :ref:`smoothstep`. +See also :ref:`inverse_lerp()` which performs the reverse of this operation. To perform eased interpolation with :ref:`lerp()`, combine it with :ref:`ease()` or :ref:`smoothstep()`. .. rst-class:: classref-item-separator @@ -6223,7 +6253,7 @@ Returns the maximum of the given numeric values. This function can take any numb max(1, 7, 3, -6, 5) # Returns 7 -\ **Note:** When using this on vectors it will *not* perform component-wise maximum, and will pick the largest value when compared using ``x < y``. To perform component-wise maximum, use :ref:`Vector2.max`, :ref:`Vector2i.max`, :ref:`Vector3.max`, :ref:`Vector3i.max`, :ref:`Vector4.max`, and :ref:`Vector4i.max`. +\ **Note:** When using this on vectors it will *not* perform component-wise maximum, and will pick the largest value when compared using ``x < y``. To perform component-wise maximum, use :ref:`Vector2.max()`, :ref:`Vector2i.max()`, :ref:`Vector3.max()`, :ref:`Vector3i.max()`, :ref:`Vector4.max()`, and :ref:`Vector4i.max()`. .. rst-class:: classref-item-separator @@ -6275,7 +6305,7 @@ Returns the minimum of the given numeric values. This function can take any numb min(1, 7, 3, -6, 5) # Returns -6 -\ **Note:** When using this on vectors it will *not* perform component-wise minimum, and will pick the smallest value when compared using ``x < y``. To perform component-wise minimum, use :ref:`Vector2.min`, :ref:`Vector2i.min`, :ref:`Vector3.min`, :ref:`Vector3i.min`, :ref:`Vector4.min`, and :ref:`Vector4i.min`. +\ **Note:** When using this on vectors it will *not* perform component-wise minimum, and will pick the smallest value when compared using ``x < y``. To perform component-wise minimum, use :ref:`Vector2.min()`, :ref:`Vector2i.min()`, :ref:`Vector3.min()`, :ref:`Vector3i.min()`, :ref:`Vector4.min()`, and :ref:`Vector4i.min()`. .. rst-class:: classref-item-separator @@ -6448,16 +6478,16 @@ Converts one or more arguments of any type to string in the best way possible an .. code-tab:: gdscript var a = [1, 2, 3] - print("a", "b", a) # Prints ab[1, 2, 3] + print("a", "b", a) # Prints "ab[1, 2, 3]" .. code-tab:: csharp - var a = new Godot.Collections.Array { 1, 2, 3 }; - GD.Print("a", "b", a); // Prints ab[1, 2, 3] + Godot.Collections.Array a = [1, 2, 3]; + GD.Print("a", "b", a); // Prints "ab[1, 2, 3]" -\ **Note:** Consider using :ref:`push_error` and :ref:`push_warning` to print error and warning messages instead of :ref:`print` or :ref:`print_rich`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. See also :ref:`Engine.print_to_stdout` and :ref:`ProjectSettings.application/run/disable_stdout`. +\ **Note:** Consider using :ref:`push_error()` and :ref:`push_warning()` to print error and warning messages instead of :ref:`print()` or :ref:`print_rich()`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. See also :ref:`Engine.print_to_stdout` and :ref:`ProjectSettings.application/run/disable_stdout`. .. rst-class:: classref-item-separator @@ -6482,19 +6512,19 @@ When printing to standard output, the supported subset of BBCode is converted to .. code-tab:: gdscript - print_rich("[color=green][b]Hello world![/b][/color]") # Prints out "Hello world!" in green with a bold font + print_rich("[color=green][b]Hello world![/b][/color]") # Prints "Hello world!", in green with a bold font. .. code-tab:: csharp - GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints out "Hello world!" in green with a bold font + GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints "Hello world!", in green with a bold font. -\ **Note:** Consider using :ref:`push_error` and :ref:`push_warning` to print error and warning messages instead of :ref:`print` or :ref:`print_rich`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. +\ **Note:** Consider using :ref:`push_error()` and :ref:`push_warning()` to print error and warning messages instead of :ref:`print()` or :ref:`print_rich()`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. \ **Note:** On Windows, only Windows 10 and later correctly displays ANSI escape codes in standard output. -\ **Note:** Output displayed in the editor supports clickable ``[url=address]text[/url]`` tags. The ``[url]`` tag's ``address`` value is handled by :ref:`OS.shell_open` when clicked. +\ **Note:** Output displayed in the editor supports clickable ``[url=address]text[/url]`` tags. The ``[url]`` tag's ``address`` value is handled by :ref:`OS.shell_open()` when clicked. .. rst-class:: classref-item-separator @@ -6506,7 +6536,7 @@ When printing to standard output, the supported subset of BBCode is converted to |void| **print_verbose**\ (\ ...\ ) |vararg| :ref:`πŸ”—` -If verbose mode is enabled (:ref:`OS.is_stdout_verbose` returning ``true``), converts one or more arguments of any type to string in the best way possible and prints them to the console. +If verbose mode is enabled (:ref:`OS.is_stdout_verbose()` returning ``true``), converts one or more arguments of any type to string in the best way possible and prints them to the console. .. rst-class:: classref-item-separator @@ -6543,7 +6573,7 @@ Prints one or more arguments to strings in the best way possible to standard err |void| **printraw**\ (\ ...\ ) |vararg| :ref:`πŸ”—` -Prints one or more arguments to strings in the best way possible to the OS terminal. Unlike :ref:`print`, no newline is automatically added at the end. +Prints one or more arguments to strings in the best way possible to the OS terminal. Unlike :ref:`print()`, no newline is automatically added at the end. \ **Note:** The OS terminal is *not* the same as the editor's Output dock. The output sent to the OS terminal can be seen when running Redot from a terminal. On Windows, this requires using the ``console.exe`` executable. @@ -6552,17 +6582,17 @@ Prints one or more arguments to strings in the best way possible to the OS termi .. code-tab:: gdscript + # Prints "ABC" to terminal. printraw("A") printraw("B") printraw("C") - # Prints ABC to terminal .. code-tab:: csharp + // Prints "ABC" to terminal. GD.PrintRaw("A"); GD.PrintRaw("B"); GD.PrintRaw("C"); - // Prints ABC to terminal @@ -6583,11 +6613,11 @@ Prints one or more arguments to the console with a space between each argument. .. code-tab:: gdscript - prints("A", "B", "C") # Prints A B C + prints("A", "B", "C") # Prints "A B C" .. code-tab:: csharp - GD.PrintS("A", "B", "C"); // Prints A B C + GD.PrintS("A", "B", "C"); // Prints "A B C" @@ -6608,11 +6638,11 @@ Prints one or more arguments to the console with a tab between each argument. .. code-tab:: gdscript - printt("A", "B", "C") # Prints A B C + printt("A", "B", "C") # Prints "A B C" .. code-tab:: csharp - GD.PrintT("A", "B", "C"); // Prints A B C + GD.PrintT("A", "B", "C"); // Prints "A B C" @@ -6633,11 +6663,11 @@ Pushes an error message to Redot's built-in debugger and to the OS terminal. .. code-tab:: gdscript - push_error("test error") # Prints "test error" to debugger and terminal as error call + push_error("test error") # Prints "test error" to debugger and terminal as an error. .. code-tab:: csharp - GD.PushError("test error"); // Prints "test error" to debugger and terminal as error call + GD.PushError("test error"); // Prints "test error" to debugger and terminal as an error. @@ -6660,11 +6690,11 @@ Pushes a warning message to Redot's built-in debugger and to the OS terminal. .. code-tab:: gdscript - push_warning("test warning") # Prints "test warning" to debugger and terminal as warning call + push_warning("test warning") # Prints "test warning" to debugger and terminal as a warning. .. code-tab:: csharp - GD.PushWarning("test warning"); // Prints "test warning" to debugger and terminal as warning call + GD.PushWarning("test warning"); // Prints "test warning" to debugger and terminal as a warning. @@ -6843,7 +6873,7 @@ Returns a random signed 32-bit integer between ``from`` and ``to`` (inclusive). Randomizes the seed (or the internal state) of the random number generator. The current implementation uses a number based on the device's time. -\ **Note:** This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use :ref:`seed` to initialize the random number generator. +\ **Note:** This function is called automatically when the project is run. If you need to fix the seed to have consistent, reproducible results, use :ref:`seed()` to initialize the random number generator. .. rst-class:: classref-item-separator @@ -6855,7 +6885,7 @@ Randomizes the seed (or the internal state) of the random number generator. The :ref:`float` **remap**\ (\ value\: :ref:`float`, istart\: :ref:`float`, istop\: :ref:`float`, ostart\: :ref:`float`, ostop\: :ref:`float`\ ) :ref:`πŸ”—` -Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. See also :ref:`lerp` and :ref:`inverse_lerp`. If ``value`` is outside ``[istart, istop]``, then the resulting value will also be outside ``[ostart, ostop]``. If this is not desired, use :ref:`clamp` on the result of this function. +Maps a ``value`` from range ``[istart, istop]`` to ``[ostart, ostop]``. See also :ref:`lerp()` and :ref:`inverse_lerp()`. If ``value`` is outside ``[istart, istop]``, then the resulting value will also be outside ``[ostart, ostop]``. If this is not desired, use :ref:`clamp()` on the result of this function. :: @@ -6901,7 +6931,7 @@ Creates an RID from a ``base``. This is used mainly from native extensions to bu Rotates ``from`` toward ``to`` by the ``delta`` amount. Will not go past ``to``. -Similar to :ref:`move_toward`, but interpolates correctly when the angles wrap around :ref:`@GDScript.TAU`. +Similar to :ref:`move_toward()`, but interpolates correctly when the angles wrap around :ref:`@GDScript.TAU`. If ``delta`` is negative, this function will rotate away from ``to``, toward the opposite angle, and will not go past the opposite angle. @@ -6923,9 +6953,9 @@ Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0 round(2.5) # Returns 3 round(2.6) # Returns 3 -See also :ref:`floor`, :ref:`ceil`, and :ref:`snapped`. +See also :ref:`floor()`, :ref:`ceil()`, and :ref:`snapped()`. -\ **Note:** For better type safety, use :ref:`roundf`, :ref:`roundi`, :ref:`Vector2.round`, :ref:`Vector3.round`, or :ref:`Vector4.round`. +\ **Note:** For better type safety, use :ref:`roundf()`, :ref:`roundi()`, :ref:`Vector2.round()`, :ref:`Vector3.round()`, or :ref:`Vector4.round()`. .. rst-class:: classref-item-separator @@ -6939,7 +6969,7 @@ See also :ref:`floor`, :ref:`ceil`, returning a :ref:`float`. +A type-safe version of :ref:`round()`, returning a :ref:`float`. .. rst-class:: classref-item-separator @@ -6953,7 +6983,7 @@ A type-safe version of :ref:`round`, returning Rounds ``x`` to the nearest whole number, with halfway cases rounded away from 0. -A type-safe version of :ref:`round`, returning an :ref:`int`. +A type-safe version of :ref:`round()`, returning an :ref:`int`. .. rst-class:: classref-item-separator @@ -6990,6 +7020,118 @@ Sets the seed for the random number generator to ``base``. Setting the seed manu +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_sigmoid: + +.. rst-class:: classref-method + +:ref:`float` **sigmoid**\ (\ x\: :ref:`float`\ ) :ref:`πŸ”—` + +Computes the sigmoid for ``x``, which maps the input value into the range (0, 1). + +The sigmoid function is defined as: + +:: + + sigmoid(x) = 1 / (1 + exp(-x)) + +This is the most accurate implementation of the sigmoid. + +:: + + var result = sigmoid(0.0) # result is 0.5 + var result = sigmoid(1.0) # result is approximately 0.7310 + var result = sigmoid(-1.0) # result is approximately 0.2689 + var result = sigmoid(5.0) # result is approximately 0.9933 + +\ **Note:** For faster but less accurate approximation, see :ref:`sigmoid_approx()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_sigmoid_affine: + +.. rst-class:: classref-method + +:ref:`float` **sigmoid_affine**\ (\ x\: :ref:`float`, amplitude\: :ref:`float`, y_translation\: :ref:`float`\ ) :ref:`πŸ”—` + +Computes an affine-transformed sigmoid for ``x``, which allows scaling by ``amplitude`` and translation by ``y_translation``. + +The affine sigmoid function is defined as: + +:: + + sigmoid_affine(x, amplitude, y_translation) = (amplitude / (1 + exp(-x))) + y_translation + +This function modifies the standard sigmoid by introducing scaling and vertical translation. + +:: + + var result = sigmoid_affine(0.0, 1.0, 0.0) # result is 0.5 + var result = sigmoid_affine(1.0, 2.0, -1.0) # result is approximately 0.4621 + var result = sigmoid_affine(-1.0, 3.0, 2.0) # result is approximately 2.8068 + var result = sigmoid_affine(1.0, 2.0, 2.5) # result is approximately 3.9621 + +\ **Note:** This is a more accurate but computationally heavier version of the affine sigmoid. For faster approximations, see :ref:`sigmoid_affine_approx()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_sigmoid_affine_approx: + +.. rst-class:: classref-method + +:ref:`float` **sigmoid_affine_approx**\ (\ x\: :ref:`float`, amplitude\: :ref:`float`, y_translation\: :ref:`float`\ ) :ref:`πŸ”—` + +Computes an approximation of the affine-transformed sigmoid function for ``x``, allowing scaling by ``amplitude`` and translation by ``y_translation``. + +The approximation function is defined as: + +:: + + affine_sigmoid_approx(x, amplitude, y_translation) = amplitude * (0.5 + (x / (4 + abs(x)))) + y_translation + +This function approximates the affine sigmoid, offering faster computation at the cost of some precision. It is useful in performance-sensitive environments where both transformation and speed are needed. + +:: + + var result = sigmoid_affine_approx(0.0, 1.0, 0.0) # result is 0.5 + var result = sigmoid_affine_approx(2.0, 2.0, 1.0) # result is approximately 2.6667 + var result = sigmoid_affine_approx(-1.0, 3.0, 0.5) # result is 1.4 + var result = sigmoid_affine_approx(1.0, 2.0, 2.5) # result is 3.9 + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GlobalScope_method_sigmoid_approx: + +.. rst-class:: classref-method + +:ref:`float` **sigmoid_approx**\ (\ x\: :ref:`float`\ ) :ref:`πŸ”—` + +Computes an approximation of the sigmoid function for ``x``, which maps the input value into the range (0, 1). + +The approximation function is defined as: + +:: + + sigmoid_approx(x) = 0.5 + (x / (4 + abs(x))) + +This function is faster than the standard :ref:`sigmoid()`, especially useful in performance-sensitive environments where a balance between accuracy and speed is desired. + +:: + + var result = sigmoid_approx(0.0) # result is 0.5 + var result = sigmoid_approx(2.0) # result is approximately 0.8333 + var result = sigmoid_approx(-1.0) # result is 0.3 + var result = sigmoid_approx(5.0) # result is approximately 1.0555 + .. rst-class:: classref-item-separator ---- @@ -7013,7 +7155,7 @@ Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2 sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1) -\ **Note:** For better type safety, use :ref:`signf`, :ref:`signi`, :ref:`Vector2.sign`, :ref:`Vector2i.sign`, :ref:`Vector3.sign`, :ref:`Vector3i.sign`, :ref:`Vector4.sign`, or :ref:`Vector4i.sign`. +\ **Note:** For better type safety, use :ref:`signf()`, :ref:`signi()`, :ref:`Vector2.sign()`, :ref:`Vector2i.sign()`, :ref:`Vector3.sign()`, :ref:`Vector3i.sign()`, :ref:`Vector4.sign()`, or :ref:`Vector4i.sign()`. .. rst-class:: classref-item-separator @@ -7111,7 +7253,7 @@ This S-shaped curve is the cubic Hermite interpolator, given by ``f(y) = 3*y^2 - smoothstep(0, 2, 1.0) # Returns 0.5 smoothstep(0, 2, 2.0) # Returns 1.0 -Compared to :ref:`ease` with a curve value of ``-1.6521``, :ref:`smoothstep` returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use :ref:`Tween` or :ref:`AnimationPlayer`. +Compared to :ref:`ease()` with a curve value of ``-1.6521``, :ref:`smoothstep()` returns the smoothest possible curve with no sudden changes in the derivative. If you need to perform more advanced transitions, use :ref:`Tween` or :ref:`AnimationPlayer`. \ `Comparison between smoothstep() and ease(x, -1.6521) return values `__\ @@ -7138,9 +7280,9 @@ The returned value is the same type of :ref:`Variant` as ``step`` snapped(Vector2(34, 70), Vector2(8, 8)) # Returns (32, 72) -See also :ref:`ceil`, :ref:`floor`, and :ref:`round`. +See also :ref:`ceil()`, :ref:`floor()`, and :ref:`round()`. -\ **Note:** For better type safety, use :ref:`snappedf`, :ref:`snappedi`, :ref:`Vector2.snapped`, :ref:`Vector2i.snapped`, :ref:`Vector3.snapped`, :ref:`Vector3i.snapped`, :ref:`Vector4.snapped`, or :ref:`Vector4i.snapped`. +\ **Note:** For better type safety, use :ref:`snappedf()`, :ref:`snappedi()`, :ref:`Vector2.snapped()`, :ref:`Vector2i.snapped()`, :ref:`Vector3.snapped()`, :ref:`Vector3i.snapped()`, :ref:`Vector4.snapped()`, or :ref:`Vector4i.snapped()`. .. rst-class:: classref-item-separator @@ -7154,7 +7296,7 @@ See also :ref:`ceil`, :ref:`floor`, returning a :ref:`float`. +A type-safe version of :ref:`snapped()`, returning a :ref:`float`. :: @@ -7173,7 +7315,7 @@ A type-safe version of :ref:`snapped`, return Returns the multiple of ``step`` that is the closest to ``x``. -A type-safe version of :ref:`snapped`, returning an :ref:`int`. +A type-safe version of :ref:`snapped()`, returning an :ref:`int`. :: @@ -7198,7 +7340,7 @@ Returns the square root of ``x``, where ``x`` is a non-negative number. sqrt(10.24) # Returns 3.2 sqrt(-1) # Returns NaN -\ **Note:** Negative values of ``x`` return NaN ("Not a Number"). in C#, if you need negative inputs, use ``System.Numerics.Complex``. +\ **Note:** Negative values of ``x`` return NaN ("Not a Number"). In C#, if you need negative inputs, use ``System.Numerics.Complex``. .. rst-class:: classref-item-separator @@ -7247,7 +7389,7 @@ Converts one or more arguments of any :ref:`Variant` type to a :r :ref:`Variant` **str_to_var**\ (\ string\: :ref:`String`\ ) :ref:`πŸ”—` -Converts a formatted ``string`` that was returned by :ref:`var_to_str` to the original :ref:`Variant`. +Converts a formatted ``string`` that was returned by :ref:`var_to_str()` to the original :ref:`Variant`. .. tabs:: @@ -7337,11 +7479,11 @@ Returns a human-readable name of the given ``type``, using the :ref:`Variant.Typ :: - print(TYPE_INT) # Prints 2. - print(type_string(TYPE_INT)) # Prints "int". - print(type_string(TYPE_STRING)) # Prints "String". + print(TYPE_INT) # Prints 2 + print(type_string(TYPE_INT)) # Prints "int" + print(type_string(TYPE_STRING)) # Prints "String" -See also :ref:`typeof`. +See also :ref:`typeof()`. .. rst-class:: classref-item-separator @@ -7360,12 +7502,12 @@ Returns the internal type of the given ``variable``, using the :ref:`Variant.Typ var json = JSON.new() json.parse('["a", "b", "c"]') var result = json.get_data() - if typeof(result) == TYPE_ARRAY: - print(result[0]) # Prints a + if result is Array: + print(result[0]) # Prints "a" else: - print("Unexpected result") + print("Unexpected result!") -See also :ref:`type_string`. +See also :ref:`type_string()`. .. rst-class:: classref-item-separator @@ -7377,9 +7519,9 @@ See also :ref:`type_string`. :ref:`PackedByteArray` **var_to_bytes**\ (\ variable\: :ref:`Variant`\ ) :ref:`πŸ”—` -Encodes a :ref:`Variant` value to a byte array, without encoding objects. Deserialization can be done with :ref:`bytes_to_var`. +Encodes a :ref:`Variant` value to a byte array, without encoding objects. Deserialization can be done with :ref:`bytes_to_var()`. -\ **Note:** If you need object serialization, see :ref:`var_to_bytes_with_objects`. +\ **Note:** If you need object serialization, see :ref:`var_to_bytes_with_objects()`. \ **Note:** Encoding :ref:`Callable` is not supported and will result in an empty value, regardless of the data. @@ -7393,7 +7535,7 @@ Encodes a :ref:`Variant` value to a byte array, without encoding :ref:`PackedByteArray` **var_to_bytes_with_objects**\ (\ variable\: :ref:`Variant`\ ) :ref:`πŸ”—` -Encodes a :ref:`Variant` value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with :ref:`bytes_to_var_with_objects`. +Encodes a :ref:`Variant` value to a byte array. Encoding objects is allowed (and can potentially include executable code). Deserialization can be done with :ref:`bytes_to_var_with_objects()`. \ **Note:** Encoding :ref:`Callable` is not supported and will result in an empty value, regardless of the data. @@ -7407,7 +7549,7 @@ Encodes a :ref:`Variant` value to a byte array. Encoding objects :ref:`String` **var_to_str**\ (\ variable\: :ref:`Variant`\ ) :ref:`πŸ”—` -Converts a :ref:`Variant` ``variable`` to a formatted :ref:`String` that can then be parsed using :ref:`str_to_var`. +Converts a :ref:`Variant` ``variable`` to a formatted :ref:`String` that can then be parsed using :ref:`str_to_var()`. .. tabs:: @@ -7501,9 +7643,9 @@ Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating # Infinite rotation (in radians) angle = wrapf(angle + 0.1, -PI, PI) -\ **Note:** If ``min`` is ``0``, this is equivalent to :ref:`fposmod`, so prefer using that instead. +\ **Note:** If ``min`` is ``0``, this is equivalent to :ref:`fposmod()`, so prefer using that instead. -\ :ref:`wrapf` is more flexible than using the :ref:`fposmod` approach by giving the user control over the minimum value. +\ :ref:`wrapf()` is more flexible than using the :ref:`fposmod()` approach by giving the user control over the minimum value. .. rst-class:: classref-item-separator diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index 40a2d498fa0..a028c3f8f3e 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -17,11 +17,11 @@ A 3D axis-aligned bounding box. Description ----------- -The **AABB** built-in :ref:`Variant` type represents an axis-aligned bounding box in a 3D space. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector3`. It is frequently used for fast overlap tests (see :ref:`intersects`). Although **AABB** itself is axis-aligned, it can be combined with :ref:`Transform3D` to represent a rotated or skewed bounding box. +The **AABB** built-in :ref:`Variant` type represents an axis-aligned bounding box in a 3D space. It is defined by its :ref:`position` and :ref:`size`, which are :ref:`Vector3`. It is frequently used for fast overlap tests (see :ref:`intersects()`). Although **AABB** itself is axis-aligned, it can be combined with :ref:`Transform3D` to represent a rotated or skewed bounding box. It uses floating-point coordinates. The 2D counterpart to **AABB** is :ref:`Rect2`. There is no version of **AABB** that uses integer coordinates. -\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **AABB** methods do not work correctly. Use :ref:`abs` to get an equivalent **AABB** with a non-negative size. +\ **Note:** Negative values for :ref:`size` are not supported. With negative size, most **AABB** methods do not work correctly. Use :ref:`abs()` to get an equivalent **AABB** with a non-negative size. \ **Note:** In a boolean context, a **AABB** evaluates to ``false`` if both :ref:`position` and :ref:`size` are zero (equal to :ref:`Vector3.ZERO`). Otherwise, it always evaluates to ``true``. @@ -189,7 +189,7 @@ The origin point. This is usually the corner on the bottom-left and forward of t The bounding box's width, height, and depth starting from :ref:`position`. Setting this value also affects the :ref:`end` point. -\ **Note:** It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Redot assume that the :ref:`position` is the bottom-left-forward corner, and the :ref:`end` is the top-right-back corner. To get an equivalent bounding box with non-negative size, use :ref:`abs`. +\ **Note:** It's recommended setting the width, height, and depth to non-negative values. This is because most methods in Redot assume that the :ref:`position` is the bottom-left-forward corner, and the :ref:`end` is the top-right-back corner. To get an equivalent bounding box with non-negative size, use :ref:`abs()`. .. rst-class:: classref-section-separator @@ -401,7 +401,7 @@ Returns the longest normalized axis of this bounding box's :ref:`size` and :ref:`get_longest_axis_size`. +See also :ref:`get_longest_axis_index()` and :ref:`get_longest_axis_size()`. .. rst-class:: classref-item-separator @@ -415,7 +415,7 @@ See also :ref:`get_longest_axis_index` Returns the index to the longest axis of this bounding box's :ref:`size` (see :ref:`Vector3.AXIS_X`, :ref:`Vector3.AXIS_Y`, and :ref:`Vector3.AXIS_Z`). -For an example, see :ref:`get_longest_axis`. +For an example, see :ref:`get_longest_axis()`. .. rst-class:: classref-item-separator @@ -429,7 +429,7 @@ For an example, see :ref:`get_longest_axis`. Returns the longest dimension of this bounding box's :ref:`size`. -For an example, see :ref:`get_longest_axis`. +For an example, see :ref:`get_longest_axis()`. .. rst-class:: classref-item-separator @@ -464,7 +464,7 @@ Returns the shortest normalized axis of this bounding box's :ref:`size` and :ref:`get_shortest_axis_size`. +See also :ref:`get_shortest_axis_index()` and :ref:`get_shortest_axis_size()`. .. rst-class:: classref-item-separator @@ -478,7 +478,7 @@ See also :ref:`get_shortest_axis_index` (see :ref:`Vector3.AXIS_X`, :ref:`Vector3.AXIS_Y`, and :ref:`Vector3.AXIS_Z`). -For an example, see :ref:`get_shortest_axis`. +For an example, see :ref:`get_shortest_axis()`. .. rst-class:: classref-item-separator @@ -492,7 +492,7 @@ For an example, see :ref:`get_shortest_axis Returns the shortest dimension of this bounding box's :ref:`size`. -For an example, see :ref:`get_shortest_axis`. +For an example, see :ref:`get_shortest_axis()`. .. rst-class:: classref-item-separator @@ -516,7 +516,7 @@ Returns the vertex's position of this bounding box that's the farthest in the gi :ref:`float` **get_volume**\ (\ ) |const| :ref:`πŸ”—` -Returns the bounding box's volume. This is equivalent to ``size.x * size.y * size.z``. See also :ref:`has_volume`. +Returns the bounding box's volume. This is equivalent to ``size.x * size.y * size.z``. See also :ref:`has_volume()`. .. rst-class:: classref-item-separator @@ -567,7 +567,7 @@ Returns a copy of this bounding box extended on all sides by the given amount `` Returns ``true`` if the bounding box contains the given ``point``. By convention, points exactly on the right, top, and front sides are **not** included. -\ **Note:** This method is not reliable for **AABB** with a *negative* :ref:`size`. Use :ref:`abs` first to get a valid bounding box. +\ **Note:** This method is not reliable for **AABB** with a *negative* :ref:`size`. Use :ref:`abs()` first to get a valid bounding box. .. rst-class:: classref-item-separator @@ -591,7 +591,7 @@ Returns ``true`` if this bounding box has a surface or a length, that is, at lea :ref:`bool` **has_volume**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this bounding box's width, height, and depth are all positive. See also :ref:`get_volume`. +Returns ``true`` if this bounding box's width, height, and depth are all positive. See also :ref:`get_volume()`. .. rst-class:: classref-item-separator @@ -603,7 +603,7 @@ Returns ``true`` if this bounding box's width, height, and depth are all positiv :ref:`AABB` **intersection**\ (\ with\: :ref:`AABB`\ ) |const| :ref:`πŸ”—` -Returns the intersection between this bounding box and ``with``. If the boxes do not intersect, returns an empty **AABB**. If the boxes intersect at the edge, returns a flat **AABB** with no volume (see :ref:`has_surface` and :ref:`has_volume`). +Returns the intersection between this bounding box and ``with``. If the boxes do not intersect, returns an empty **AABB**. If the boxes intersect at the edge, returns a flat **AABB** with no volume (see :ref:`has_surface()` and :ref:`has_volume()`). .. tabs:: @@ -628,7 +628,7 @@ Returns the intersection between this bounding box and ``with``. If the boxes do -\ **Note:** If you only need to know whether two bounding boxes are intersecting, use :ref:`intersects`, instead. +\ **Note:** If you only need to know whether two bounding boxes are intersecting, use :ref:`intersects()`, instead. .. rst-class:: classref-item-separator @@ -692,7 +692,7 @@ The segment begins at ``from`` and ends at ``to``. :ref:`bool` **is_equal_approx**\ (\ aabb\: :ref:`AABB`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by calling :ref:`Vector3.is_equal_approx` on the :ref:`position` and the :ref:`size`. +Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by calling :ref:`Vector3.is_equal_approx()` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -704,7 +704,7 @@ Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by c :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this bounding box's values are finite, by calling :ref:`Vector3.is_finite` on the :ref:`position` and the :ref:`size`. +Returns ``true`` if this bounding box's values are finite, by calling :ref:`Vector3.is_finite()` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -716,7 +716,7 @@ Returns ``true`` if this bounding box's values are finite, by calling :ref:`Vect :ref:`AABB` **merge**\ (\ with\: :ref:`AABB`\ ) |const| :ref:`πŸ”—` -Returns an **AABB** that encloses both this bounding box and ``with`` around the edges. See also :ref:`encloses`. +Returns an **AABB** that encloses both this bounding box and ``with`` around the edges. See also :ref:`encloses()`. .. rst-class:: classref-section-separator @@ -735,7 +735,7 @@ Operator Descriptions Returns ``true`` if the :ref:`position` or :ref:`size` of both bounding boxes are not equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -749,9 +749,9 @@ Returns ``true`` if the :ref:`position` or :ref:`s Inversely transforms (multiplies) the **AABB** by the given :ref:`Transform3D` transformation matrix, under the assumption that the transformation basis is orthonormal (i.e. rotation/reflection is fine, scaling/skew is not). -\ ``aabb * transform`` is equivalent to ``transform.inverse() * aabb``. See :ref:`Transform3D.inverse`. +\ ``aabb * transform`` is equivalent to ``transform.inverse() * aabb``. See :ref:`Transform3D.inverse()`. -For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * aabb`` can be used instead. See :ref:`Transform3D.affine_inverse`. +For transforming by inverse of an affine transformation (e.g. with scaling) ``transform.affine_inverse() * aabb`` can be used instead. See :ref:`Transform3D.affine_inverse()`. .. rst-class:: classref-item-separator @@ -765,7 +765,7 @@ For transforming by inverse of an affine transformation (e.g. with scaling) ``tr Returns ``true`` if both :ref:`position` and :ref:`size` of the bounding boxes are exactly equal, respectively. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. |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_acceptdialog.rst b/classes/class_acceptdialog.rst index af919102802..f79caa86b1b 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -21,7 +21,7 @@ A base dialog used for user notification. Description ----------- -The default use of **AcceptDialog** is to allow it to only be accepted or closed, with the same result. However, the :ref:`confirmed` and :ref:`canceled` signals allow to make the two actions different, and the :ref:`add_button` method allows to add custom buttons and actions. +The default use of **AcceptDialog** is to allow it to only be accepted or closed, with the same result. However, the :ref:`confirmed` and :ref:`canceled` signals allow to make the two actions different, and the :ref:`add_button()` method allows to add custom buttons and actions. .. rst-class:: classref-reftable-group @@ -44,7 +44,11 @@ Properties +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`bool` | keep_title_visible | ``true`` (overrides :ref:`Window`) | +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`ok_button_text` | ``"OK"`` | + | :ref:`bool` | maximize_disabled | ``true`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | minimize_disabled | ``true`` (overrides :ref:`Window`) | + +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ok_button_text` | ``""`` | +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`String` | title | ``"Alert!"`` (overrides :ref:`Window`) | +-----------------------------+-----------------------------------------------------------------------------------+------------------------------------------------------------------------------+ @@ -110,7 +114,7 @@ Signals **canceled**\ (\ ) :ref:`πŸ”—` -Emitted when the dialog is closed or the button created with :ref:`add_cancel_button` is pressed. +Emitted when the dialog is closed or the button created with :ref:`add_cancel_button()` is pressed. .. rst-class:: classref-item-separator @@ -134,7 +138,7 @@ Emitted when the dialog is accepted, i.e. the OK button is pressed. **custom_action**\ (\ action\: :ref:`StringName`\ ) :ref:`πŸ”—` -Emitted when a custom button is pressed. See :ref:`add_button`. +Emitted when a custom button is pressed. See :ref:`add_button()`. .. rst-class:: classref-section-separator @@ -219,14 +223,14 @@ The text displayed by the dialog. .. rst-class:: classref-property -:ref:`String` **ok_button_text** = ``"OK"`` :ref:`πŸ”—` +:ref:`String` **ok_button_text** = ``""`` :ref:`πŸ”—` .. rst-class:: classref-property-setget - |void| **set_ok_button_text**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_ok_button_text**\ (\ ) -The text displayed by the OK button (see :ref:`get_ok_button`). +The text displayed by the OK button (see :ref:`get_ok_button()`). If empty, a default text will be used. .. rst-class:: classref-section-separator @@ -247,7 +251,7 @@ Adds a button with label ``text`` and a custom ``action`` to the dialog and retu If ``true``, ``right`` will place the button to the right of any sibling buttons. -You can use :ref:`remove_button` method to remove a button created with this method from the dialog. +You can use :ref:`remove_button()` method to remove a button created with this method from the dialog. .. rst-class:: classref-item-separator @@ -261,7 +265,7 @@ You can use :ref:`remove_button` method Adds a button with label ``name`` and a cancel action to the dialog and returns the created button. -You can use :ref:`remove_button` method to remove a button created with this method from the dialog. +You can use :ref:`remove_button()` method to remove a button created with this method from the dialog. .. rst-class:: classref-item-separator @@ -313,7 +317,7 @@ Registers a :ref:`LineEdit` in the dialog. When the enter key is |void| **remove_button**\ (\ button\: :ref:`Button`\ ) :ref:`πŸ”—` -Removes the ``button`` from the dialog. Does NOT free the ``button``. The ``button`` must be a :ref:`Button` added with :ref:`add_button` or :ref:`add_cancel_button` method. After removal, pressing the ``button`` will no longer emit this dialog's :ref:`custom_action` or :ref:`canceled` signals. +Removes the ``button`` from the dialog. Does NOT free the ``button``. The ``button`` must be a :ref:`Button` added with :ref:`add_button()` or :ref:`add_cancel_button()` method. After removal, pressing the ``button`` will no longer emit this dialog's :ref:`custom_action` or :ref:`canceled` signals. .. rst-class:: classref-section-separator diff --git a/classes/class_aescontext.rst b/classes/class_aescontext.rst index eee208b5c2d..548be3b2145 100644 --- a/classes/class_aescontext.rst +++ b/classes/class_aescontext.rst @@ -184,7 +184,7 @@ Method Descriptions |void| **finish**\ (\ ) :ref:`πŸ”—` -Close this AES context so it can be started again. See :ref:`start`. +Close this AES context so it can be started again. See :ref:`start()`. .. rst-class:: classref-item-separator @@ -196,7 +196,7 @@ Close this AES context so it can be started again. See :ref:`start` **get_iv_state**\ (\ ) :ref:`πŸ”—` -Get the current IV state for this context (IV gets updated when calling :ref:`update`). You normally don't need this function. +Get the current IV state for this context (IV gets updated when calling :ref:`update()`). You normally don't need this function. \ **Note:** This function only makes sense when the context is started with :ref:`MODE_CBC_ENCRYPT` or :ref:`MODE_CBC_DECRYPT`. @@ -222,7 +222,7 @@ Start the AES context in the given ``mode``. A ``key`` of either 16 or 32 bytes :ref:`PackedByteArray` **update**\ (\ src\: :ref:`PackedByteArray`\ ) :ref:`πŸ”—` -Run the desired operation for this AES context. Will return a :ref:`PackedByteArray` containing the result of encrypting (or decrypting) the given ``src``. See :ref:`start` for mode of operation. +Run the desired operation for this AES context. Will return a :ref:`PackedByteArray` containing the result of encrypting (or decrypting) the given ``src``. See :ref:`start()` for mode of operation. \ **Note:** The size of ``src`` must be a multiple of 16. Apply some padding if needed. diff --git a/classes/class_animatablebody2d.rst b/classes/class_animatablebody2d.rst index b340bb7c53c..16144325307 100644 --- a/classes/class_animatablebody2d.rst +++ b/classes/class_animatablebody2d.rst @@ -55,7 +55,7 @@ Property Descriptions - |void| **set_sync_to_physics**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_sync_to_physics_enabled**\ (\ ) -If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody2D.move_and_collide`. +If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody2D.move_and_collide()`. .. |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_animatablebody3d.rst b/classes/class_animatablebody3d.rst index 24aeddf877d..0f686b25afe 100644 --- a/classes/class_animatablebody3d.rst +++ b/classes/class_animatablebody3d.rst @@ -66,7 +66,7 @@ Property Descriptions - |void| **set_sync_to_physics**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_sync_to_physics_enabled**\ (\ ) -If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody3D.move_and_collide`. +If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody3D.move_and_collide()`. .. |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_animatedsprite2d.rst b/classes/class_animatedsprite2d.rst index e888e1f645c..134c345565a 100644 --- a/classes/class_animatedsprite2d.rst +++ b/classes/class_animatedsprite2d.rst @@ -258,7 +258,7 @@ If ``true``, texture is flipped vertically. - |void| **set_frame**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_frame**\ (\ ) -The displayed animation frame's index. Setting this property also resets :ref:`frame_progress`. If this is not desired, use :ref:`set_frame_and_progress`. +The displayed animation frame's index. Setting this property also resets :ref:`frame_progress`. If this is not desired, use :ref:`set_frame_and_progress()`. .. rst-class:: classref-item-separator @@ -345,7 +345,7 @@ Method Descriptions :ref:`float` **get_playing_speed**\ (\ ) |const| :ref:`πŸ”—` -Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play` method. +Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play()` method. Returns a negative value if the current animation is playing backwards. @@ -371,9 +371,9 @@ Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale |void| **pause**\ (\ ) :ref:`πŸ”—` -Pauses the currently playing animation. The :ref:`frame` and :ref:`frame_progress` will be kept and calling :ref:`play` or :ref:`play_backwards` without arguments will resume the animation from the current playback position. +Pauses the currently playing animation. The :ref:`frame` and :ref:`frame_progress` will be kept and calling :ref:`play()` or :ref:`play_backwards()` without arguments will resume the animation from the current playback position. -See also :ref:`stop`. +See also :ref:`stop()`. .. rst-class:: classref-item-separator @@ -385,7 +385,7 @@ See also :ref:`stop`. |void| **play**\ (\ name\: :ref:`StringName` = &"", custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Plays the animation with key ``name``. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards`). +Plays the animation with key ``name``. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards()`). If this method is called with that same animation ``name``, or with no ``name`` parameter, the assigned animation will resume playing if it was paused. @@ -401,7 +401,7 @@ If this method is called with that same animation ``name``, or with no ``name`` Plays the animation with key ``name`` in reverse. -This method is a shorthand for :ref:`play` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. +This method is a shorthand for :ref:`play()` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. .. rst-class:: classref-item-separator @@ -413,7 +413,7 @@ This method is a shorthand for :ref:`play` w |void| **set_frame_and_progress**\ (\ frame\: :ref:`int`, progress\: :ref:`float`\ ) :ref:`πŸ”—` -Sets :ref:`frame` the :ref:`frame_progress` to the given values. Unlike setting :ref:`frame`, this method does not reset the :ref:`frame_progress` to ``0.0`` implicitly. +Sets :ref:`frame` and :ref:`frame_progress` to the given values. Unlike setting :ref:`frame`, this method does not reset the :ref:`frame_progress` to ``0.0`` implicitly. \ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`: @@ -439,7 +439,7 @@ Sets :ref:`frame` the :ref:`frame_progres |void| **stop**\ (\ ) :ref:`πŸ”—` -Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause`. +Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause()`. .. |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_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index 955ff4b2422..de1ab95c1cd 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -195,7 +195,7 @@ The key of the animation to play when the scene loads. - |void| **set_frame**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_frame**\ (\ ) -The displayed animation frame's index. Setting this property also resets :ref:`frame_progress`. If this is not desired, use :ref:`set_frame_and_progress`. +The displayed animation frame's index. Setting this property also resets :ref:`frame_progress`. If this is not desired, use :ref:`set_frame_and_progress()`. .. rst-class:: classref-item-separator @@ -265,7 +265,7 @@ Method Descriptions :ref:`float` **get_playing_speed**\ (\ ) |const| :ref:`πŸ”—` -Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play` method. +Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play()` method. Returns a negative value if the current animation is playing backwards. @@ -291,9 +291,9 @@ Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale |void| **pause**\ (\ ) :ref:`πŸ”—` -Pauses the currently playing animation. The :ref:`frame` and :ref:`frame_progress` will be kept and calling :ref:`play` or :ref:`play_backwards` without arguments will resume the animation from the current playback position. +Pauses the currently playing animation. The :ref:`frame` and :ref:`frame_progress` will be kept and calling :ref:`play()` or :ref:`play_backwards()` without arguments will resume the animation from the current playback position. -See also :ref:`stop`. +See also :ref:`stop()`. .. rst-class:: classref-item-separator @@ -305,7 +305,7 @@ See also :ref:`stop`. |void| **play**\ (\ name\: :ref:`StringName` = &"", custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Plays the animation with key ``name``. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards`). +Plays the animation with key ``name``. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards()`). If this method is called with that same animation ``name``, or with no ``name`` parameter, the assigned animation will resume playing if it was paused. @@ -321,7 +321,7 @@ If this method is called with that same animation ``name``, or with no ``name`` Plays the animation with key ``name`` in reverse. -This method is a shorthand for :ref:`play` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. +This method is a shorthand for :ref:`play()` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. .. rst-class:: classref-item-separator @@ -333,7 +333,7 @@ This method is a shorthand for :ref:`play` w |void| **set_frame_and_progress**\ (\ frame\: :ref:`int`, progress\: :ref:`float`\ ) :ref:`πŸ”—` -Sets :ref:`frame` the :ref:`frame_progress` to the given values. Unlike setting :ref:`frame`, this method does not reset the :ref:`frame_progress` to ``0.0`` implicitly. +Sets :ref:`frame` and :ref:`frame_progress` to the given values. Unlike setting :ref:`frame`, this method does not reset the :ref:`frame_progress` to ``0.0`` implicitly. \ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`: @@ -359,7 +359,7 @@ Sets :ref:`frame` the :ref:`frame_progres |void| **stop**\ (\ ) :ref:`πŸ”—` -Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause`. +Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause()`. .. |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_animatedtexture.rst b/classes/class_animatedtexture.rst index 88e6f86fdff..deee373a06c 100644 --- a/classes/class_animatedtexture.rst +++ b/classes/class_animatedtexture.rst @@ -23,7 +23,7 @@ Description **AnimatedTexture** is a resource format for frame-based animations, where multiple textures can be chained automatically with a predefined delay for each frame. Unlike :ref:`AnimationPlayer` or :ref:`AnimatedSprite2D`, it isn't a :ref:`Node`, but has the advantage of being usable anywhere a :ref:`Texture2D` resource can be used, e.g. in a :ref:`TileSet`. -The playback of the animation is controlled by the :ref:`speed_scale` property, as well as each frame's duration (see :ref:`set_frame_duration`). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. +The playback of the animation is controlled by the :ref:`speed_scale` property, as well as each frame's duration (see :ref:`set_frame_duration()`). The animation loops, i.e. it will restart at frame 0 automatically after playing the last frame. \ **AnimatedTexture** currently requires all frame textures to have the same size, otherwise the bigger ones will be cropped to match the smallest one. @@ -125,7 +125,7 @@ Sets the currently visible frame of the texture. Setting this frame while playin - |void| **set_frames**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_frames**\ (\ ) -Number of frames to use in the animation. While you can create the frames independently with :ref:`set_frame_texture`, you need to set this value for the animation to take new frames into account. The maximum number of frames is :ref:`MAX_FRAMES`. +Number of frames to use in the animation. While you can create the frames independently with :ref:`set_frame_texture()`, you need to set this value for the animation to take new frames into account. The maximum number of frames is :ref:`MAX_FRAMES`. .. rst-class:: classref-item-separator diff --git a/classes/class_animation.rst b/classes/class_animation.rst index 6b36f7834d9..bd059169a33 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -416,7 +416,7 @@ Update at the keyframes. :ref:`UpdateMode` **UPDATE_CAPTURE** = ``2`` -Same as :ref:`UPDATE_CONTINUOUS` but works as a flag to capture the value of the current object and perform interpolation in some methods. See also :ref:`AnimationMixer.capture`, :ref:`AnimationPlayer.playback_auto_capture`, and :ref:`AnimationPlayer.play_with_capture`. +Same as :ref:`UPDATE_CONTINUOUS` but works as a flag to capture the value of the current object and perform interpolation in some methods. See also :ref:`AnimationMixer.capture()`, :ref:`AnimationPlayer.playback_auto_capture`, and :ref:`AnimationPlayer.play_with_capture()`. .. rst-class:: classref-item-separator @@ -917,7 +917,7 @@ Clear the animation (clear all tracks and reset all). |void| **compress**\ (\ page_size\: :ref:`int` = 8192, fps\: :ref:`int` = 120, split_tolerance\: :ref:`float` = 4.0\ ) :ref:`πŸ”—` -Compress the animation and all its tracks in-place. This will make :ref:`track_is_compressed` return ``true`` once called on this **Animation**. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions. +Compress the animation and all its tracks in-place. This will make :ref:`track_is_compressed()` return ``true`` once called on this **Animation**. Compressed tracks require less memory to be played, and are designed to be used for complex 3D animations (such as cutscenes) imported from external 3D software. Compression is lossy, but the difference is usually not noticeable in real world conditions. \ **Note:** Compressed tracks have various limitations (such as not being editable from the editor), so only use compressed animations if you actually need them. @@ -1261,7 +1261,7 @@ Returns the time at which the key is located. :ref:`float` **track_get_key_transition**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease`). +Returns the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease()`). .. rst-class:: classref-item-separator @@ -1285,7 +1285,7 @@ Returns the value of a given key in a given track. :ref:`NodePath` **track_get_path**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Gets the path of a track. For more information on the path format, see :ref:`track_set_path`. +Gets the path of a track. For more information on the path format, see :ref:`track_set_path()`. .. rst-class:: classref-item-separator @@ -1321,7 +1321,7 @@ Inserts a generic key in a given track. Returns the key index. :ref:`bool` **track_is_compressed**\ (\ track_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the track is compressed, ``false`` otherwise. See also :ref:`compress`. +Returns ``true`` if the track is compressed, ``false`` otherwise. See also :ref:`compress()`. .. rst-class:: classref-item-separator @@ -1477,7 +1477,7 @@ Sets the time of an existing key. |void| **track_set_key_transition**\ (\ track_idx\: :ref:`int`, key_idx\: :ref:`int`, transition\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease`). +Sets the transition curve (easing) for a specific key (see the built-in math function :ref:`@GlobalScope.ease()`). .. rst-class:: classref-item-separator @@ -1541,7 +1541,7 @@ Returns the update mode of a value track. Returns the interpolated value at the given time (in seconds). The ``track_idx`` must be the index of a value track. -A ``backward`` mainly affects the direction of key retrieval of the track with :ref:`UPDATE_DISCRETE` converted by :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS` to match the result with :ref:`track_find_key`. +A ``backward`` mainly affects the direction of key retrieval of the track with :ref:`UPDATE_DISCRETE` converted by :ref:`AnimationMixer.ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS` to match the result with :ref:`track_find_key()`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index 9bab5d9b10c..cc6b6e9e303 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -179,7 +179,7 @@ Notifies when an animation starts playing. **caches_cleared**\ (\ ) :ref:`πŸ”—` -Notifies when the caches have been cleared, either automatically, or manually via :ref:`clear_caches`. +Notifies when the caches have been cleared, either automatically, or manually via :ref:`clear_caches()`. .. rst-class:: classref-item-separator @@ -242,7 +242,7 @@ Process animation during process frames (see :ref:`Node.NOTIFICATION_INTERNAL_PR :ref:`AnimationCallbackModeProcess` **ANIMATION_CALLBACK_MODE_PROCESS_MANUAL** = ``2`` -Do not process animation. Use :ref:`advance` to process the animation manually. +Do not process animation. Use :ref:`advance()` to process the animation manually. .. rst-class:: classref-item-separator @@ -487,7 +487,7 @@ This makes it more convenient to preview and edit animations in the editor, as c - |void| **set_root_motion_local**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_root_motion_local**\ (\ ) -If ``true``, :ref:`get_root_motion_position` value is extracted as a local translation value before blending. In other words, it is treated like the translation is done after the rotation. +If ``true``, :ref:`get_root_motion_position()` value is extracted as a local translation value before blending. In other words, it is treated like the translation is done after the rotation. .. rst-class:: classref-item-separator @@ -504,9 +504,9 @@ If ``true``, :ref:`get_root_motion_position`\ ) - :ref:`NodePath` **get_root_motion_track**\ (\ ) -The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. The :ref:`root_motion_track` uses the same format as :ref:`Animation.track_set_path`, but note that a bone must be specified. +The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. The :ref:`root_motion_track` uses the same format as :ref:`Animation.track_set_path()`, but note that a bone must be specified. -If the track has type :ref:`Animation.TYPE_POSITION_3D`, :ref:`Animation.TYPE_ROTATION_3D`, or :ref:`Animation.TYPE_SCALE_3D` the transformation will be canceled visually, and the animation will appear to stay in place. See also :ref:`get_root_motion_position`, :ref:`get_root_motion_rotation`, :ref:`get_root_motion_scale`, and :ref:`RootMotionView`. +If the track has type :ref:`Animation.TYPE_POSITION_3D`, :ref:`Animation.TYPE_ROTATION_3D`, or :ref:`Animation.TYPE_SCALE_3D` the transformation will be canceled visually, and the animation will appear to stay in place. See also :ref:`get_root_motion_position()`, :ref:`get_root_motion_rotation()`, :ref:`get_root_motion_scale()`, and :ref:`RootMotionView`. .. rst-class:: classref-item-separator @@ -604,7 +604,7 @@ You can specify ``trans_type`` as the curve for the interpolation. For better re |void| **clear_caches**\ (\ ) :ref:`πŸ”—` -**AnimationMixer** caches animated nodes. It may not notice if a node disappears; :ref:`clear_caches` forces it to update the cache again. +**AnimationMixer** caches animated nodes. It may not notice if a node disappears; :ref:`clear_caches()` forces it to update the cache again. .. rst-class:: classref-item-separator @@ -715,7 +715,7 @@ The most basic example is applying position to :ref:`CharacterBody3D`, you can apply the root motion position more correctly to account for the rotation of the node. +By using this in combination with :ref:`get_root_motion_rotation_accumulator()`, you can apply the root motion position more correctly to account for the rotation of the node. .. tabs:: @@ -732,7 +732,7 @@ By using this in combination with :ref:`get_root_motion_rotation_accumulator` is ``true``, return the pre-multiplied translation value with the inverted rotation. +If :ref:`root_motion_local` is ``true``, returns the pre-multiplied translation value with the inverted rotation. In this case, the code can be written as follows: @@ -828,7 +828,7 @@ The most basic example is applying rotation to :ref:`CharacterBody3D` as a :ref:`Quaternion` that can be used elsewhere. -This is necessary to apply the root motion position correctly, taking rotation into account. See also :ref:`get_root_motion_position`. +This is necessary to apply the root motion position correctly, taking rotation into account. See also :ref:`get_root_motion_position()`. Also, this is useful in cases where you want to respect the initial key values of the animation. diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index f4a0255037f..d1e14bcf93c 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -31,9 +31,9 @@ You can access the time information as read-only parameter which is processed an :: - var current_length = $AnimationTree[parameters/AnimationNodeName/current_length] - var current_position = $AnimationTree[parameters/AnimationNodeName/current_position] - var current_delta = $AnimationTree[parameters/AnimationNodeName/current_delta] + var current_length = $AnimationTree["parameters/AnimationNodeName/current_length"] + var current_position = $AnimationTree["parameters/AnimationNodeName/current_position"] + var current_delta = $AnimationTree["parameters/AnimationNodeName/current_delta"] .. rst-class:: classref-introduction-group @@ -283,7 +283,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen :ref:`Array` **_get_parameter_list**\ (\ ) |virtual| |const| :ref:`πŸ”—` -When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a list of the properties on this animation node. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. Format is similar to :ref:`Object.get_property_list`. +When inheriting from :ref:`AnimationRootNode`, implement this virtual method to return a list of the properties on this animation node. Parameters are custom local memory used for your animation nodes, given a resource can be reused in multiple trees. Format is similar to :ref:`Object.get_property_list()`. .. rst-class:: classref-item-separator @@ -323,7 +323,7 @@ When inheriting from :ref:`AnimationRootNode`, implemen When inheriting from :ref:`AnimationRootNode`, implement this virtual method to run some code when this animation node is processed. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. -Here, call the :ref:`blend_input`, :ref:`blend_node` or :ref:`blend_animation` functions. You can also use :ref:`get_parameter` and :ref:`set_parameter` to modify local memory. +Here, call the :ref:`blend_input()`, :ref:`blend_node()` or :ref:`blend_animation()` functions. You can also use :ref:`get_parameter()` and :ref:`set_parameter()` to modify local memory. This function should return the delta. @@ -437,7 +437,7 @@ Gets the value of a parameter. Parameters are custom local memory used for your Returns the object id of the :ref:`AnimationTree` that owns this node. -\ **Note:** This method should only be called from within the :ref:`AnimationNodeExtension._process_animation_node` method, and will return an invalid id otherwise. +\ **Note:** This method should only be called from within the :ref:`AnimationNodeExtension._process_animation_node()` method, and will return an invalid id otherwise. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index dc8fd4cf175..72c72173231 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -111,7 +111,7 @@ Property Descriptions If ``true``, on receiving a request to play an animation from the start, the first frame is not drawn, but only processed, and playback starts from the next frame. -See also the notes of :ref:`AnimationPlayer.play`. +See also the notes of :ref:`AnimationPlayer.play()`. .. rst-class:: classref-item-separator @@ -147,7 +147,7 @@ Animation to use as an output. It is one of the animations provided by :ref:`Ani If :ref:`use_custom_timeline` is ``true``, override the loop settings of the original :ref:`Animation` resource with the value. -\ **Note:** If the :ref:`Animation.loop_mode` isn't set to looping, the :ref:`Animation.track_set_interpolation_loop_wrap` option will not be respected. If you cannot get the expected behavior, consider duplicating the :ref:`Animation` resource and changing the loop settings. +\ **Note:** If the :ref:`Animation.loop_mode` isn't set to looping, the :ref:`Animation.track_set_interpolation_loop_wrap()` option will not be respected. If you cannot get the expected behavior, consider duplicating the :ref:`Animation` resource and changing the loop settings. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeblendspace1d.rst b/classes/class_animationnodeblendspace1d.rst index 8c7183c18ce..ecc0999374e 100644 --- a/classes/class_animationnodeblendspace1d.rst +++ b/classes/class_animationnodeblendspace1d.rst @@ -21,7 +21,7 @@ Description A resource used by :ref:`AnimationNodeBlendTree`. -\ **AnimationNodeBlendSpace1D** represents a virtual axis on which any type of :ref:`AnimationRootNode`\ s can be added using :ref:`add_blend_point`. Outputs the linear blend of the two :ref:`AnimationRootNode`\ s adjacent to the current value. +\ **AnimationNodeBlendSpace1D** represents a virtual axis on which any type of :ref:`AnimationRootNode`\ s can be added using :ref:`add_blend_point()`. Outputs the linear blend of the two :ref:`AnimationRootNode`\ s adjacent to the current value. You can set the extents of the axis with :ref:`min_space` and :ref:`max_space`. @@ -154,7 +154,7 @@ Controls the interpolation between animations. See :ref:`BlendMode`\ ) - :ref:`float` **get_max_space**\ (\ ) -The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point`. +The blend space's axis's upper limit for the points' position. See :ref:`add_blend_point()`. .. rst-class:: classref-item-separator @@ -171,7 +171,7 @@ The blend space's axis's upper limit for the points' position. See :ref:`add_ble - |void| **set_min_space**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_min_space**\ (\ ) -The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point`. +The blend space's axis's lower limit for the points' position. See :ref:`add_blend_point()`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index e653157a7f2..a01f7c5d574 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -23,7 +23,7 @@ A resource used by :ref:`AnimationNodeBlendTree`. \ **AnimationNodeBlendSpace2D** represents a virtual 2D space on which :ref:`AnimationRootNode`\ s are placed. Outputs the linear blend of the three adjacent animations using a :ref:`Vector2` weight. Adjacent in this context means the three :ref:`AnimationRootNode`\ s making up the triangle that contains the current value. -You can add vertices to the blend space with :ref:`add_blend_point` and automatically triangulate it by setting :ref:`auto_triangles` to ``true``. Otherwise, use :ref:`add_triangle` and :ref:`remove_triangle` to triangulate the blend space by hand. +You can add vertices to the blend space with :ref:`add_blend_point()` and automatically triangulate it by setting :ref:`auto_triangles` to ``true``. Otherwise, use :ref:`add_triangle()` and :ref:`remove_triangle()` to triangulate the blend space by hand. .. rst-class:: classref-introduction-group @@ -168,7 +168,7 @@ Property Descriptions - |void| **set_auto_triangles**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_auto_triangles**\ (\ ) -If ``true``, the blend space is triangulated automatically. The mesh updates every time you add or remove points with :ref:`add_blend_point` and :ref:`remove_blend_point`. +If ``true``, the blend space is triangulated automatically. The mesh updates every time you add or remove points with :ref:`add_blend_point()` and :ref:`remove_blend_point()`. .. rst-class:: classref-item-separator @@ -202,7 +202,7 @@ Controls the interpolation between animations. See :ref:`BlendMode`\ ) - :ref:`Vector2` **get_max_space**\ (\ ) -The blend space's X and Y axes' upper limit for the points' position. See :ref:`add_blend_point`. +The blend space's X and Y axes' upper limit for the points' position. See :ref:`add_blend_point()`. .. rst-class:: classref-item-separator @@ -219,7 +219,7 @@ The blend space's X and Y axes' upper limit for the points' position. See :ref:` - |void| **set_min_space**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_min_space**\ (\ ) -The blend space's X and Y axes' lower limit for the points' position. See :ref:`add_blend_point`. +The blend space's X and Y axes' lower limit for the points' position. See :ref:`add_blend_point()`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeblendtree.rst b/classes/class_animationnodeblendtree.rst index 2a4715e0355..14ade721f0b 100644 --- a/classes/class_animationnodeblendtree.rst +++ b/classes/class_animationnodeblendtree.rst @@ -50,25 +50,27 @@ Methods .. table:: :widths: auto - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_node`\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`, position\: :ref:`Vector2` = Vector2(0, 0)\ ) | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`connect_node`\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`, output_node\: :ref:`StringName`\ ) | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`disconnect_node`\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`\ ) | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AnimationNode` | :ref:`get_node`\ (\ name\: :ref:`StringName`\ ) |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_node_position`\ (\ name\: :ref:`StringName`\ ) |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_node`\ (\ name\: :ref:`StringName`\ ) |const| | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`remove_node`\ (\ name\: :ref:`StringName`\ ) | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`rename_node`\ (\ name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_node_position`\ (\ name\: :ref:`StringName`, position\: :ref:`Vector2`\ ) | - +-------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_node`\ (\ name\: :ref:`StringName`, node\: :ref:`AnimationNode`, position\: :ref:`Vector2` = Vector2(0, 0)\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`connect_node`\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`, output_node\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`disconnect_node`\ (\ input_node\: :ref:`StringName`, input_index\: :ref:`int`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimationNode` | :ref:`get_node`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`StringName`\] | :ref:`get_node_list`\ (\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_node_position`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_node`\ (\ name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`remove_node`\ (\ name\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`rename_node`\ (\ name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_node_position`\ (\ name\: :ref:`StringName`, position\: :ref:`Vector2`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -223,6 +225,18 @@ Returns the sub animation node with the specified ``name``. ---- +.. _class_AnimationNodeBlendTree_method_get_node_list: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`StringName`\] **get_node_list**\ (\ ) |const| :ref:`πŸ”—` + +Returns a list containing the names of all sub animation nodes in this blend tree. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeBlendTree_method_get_node_position: .. rst-class:: classref-method diff --git a/classes/class_animationnodeextension.rst b/classes/class_animationnodeextension.rst index 3d835dd0d0e..9ec68213cf7 100644 --- a/classes/class_animationnodeextension.rst +++ b/classes/class_animationnodeextension.rst @@ -54,7 +54,7 @@ Method Descriptions :ref:`PackedFloat32Array` **_process_animation_node**\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -A version of the :ref:`AnimationNode._process` method that is meant to be overridden by custom nodes. It returns a :ref:`PackedFloat32Array` with the processed animation data. +A version of the :ref:`AnimationNode._process()` method that is meant to be overridden by custom nodes. It returns a :ref:`PackedFloat32Array` with the processed animation data. The :ref:`PackedFloat64Array` parameter contains the playback information, containing the following values encoded as floating point numbers (in order): playback time and delta, start and end times, whether a seek was requested (encoded as a float greater than ``0``), whether the seek request was externally requested (encoded as a float greater than ``0``), the current :ref:`LoopedFlag` (encoded as a float), and the current blend weight. diff --git a/classes/class_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index 5489e848d41..29b25e0834b 100644 --- a/classes/class_animationnodestatemachine.rst +++ b/classes/class_animationnodestatemachine.rst @@ -76,6 +76,8 @@ Methods +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`AnimationNode` | :ref:`get_node`\ (\ name\: :ref:`StringName`\ ) |const| | +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`StringName`\] | :ref:`get_node_list`\ (\ ) |const| | + +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`StringName` | :ref:`get_node_name`\ (\ node\: :ref:`AnimationNode`\ ) |const| | +---------------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_node_position`\ (\ name\: :ref:`StringName`\ ) |const| | @@ -166,7 +168,7 @@ Property Descriptions - |void| **set_allow_transition_to_self**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_allow_transition_to_self**\ (\ ) -If ``true``, allows teleport to the self state with :ref:`AnimationNodeStateMachinePlayback.travel`. When the reset option is enabled in :ref:`AnimationNodeStateMachinePlayback.travel`, the animation is restarted. If ``false``, nothing happens on the teleportation to the self state. +If ``true``, allows teleport to the self state with :ref:`AnimationNodeStateMachinePlayback.travel()`. When the reset option is enabled in :ref:`AnimationNodeStateMachinePlayback.travel()`, the animation is restarted. If ``false``, nothing happens on the teleportation to the self state. .. rst-class:: classref-item-separator @@ -261,6 +263,18 @@ Returns the animation node with the given name. ---- +.. _class_AnimationNodeStateMachine_method_get_node_list: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`StringName`\] **get_node_list**\ (\ ) |const| :ref:`πŸ”—` + +Returns a list containing the names of all animation nodes in this state machine. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeStateMachine_method_get_node_name: .. rst-class:: classref-method diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index dc914535acf..ffbe7bdabfa 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -19,7 +19,7 @@ A transition within an :ref:`AnimationNodeStateMachine` is limited to the nodes connected by **AnimationNodeStateMachineTransition**. +The path generated when using :ref:`AnimationNodeStateMachinePlayback.travel()` is limited to the nodes connected by **AnimationNodeStateMachineTransition**. You can set the timing and conditions of the transition in detail. @@ -138,7 +138,7 @@ Don't use this transition. :ref:`AdvanceMode` **ADVANCE_MODE_ENABLED** = ``1`` -Only use this transition during :ref:`AnimationNodeStateMachinePlayback.travel`. +Only use this transition during :ref:`AnimationNodeStateMachinePlayback.travel()`. .. _class_AnimationNodeStateMachineTransition_constant_ADVANCE_MODE_AUTO: @@ -215,7 +215,7 @@ Use an expression as a condition for state machine transitions. It is possible t - |void| **set_advance_mode**\ (\ value\: :ref:`AdvanceMode`\ ) - :ref:`AdvanceMode` **get_advance_mode**\ (\ ) -Determines whether the transition should be disabled, enabled when using :ref:`AnimationNodeStateMachinePlayback.travel`, or traversed automatically if the :ref:`advance_condition` and :ref:`advance_expression` checks are ``true`` (if assigned). +Determines whether the transition should be disabled, enabled when using :ref:`AnimationNodeStateMachinePlayback.travel()`, or traversed automatically if the :ref:`advance_condition` and :ref:`advance_expression` checks are ``true`` (if assigned). .. rst-class:: classref-item-separator @@ -249,7 +249,7 @@ If ``true``, breaks the loop at the end of the loop cycle for transition, even i - |void| **set_priority**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_priority**\ (\ ) -Lower priority transitions are preferred when travelling through the tree via :ref:`AnimationNodeStateMachinePlayback.travel` or :ref:`advance_mode` is set to :ref:`ADVANCE_MODE_AUTO`. +Lower priority transitions are preferred when travelling through the tree via :ref:`AnimationNodeStateMachinePlayback.travel()` or :ref:`advance_mode` is set to :ref:`ADVANCE_MODE_AUTO`. .. rst-class:: classref-item-separator diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 7af9683c637..c9164809f66 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -159,9 +159,9 @@ Signals **animation_changed**\ (\ old_name\: :ref:`StringName`, new_name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Emitted when a queued animation plays after the previous animation finished. See also :ref:`queue`. +Emitted when a queued animation plays after the previous animation finished. See also :ref:`queue()`. -\ **Note:** The signal is not emitted when the animation is changed via :ref:`play` or by an :ref:`AnimationTree`. +\ **Note:** The signal is not emitted when the animation is changed via :ref:`play()` or by an :ref:`AnimationTree`. .. rst-class:: classref-item-separator @@ -304,7 +304,7 @@ The key of the animation to play when the scene loads. - |void| **set_current_animation**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_current_animation**\ (\ ) -The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See :ref:`play` for more information on playing animations. +The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See :ref:`play()` for more information on playing animations. \ **Note:** While this property appears in the Inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see :ref:`Animation`. @@ -355,7 +355,7 @@ The position (in seconds) of the currently playing animation. - |void| **set_movie_quit_on_finish_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_movie_quit_on_finish_enabled**\ (\ ) -If ``true`` and the engine is running in Movie Maker mode (see :ref:`MovieWriter`), exits the engine with :ref:`SceneTree.quit` as soon as an animation is done playing in this **AnimationPlayer**. A message is printed when the engine quits for this reason. +If ``true`` and the engine is running in Movie Maker mode (see :ref:`MovieWriter`), exits the engine with :ref:`SceneTree.quit()` as soon as an animation is done playing in this **AnimationPlayer**. A message is printed when the engine quits for this reason. \ **Note:** This obeys the same logic as the :ref:`AnimationMixer.animation_finished` signal, so it will not quit the engine if the animation is set to be looping. @@ -374,7 +374,7 @@ If ``true`` and the engine is running in Movie Maker mode (see :ref:`MovieWriter - |void| **set_auto_capture**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_auto_capture**\ (\ ) -If ``true``, performs :ref:`AnimationMixer.capture` before playback automatically. This means just :ref:`play_with_capture` is executed with default arguments instead of :ref:`play`. +If ``true``, performs :ref:`AnimationMixer.capture()` before playback automatically. This means just :ref:`play_with_capture()` is executed with default arguments instead of :ref:`play()`. \ **Note:** Capture interpolation is only performed if the animation contains a capture track. See also :ref:`Animation.UPDATE_CAPTURE`. @@ -393,7 +393,7 @@ If ``true``, performs :ref:`AnimationMixer.capture`\ ) - :ref:`float` **get_auto_capture_duration**\ (\ ) -See also :ref:`play_with_capture` and :ref:`AnimationMixer.capture`. +See also :ref:`play_with_capture()` and :ref:`AnimationMixer.capture()`. If :ref:`playback_auto_capture_duration` is negative value, the duration is set to the interval between the current position and the first key. @@ -544,7 +544,7 @@ Returns the call mode used for "Call Method" tracks. :ref:`float` **get_playing_speed**\ (\ ) |const| :ref:`πŸ”—` -Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play` method. +Returns the actual playing speed of current animation or ``0`` if not playing. This speed is the :ref:`speed_scale` property multiplied by ``custom_speed`` argument specified when calling the :ref:`play()` method. Returns a negative value if the current animation is playing backwards. @@ -622,7 +622,7 @@ Returns the start time of the section currently being played. :ref:`bool` **has_section**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if an animation is currently playing with section. +Returns ``true`` if an animation is currently playing with a section. .. rst-class:: classref-item-separator @@ -646,9 +646,9 @@ Returns ``true`` if an animation is currently playing (even if :ref:`speed_scale |void| **pause**\ (\ ) :ref:`πŸ”—` -Pauses the currently playing animation. The :ref:`current_animation_position` will be kept and calling :ref:`play` or :ref:`play_backwards` without arguments or with the same animation name as :ref:`assigned_animation` will resume the animation. +Pauses the currently playing animation. The :ref:`current_animation_position` will be kept and calling :ref:`play()` or :ref:`play_backwards()` without arguments or with the same animation name as :ref:`assigned_animation` will resume the animation. -See also :ref:`stop`. +See also :ref:`stop()`. .. rst-class:: classref-item-separator @@ -662,7 +662,7 @@ See also :ref:`stop`. Plays the animation with key ``name``. Custom blend times and speed can be set. -The ``from_end`` option only affects when switching to a new animation track, or if the same track but at the start or end. It does not affect resuming playback that was paused in the middle of an animation. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards`). +The ``from_end`` option only affects when switching to a new animation track, or if the same track but at the start or end. It does not affect resuming playback that was paused in the middle of an animation. If ``custom_speed`` is negative and ``from_end`` is ``true``, the animation will play backwards (which is equivalent to calling :ref:`play_backwards()`). The **AnimationPlayer** keeps track of its current or last played animation with :ref:`assigned_animation`. If this method is called with that same animation ``name``, or with no ``name`` parameter, the assigned animation will resume playing if it was paused. @@ -680,7 +680,7 @@ The **AnimationPlayer** keeps track of its current or last played animation with Plays the animation with key ``name`` in reverse. -This method is a shorthand for :ref:`play` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. +This method is a shorthand for :ref:`play()` with ``custom_speed = -1.0`` and ``from_end = true``, so see its description for more information. .. rst-class:: classref-item-separator @@ -692,7 +692,7 @@ This method is a shorthand for :ref:`play` wi |void| **play_section**\ (\ name\: :ref:`StringName` = &"", start_time\: :ref:`float` = -1, end_time\: :ref:`float` = -1, custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Plays the animation with key ``name`` and the section starting from ``start_time`` and ending on ``end_time``. See also :ref:`play`. +Plays the animation with key ``name`` and the section starting from ``start_time`` and ending on ``end_time``. See also :ref:`play()`. Setting ``start_time`` to a value outside the range of the animation means the start of the animation will be used instead, and setting ``end_time`` to a value outside the range of the animation means the end of the animation will be used instead. ``start_time`` cannot be equal to ``end_time``. @@ -708,7 +708,7 @@ Setting ``start_time`` to a value outside the range of the animation means the s Plays the animation with key ``name`` and the section starting from ``start_time`` and ending on ``end_time`` in reverse. -This method is a shorthand for :ref:`play_section` with ``custom_speed = -1.0`` and ``from_end = true``, see its description for more information. +This method is a shorthand for :ref:`play_section()` with ``custom_speed = -1.0`` and ``from_end = true``, see its description for more information. .. rst-class:: classref-item-separator @@ -722,7 +722,7 @@ This method is a shorthand for :ref:`play_section`. +If the start marker is empty, the section starts from the beginning of the animation. If the end marker is empty, the section ends on the end of the animation. See also :ref:`play()`. .. rst-class:: classref-item-separator @@ -736,7 +736,7 @@ If the start marker is empty, the section starts from the beginning of the anima Plays the animation with key ``name`` and the section starting from ``start_marker`` and ending on ``end_marker`` in reverse. -This method is a shorthand for :ref:`play_section_with_markers` with ``custom_speed = -1.0`` and ``from_end = true``, see its description for more information. +This method is a shorthand for :ref:`play_section_with_markers()` with ``custom_speed = -1.0`` and ``from_end = true``, see its description for more information. .. rst-class:: classref-item-separator @@ -748,7 +748,7 @@ This method is a shorthand for :ref:`play_section_with_markers` = &"", duration\: :ref:`float` = -1.0, custom_blend\: :ref:`float` = -1, custom_speed\: :ref:`float` = 1.0, from_end\: :ref:`bool` = false, trans_type\: :ref:`TransitionType` = 0, ease_type\: :ref:`EaseType` = 0\ ) :ref:`πŸ”—` -See also :ref:`AnimationMixer.capture`. +See also :ref:`AnimationMixer.capture()`. You can use this method to use more detailed options for capture than those performed by :ref:`playback_auto_capture`. When :ref:`playback_auto_capture` is ``false``, this method is almost the same as the following: @@ -787,7 +787,7 @@ Queues an animation for playback once the current animation and all previously q |void| **reset_section**\ (\ ) :ref:`πŸ”—` -Resets the current section if section is set. +Resets the current section. Does nothing if a section has not been set. .. rst-class:: classref-item-separator @@ -803,7 +803,7 @@ Seeks the animation to the ``seconds`` point in time (in seconds). If ``update`` If ``update_only`` is ``true``, the method / audio / animation playback tracks will not be processed. -\ **Note:** Seeking to the end of the animation doesn't emit :ref:`AnimationMixer.animation_finished`. If you want to skip animation and emit the signal, use :ref:`AnimationMixer.advance`. +\ **Note:** Seeking to the end of the animation doesn't emit :ref:`AnimationMixer.animation_finished`. If you want to skip animation and emit the signal, use :ref:`AnimationMixer.advance()`. .. rst-class:: classref-item-separator @@ -869,7 +869,7 @@ Sets the node which node path references will travel from. |void| **set_section**\ (\ start_time\: :ref:`float` = -1, end_time\: :ref:`float` = -1\ ) :ref:`πŸ”—` -Changes the start and end times of the section being played. The current playback position will be clamped within the new section. See also :ref:`play_section`. +Changes the start and end times of the section being played. The current playback position will be clamped within the new section. See also :ref:`play_section()`. .. rst-class:: classref-item-separator @@ -881,7 +881,7 @@ Changes the start and end times of the section being played. The current playbac |void| **set_section_with_markers**\ (\ start_marker\: :ref:`StringName` = &"", end_marker\: :ref:`StringName` = &""\ ) :ref:`πŸ”—` -Changes the start and end markers of the section being played. The current playback position will be clamped within the new section. See also :ref:`play_section_with_markers`. +Changes the start and end markers of the section being played. The current playback position will be clamped within the new section. See also :ref:`play_section_with_markers()`. If the argument is empty, the section uses the beginning or end of the animation. If both are empty, it means that the section is not set. @@ -895,7 +895,7 @@ If the argument is empty, the section uses the beginning or end of the animation |void| **stop**\ (\ keep_state\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause`. +Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause()`. If ``keep_state`` is ``true``, the animation state is not updated visually. diff --git a/classes/class_array.rst b/classes/class_array.rst index 1dd896a3070..e4c01ae5c62 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -35,22 +35,22 @@ An array data structure that can contain a sequence of elements of any :ref:`Var .. code-tab:: csharp - var array = new Godot.Collections.Array{"First", 2, 3, "Last"}; + Godot.Collections.Array array = ["First", 2, 3, "Last"]; GD.Print(array[0]); // Prints "First" GD.Print(array[2]); // Prints 3 - GD.Print(array[array.Count - 1]); // Prints "Last" + GD.Print(array[^1]); // Prints "Last" - array[2] = "Second"; + array[1] = "Second"; GD.Print(array[1]); // Prints "Second" - GD.Print(array[array.Count - 3]); // Prints "Second" + GD.Print(array[^3]); // Prints "Second" -\ **Note:** Arrays are always passed by **reference**. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate`. +\ **Note:** Arrays are always passed by **reference**. To get a copy of an array that can be modified independently of the original array, use :ref:`duplicate()`. \ **Note:** Erasing elements while iterating over arrays is **not** supported and will result in unpredictable behavior. -\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedInt64Array` versus ``Array[int]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`map`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. +\ **Differences between packed arrays, typed arrays, and untyped arrays:** Packed arrays are generally faster to iterate on and modify compared to a typed array of the same type (e.g. :ref:`PackedInt64Array` versus ``Array[int]``). Also, packed arrays consume less memory. As a downside, packed arrays are less flexible as they don't offer as many convenience methods such as :ref:`map()`. Typed arrays are in turn faster to iterate on and modify than untyped arrays. .. note:: @@ -257,7 +257,7 @@ Creates a typed array from the ``base`` array. A typed array can only contain el - ``type`` is the built-in :ref:`Variant` type, as one the :ref:`Variant.Type` constants. -- ``class_name`` is the built-in class name (see :ref:`Object.get_class`). +- ``class_name`` is the built-in class name (see :ref:`Object.get_class()`). - ``script`` is the associated script. It must be a :ref:`Script` instance or ``null``. @@ -297,7 +297,7 @@ In GDScript, this constructor is usually not necessary, as it is possible to cre :ref:`Array` **Array**\ (\ from\: :ref:`Array`\ ) -Returns the same array as ``from``. If you need a copy of the array, use :ref:`duplicate`. +Returns the same array as ``from``. If you need a copy of the array, use :ref:`duplicate()`. .. rst-class:: classref-item-separator @@ -459,9 +459,9 @@ The ``method`` should take one :ref:`Variant` parameter (the curr -See also :ref:`any`, :ref:`filter`, :ref:`map` and :ref:`reduce`. +See also :ref:`any()`, :ref:`filter()`, :ref:`map()` and :ref:`reduce()`. -\ **Note:** Unlike relying on the size of an array returned by :ref:`filter`, this method will return as early as possible to improve performance (especially with large arrays). +\ **Note:** Unlike relying on the size of an array returned by :ref:`filter()`, this method will return as early as possible to improve performance (especially with large arrays). \ **Note:** For an empty array, this method `always `__ returns ``true``. @@ -493,9 +493,9 @@ The ``method`` should take one :ref:`Variant` parameter (the curr # Same as the first line above, but using a lambda function. print([6, 10, 6].any(func(number): return number > 5)) # Prints true -See also :ref:`all`, :ref:`filter`, :ref:`map` and :ref:`reduce`. +See also :ref:`all()`, :ref:`filter()`, :ref:`map()` and :ref:`reduce()`. -\ **Note:** Unlike relying on the size of an array returned by :ref:`filter`, this method will return as early as possible to improve performance (especially with large arrays). +\ **Note:** Unlike relying on the size of an array returned by :ref:`filter()`, this method will return as early as possible to improve performance (especially with large arrays). \ **Note:** For an empty array, this method always returns ``false``. @@ -509,7 +509,7 @@ See also :ref:`all`, :ref:`filter`\ ) :ref:`πŸ”—` -Appends ``value`` at the end of the array (alias of :ref:`push_back`). +Appends ``value`` at the end of the array (alias of :ref:`push_back()`). .. rst-class:: classref-item-separator @@ -552,7 +552,7 @@ Assigns elements of another ``array`` into the array. Resizes the array to match :ref:`Variant` **back**\ (\ ) |const| :ref:`πŸ”—` -Returns the last element of the array. If the array is empty, fails and returns ``null``. See also :ref:`front`. +Returns the last element of the array. If the array is empty, fails and returns ``null``. See also :ref:`front()`. \ **Note:** Unlike with the ``[]`` operator (``array[-1]``), an error is generated without stopping project execution. @@ -582,7 +582,7 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e print(fruits.bsearch("Lemon", true)) # Prints 1, points at the first "Lemon". print(fruits.bsearch("Lemon", false)) # Prints 3, points at "Orange". -\ **Note:** Calling :ref:`bsearch` on an *unsorted* array will result in unexpected behavior. Use :ref:`sort` before calling this method. +\ **Note:** Calling :ref:`bsearch()` on an *unsorted* array will result in unexpected behavior. Use :ref:`sort()` before calling this method. .. rst-class:: classref-item-separator @@ -596,7 +596,7 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e Returns the index of ``value`` in the sorted array. If it cannot be found, returns where ``value`` should be inserted to keep the array sorted (using ``func`` for the comparisons). The algorithm used is `binary search `__. -Similar to :ref:`sort_custom`, ``func`` is called as many times as necessary, receiving one array element and ``value`` as arguments. The function should return ``true`` if the array element should be *behind* ``value``, otherwise it should return ``false``. +Similar to :ref:`sort_custom()`, ``func`` is called as many times as necessary, receiving one array element and ``value`` as arguments. The function should return ``true`` if the array element should be *behind* ``value``, otherwise it should return ``false``. If ``before`` is ``true`` (as by default), the returned index comes before all existing elements equal to ``value`` in the array. @@ -621,7 +621,7 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e # Prints [["Tomato", 2], ["Apple", 5], ["Kiwi", 5], ["Banana", 5], ["Rice", 9]] print(my_items) -\ **Note:** Calling :ref:`bsearch_custom` on an *unsorted* array will result in unexpected behavior. Use :ref:`sort_custom` with ``func`` before calling this method. +\ **Note:** Calling :ref:`bsearch_custom()` on an *unsorted* array will result in unexpected behavior. Use :ref:`sort_custom()` with ``func`` before calling this method. .. rst-class:: classref-item-separator @@ -633,7 +633,7 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e |void| **clear**\ (\ ) :ref:`πŸ”—` -Removes all elements from the array. This is equivalent to using :ref:`resize` with a size of ``0``. +Removes all elements from the array. This is equivalent to using :ref:`resize()` with a size of ``0``. .. rst-class:: classref-item-separator @@ -647,7 +647,7 @@ Removes all elements from the array. This is equivalent to using :ref:`resize`. +To count how many elements in an array satisfy a condition, see :ref:`reduce()`. .. rst-class:: classref-item-separator @@ -675,7 +675,7 @@ If ``deep`` is ``true``, a **deep** copy is returned: all nested arrays and dict |void| **erase**\ (\ value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Finds and removes the first occurrence of ``value`` from the array. If ``value`` does not exist in the array, nothing happens. To remove an element by index, use :ref:`remove_at` instead. +Finds and removes the first occurrence of ``value`` from the array. If ``value`` does not exist in the array, nothing happens. To remove an element by index, use :ref:`remove_at()` instead. \ **Note:** This method shifts every element's index after the removed ``value`` back, which may have a noticeable performance cost, especially on larger arrays. @@ -693,7 +693,7 @@ Finds and removes the first occurrence of ``value`` from the array. If ``value`` Assigns the given ``value`` to all elements in the array. -This method can often be combined with :ref:`resize` to create an array with a given size and initialized elements: +This method can often be combined with :ref:`resize()` to create an array with a given size and initialized elements: .. tabs:: @@ -707,7 +707,7 @@ This method can often be combined with :ref:`resize` .. code-tab:: csharp - var array = new Godot.Collections.Array(); + Godot.Collections.Array array = []; array.Resize(5); array.Fill(2); GD.Print(array); // Prints [2, 2, 2, 2, 2] @@ -741,7 +741,7 @@ The ``method`` receives one of the array elements as an argument, and should ret # Same as above, but using a lambda function. print([1, 4, 5, 8].filter(func(number): return number % 2 == 0)) -See also :ref:`any`, :ref:`all`, :ref:`map` and :ref:`reduce`. +See also :ref:`any()`, :ref:`all()`, :ref:`map()` and :ref:`reduce()`. .. rst-class:: classref-item-separator @@ -755,7 +755,7 @@ See also :ref:`any`, :ref:`all`, Returns the index of the **first** occurrence of ``what`` in this array, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the end of the array. -\ **Note:** If you just want to know whether the array contains ``what``, use :ref:`has` (``Contains`` in C#). In GDScript, you may also use the ``in`` operator. +\ **Note:** If you just want to know whether the array contains ``what``, use :ref:`has()` (``Contains`` in C#). In GDScript, you may also use the ``in`` operator. \ **Note:** For performance reasons, the search is affected by ``what``'s :ref:`Variant.Type`. For example, ``7`` (:ref:`int`) and ``7.0`` (:ref:`float`) are not considered equal for this method. @@ -773,7 +773,7 @@ Returns the index of the **first** element in the array that causes ``method`` t \ ``method`` is a callable that takes an element of the array, and returns a :ref:`bool`. -\ **Note:** If you just want to know whether the array contains *anything* that satisfies ``method``, use :ref:`any`. +\ **Note:** If you just want to know whether the array contains *anything* that satisfies ``method``, use :ref:`any()`. .. tabs:: @@ -784,7 +784,7 @@ Returns the index of the **first** element in the array that causes ``method`` t return number % 2 == 0 func _ready(): - print([1, 3, 4, 7].find_custom(is_even.bind())) # prints 2 + print([1, 3, 4, 7].find_custom(is_even.bind())) # Prints 2 @@ -798,7 +798,7 @@ Returns the index of the **first** element in the array that causes ``method`` t :ref:`Variant` **front**\ (\ ) |const| :ref:`πŸ”—` -Returns the first element of the array. If the array is empty, fails and returns ``null``. See also :ref:`back`. +Returns the first element of the array. If the array is empty, fails and returns ``null``. See also :ref:`back()`. \ **Note:** Unlike with the ``[]`` operator (``array[0]``), an error is generated without stopping project execution. @@ -824,7 +824,7 @@ Returns the element at the given ``index`` in the array. This is the same as usi :ref:`int` **get_typed_builtin**\ (\ ) |const| :ref:`πŸ”—` -Returns the built-in :ref:`Variant` type of the typed array as a :ref:`Variant.Type` constant. If the array is not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed`. +Returns the built-in :ref:`Variant` type of the typed array as a :ref:`Variant.Type` constant. If the array is not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed()`. .. rst-class:: classref-item-separator @@ -836,7 +836,7 @@ Returns the built-in :ref:`Variant` type of the typed array as a :ref:`StringName` **get_typed_class_name**\ (\ ) |const| :ref:`πŸ”—` -Returns the **built-in** class name of the typed array, if the built-in :ref:`Variant` type :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed` and :ref:`Object.get_class`. +Returns the **built-in** class name of the typed array, if the built-in :ref:`Variant` type :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed()` and :ref:`Object.get_class()`. .. rst-class:: classref-item-separator @@ -848,7 +848,7 @@ Returns the **built-in** class name of the typed array, if the built-in :ref:`Va :ref:`Variant` **get_typed_script**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`Script` instance associated with this typed array, or ``null`` if it does not exist. See also :ref:`is_typed`. +Returns the :ref:`Script` instance associated with this typed array, or ``null`` if it does not exist. See also :ref:`is_typed()`. .. rst-class:: classref-item-separator @@ -874,7 +874,7 @@ Returns ``true`` if the array contains the given ``value``. .. code-tab:: csharp - var arr = new Godot.Collections.Array { "inside", 7 }; + Godot.Collections.Array arr = ["inside", 7]; // By C# convention, this method is renamed to `Contains`. GD.Print(arr.Contains("inside")); // Prints True GD.Print(arr.Contains("outside")); // Prints False @@ -916,7 +916,7 @@ Returns a hashed 32-bit integer value representing the array and its contents. :ref:`int` **insert**\ (\ position\: :ref:`int`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Inserts a new element (``value``) at a given index (``position``) in the array. ``position`` should be between ``0`` and the array's :ref:`size`. +Inserts a new element (``value``) at a given index (``position``) in the array. ``position`` should be between ``0`` and the array's :ref:`size()`. If negative, ``position`` is considered relative to the end of the array. Returns :ref:`@GlobalScope.OK` on success, or one of the other :ref:`Error` constants if this method fails. @@ -932,7 +932,7 @@ Returns :ref:`@GlobalScope.OK` on success, or on :ref:`bool` **is_empty**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the array is empty (``[]``). See also :ref:`size`. +Returns ``true`` if the array is empty (``[]``). See also :ref:`size()`. .. rst-class:: classref-item-separator @@ -944,7 +944,7 @@ Returns ``true`` if the array is empty (``[]``). See also :ref:`size` **is_read_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the array is read-only. See :ref:`make_read_only`. +Returns ``true`` if the array is read-only. See :ref:`make_read_only()`. In GDScript, arrays are automatically read-only if declared with the ``const`` keyword. @@ -958,7 +958,7 @@ In GDScript, arrays are automatically read-only if declared with the ``const`` k :ref:`bool` **is_same_typed**\ (\ array\: :ref:`Array`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this array is typed the same as the given ``array``. See also :ref:`is_typed`. +Returns ``true`` if this array is typed the same as the given ``array``. See also :ref:`is_typed()`. .. rst-class:: classref-item-separator @@ -1018,7 +1018,7 @@ The ``method`` should take one :ref:`Variant` parameter (the curr # Same as above, but using a lambda function. print([1, 2, 3].map(func(element): return element * 2)) -See also :ref:`filter`, :ref:`reduce`, :ref:`any` and :ref:`all`. +See also :ref:`filter()`, :ref:`reduce()`, :ref:`any()` and :ref:`all()`. .. rst-class:: classref-item-separator @@ -1030,9 +1030,9 @@ See also :ref:`filter`, :ref:`reduce` **max**\ (\ ) |const| :ref:`πŸ”—` -Returns the maximum value contained in the array, if all elements can be compared. Otherwise, returns ``null``. See also :ref:`min`. +Returns the maximum value contained in the array, if all elements can be compared. Otherwise, returns ``null``. See also :ref:`min()`. -To find the maximum value using a custom comparator, you can use :ref:`reduce`. +To find the maximum value using a custom comparator, you can use :ref:`reduce()`. .. rst-class:: classref-item-separator @@ -1044,7 +1044,7 @@ To find the maximum value using a custom comparator, you can use :ref:`reduce` **min**\ (\ ) |const| :ref:`πŸ”—` -Returns the minimum value contained in the array, if all elements can be compared. Otherwise, returns ``null``. See also :ref:`max`. +Returns the minimum value contained in the array, if all elements can be compared. Otherwise, returns ``null``. See also :ref:`max()`. .. rst-class:: classref-item-separator @@ -1068,12 +1068,12 @@ Returns a random element from the array. Generates an error and returns ``null`` .. code-tab:: csharp - var array = new Godot.Collections.Array { 1, 2, 3.25f, "Hi" }; + Godot.Collections.Array array = [1, 2, 3.25f, "Hi"]; GD.Print(array.PickRandom()); // May print 1, 2, 3.25, or "Hi". -\ **Note:** Like many similar functions in the engine (such as :ref:`@GlobalScope.randi` or :ref:`shuffle`), this method uses a common, global random seed. To get a predictable outcome from this method, see :ref:`@GlobalScope.seed`. +\ **Note:** Like many similar functions in the engine (such as :ref:`@GlobalScope.randi()` or :ref:`shuffle()`), this method uses a common, global random seed. To get a predictable outcome from this method, see :ref:`@GlobalScope.seed()`. .. rst-class:: classref-item-separator @@ -1099,7 +1099,7 @@ Removes and returns the element of the array at index ``position``. If negative, :ref:`Variant` **pop_back**\ (\ ) :ref:`πŸ”—` -Removes and returns the last element of the array. Returns ``null`` if the array is empty, without generating an error. See also :ref:`pop_front`. +Removes and returns the last element of the array. Returns ``null`` if the array is empty, without generating an error. See also :ref:`pop_front()`. .. rst-class:: classref-item-separator @@ -1111,7 +1111,7 @@ Removes and returns the last element of the array. Returns ``null`` if the array :ref:`Variant` **pop_front**\ (\ ) :ref:`πŸ”—` -Removes and returns the first element of the array. Returns ``null`` if the array is empty, without generating an error. See also :ref:`pop_back`. +Removes and returns the first element of the array. Returns ``null`` if the array is empty, without generating an error. See also :ref:`pop_back()`. \ **Note:** This method shifts every other element's index back, which may have a noticeable performance cost, especially on larger arrays. @@ -1125,7 +1125,7 @@ Removes and returns the first element of the array. Returns ``null`` if the arra |void| **push_back**\ (\ value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Appends an element at the end of the array. See also :ref:`push_front`. +Appends an element at the end of the array. See also :ref:`push_front()`. .. rst-class:: classref-item-separator @@ -1137,7 +1137,7 @@ Appends an element at the end of the array. See also :ref:`push_front`\ ) :ref:`πŸ”—` -Adds an element at the beginning of the array. See also :ref:`push_back`. +Adds an element at the beginning of the array. See also :ref:`push_back()`. \ **Note:** This method shifts every other element's index forward, which may have a noticeable performance cost, especially on larger arrays. @@ -1167,20 +1167,20 @@ The ``method`` takes two arguments: the current value of ``accum`` and the curre # Same as above, but using a lambda function. print([1, 2, 3].reduce(func(accum, number): return accum + number, 10)) -If :ref:`max` is not desirable, this method may also be used to implement a custom comparator: +If :ref:`max()` is not desirable, this method may also be used to implement a custom comparator: :: func _ready(): - var arr = [Vector2(5, 0), Vector2(3, 4), Vector2(1, 2)] + var arr = [Vector2i(5, 0), Vector2i(3, 4), Vector2i(1, 2)] var longest_vec = arr.reduce(func(max, vec): return vec if is_length_greater(vec, max) else max) - print(longest_vec) # Prints Vector2(3, 4). + print(longest_vec) # Prints (3, 4) func is_length_greater(a, b): return a.length() > b.length() -This method can also be used to count how many elements in an array satisfy a certain condition, similar to :ref:`count`: +This method can also be used to count how many elements in an array satisfy a certain condition, similar to :ref:`count()`: :: @@ -1189,11 +1189,11 @@ This method can also be used to count how many elements in an array satisfy a ce func _ready(): var arr = [1, 2, 3, 4, 5] - # Increment count if it's even, else leaves count the same. + # If the current element is even, increment count, otherwise leave count the same. var even_count = arr.reduce(func(count, next): return count + 1 if is_even(next) else count, 0) print(even_count) # Prints 2 -See also :ref:`map`, :ref:`filter`, :ref:`any` and :ref:`all`. +See also :ref:`map()`, :ref:`filter()`, :ref:`any()`, and :ref:`all()`. .. rst-class:: classref-item-separator @@ -1205,9 +1205,9 @@ See also :ref:`map`, :ref:`filter`\ ) :ref:`πŸ”—` -Removes the element from the array at the given index (``position``). If the index is out of bounds, this method fails. +Removes the element from the array at the given index (``position``). If the index is out of bounds, this method fails. If the index is negative, ``position`` is considered relative to the end of the array. -If you need to return the removed element, use :ref:`pop_at`. To remove an element by value, use :ref:`erase` instead. +If you need to return the removed element, use :ref:`pop_at()`. To remove an element by value, use :ref:`erase()` instead. \ **Note:** This method shifts every element's index after ``position`` back, which may have a noticeable performance cost, especially on larger arrays. @@ -1225,9 +1225,9 @@ If you need to return the removed element, use :ref:`pop_at` on success, or one of the other :ref:`Error` constants if this method fails. +Returns :ref:`@GlobalScope.OK` on success, or one of the following :ref:`Error` constants if this method fails: :ref:`@GlobalScope.ERR_LOCKED` if the array is read-only, :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if the size is negative, or :ref:`@GlobalScope.ERR_OUT_OF_MEMORY` if allocations fail. Use :ref:`size()` to find the actual size of the array after resize. -\ **Note:** Calling this method once and assigning the new values is faster than calling :ref:`append` for every new element. +\ **Note:** Calling this method once and assigning the new values is faster than calling :ref:`append()` for every new element. .. rst-class:: classref-item-separator @@ -1251,7 +1251,7 @@ Reverses the order of all elements in the array. :ref:`int` **rfind**\ (\ what\: :ref:`Variant`, from\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the index of the **last** occurrence of ``what`` in this array, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the array. This method is the reverse of :ref:`find`. +Returns the index of the **last** occurrence of ``what`` in this array, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the array. This method is the reverse of :ref:`find()`. .. rst-class:: classref-item-separator @@ -1263,7 +1263,7 @@ Returns the index of the **last** occurrence of ``what`` in this array, or ``-1` :ref:`int` **rfind_custom**\ (\ method\: :ref:`Callable`, from\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the index of the **last** element of the array that causes ``method`` to return ``true``, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the array. This method is the reverse of :ref:`find_custom`. +Returns the index of the **last** element of the array that causes ``method`` to return ``true``, or ``-1`` if there are none. The search's start can be specified with ``from``, continuing to the beginning of the array. This method is the reverse of :ref:`find_custom()`. .. rst-class:: classref-item-separator @@ -1289,7 +1289,7 @@ Sets the value of the element at the given ``index`` to the given ``value``. Thi Shuffles all elements of the array in a random order. -\ **Note:** Like many similar functions in the engine (such as :ref:`@GlobalScope.randi` or :ref:`pick_random`), this method uses a common, global random seed. To get a predictable outcome from this method, see :ref:`@GlobalScope.seed`. +\ **Note:** Like many similar functions in the engine (such as :ref:`@GlobalScope.randi()` or :ref:`pick_random()`), this method uses a common, global random seed. To get a predictable outcome from this method, see :ref:`@GlobalScope.seed()`. .. rst-class:: classref-item-separator @@ -1301,7 +1301,7 @@ Shuffles all elements of the array in a random order. :ref:`int` **size**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of elements in the array. Empty arrays (``[]``) always return ``0``. See also :ref:`is_empty`. +Returns the number of elements in the array. Empty arrays (``[]``) always return ``0``. See also :ref:`is_empty()`. .. rst-class:: classref-item-separator @@ -1319,7 +1319,7 @@ If either ``begin`` or ``end`` are negative, their value is relative to the end If ``step`` is negative, this method iterates through the array in reverse, returning a slice ordered backwards. For this to work, ``begin`` must be greater than ``end``. -If ``deep`` is ``true``, all nested **Array** and :ref:`Dictionary` elements in the slice are duplicated from the original, recursively. See also :ref:`duplicate`). +If ``deep`` is ``true``, all nested **Array** and :ref:`Dictionary` elements in the slice are duplicated from the original, recursively. See also :ref:`duplicate()`). :: @@ -1355,13 +1355,13 @@ Sorts the array in ascending order. The final order is dependent on the "less th .. code-tab:: csharp - var numbers = new Godot.Collections.Array { 10, 5, 2.5, 8 }; + Godot.Collections.Array numbers = [10, 5, 2.5, 8]; numbers.Sort(); GD.Print(numbers); // Prints [2.5, 5, 8, 10] -\ **Note:** The sorting algorithm used is not `stable `__. This means that equivalent elements (such as ``2`` and ``2.0``) may have their order changed when calling :ref:`sort`. +\ **Note:** The sorting algorithm used is not `stable `__. This means that equivalent elements (such as ``2`` and ``2.0``) may have their order changed when calling :ref:`sort()`. .. rst-class:: classref-item-separator @@ -1393,7 +1393,7 @@ Sorts the array using a custom :ref:`Callable`. my_items.sort_custom(func(a, b): return a[1] > b[1]) print(my_items) # Prints [["Apple", 9], ["Tomato", 5], ["Rice", 4]] -It may also be necessary to use this method to sort strings by natural order, with :ref:`String.naturalnocasecmp_to`, as in the following example: +It may also be necessary to use this method to sort strings by natural order, with :ref:`String.naturalnocasecmp_to()`, as in the following example: :: @@ -1448,13 +1448,13 @@ Appends the ``right`` array to the left operand, creating a new **Array**. This .. code-tab:: csharp // Note that concatenation is not possible with C#'s native Array type. - var array1 = new Godot.Collections.Array{"One", 2}; - var array2 = new Godot.Collections.Array{3, "Four"}; + Godot.Collections.Array array1 = ["One", 2]; + Godot.Collections.Array array2 = [3, "Four"]; GD.Print(array1 + array2); // Prints ["One", 2, 3, "Four"] -\ **Note:** For existing arrays, :ref:`append_array` is much more efficient than concatenation and assignment with the ``+=`` operator. +\ **Note:** For existing arrays, :ref:`append_array()` is much more efficient than concatenation and assignment with the ``+=`` operator. .. rst-class:: classref-item-separator diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index a536b5e3b51..3f41ebf9864 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -46,16 +46,16 @@ The most basic example is the creation of a single triangle: .. code-tab:: csharp - var vertices = new Vector3[] - { + Vector3[] vertices = + [ new Vector3(0, 1, 0), new Vector3(1, 0, 0), new Vector3(0, 0, 1), - }; + ]; // Initialize the ArrayMesh. var arrMesh = new ArrayMesh(); - var arrays = new Godot.Collections.Array(); + Godot.Collections.Array arrays = []; arrays.Resize((int)Mesh.ArrayType.Max); arrays[(int)Mesh.ArrayType.Vertex] = vertices; @@ -218,7 +218,7 @@ Method Descriptions |void| **add_blend_shape**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Adds name for a blend shape that will be added with :ref:`add_surface_from_arrays`. Must be called before surface is added. +Adds name for a blend shape that will be added with :ref:`add_surface_from_arrays()`. Must be called before surface is added. .. rst-class:: classref-item-separator @@ -230,7 +230,7 @@ Adds name for a blend shape that will be added with :ref:`add_surface_from_array |void| **add_surface_from_arrays**\ (\ primitive\: :ref:`PrimitiveType`, arrays\: :ref:`Array`, blend_shapes\: :ref:`Array`\[:ref:`Array`\] = [], lods\: :ref:`Dictionary` = {}, flags\: |bitfield|\[:ref:`ArrayFormat`\] = 0\ ) :ref:`πŸ”—` -Creates a new surface. :ref:`Mesh.get_surface_count` will become the ``surf_idx`` for this new surface. +Creates a new surface. :ref:`Mesh.get_surface_count()` will become the ``surf_idx`` for this new surface. Surfaces are created to be rendered using a ``primitive``, which may be any of the values defined in :ref:`PrimitiveType`. @@ -240,7 +240,7 @@ The ``blend_shapes`` argument is an array of vertex data for each blend shape. E The ``lods`` argument is a dictionary with :ref:`float` keys and :ref:`PackedInt32Array` values. Each entry in the dictionary represents an LOD level of the surface, where the value is the :ref:`Mesh.ARRAY_INDEX` array to use for the LOD level and the key is roughly proportional to the distance at which the LOD stats being used. I.e., increasing the key of an LOD also increases the distance that the objects has to be from the camera before the LOD is used. -The ``flags`` argument is the bitwise or of, as required: One value of :ref:`ArrayCustomFormat` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY`. +The ``flags`` argument is the bitwise OR of, as required: One value of :ref:`ArrayCustomFormat` left shifted by ``ARRAY_FORMAT_CUSTOMn_SHIFT`` for each custom channel in use, :ref:`Mesh.ARRAY_FLAG_USE_DYNAMIC_UPDATE`, :ref:`Mesh.ARRAY_FLAG_USE_8_BONE_WEIGHTS`, or :ref:`Mesh.ARRAY_FLAG_USES_EMPTY_VERTEX_ARRAY`. \ **Note:** When using indices, it is recommended to only use points, lines, or triangles. @@ -350,7 +350,7 @@ Returns the index of the first surface with this name held within this **ArrayMe :ref:`int` **surface_get_array_index_len**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the length in indices of the index array in the requested surface (see :ref:`add_surface_from_arrays`). +Returns the length in indices of the index array in the requested surface (see :ref:`add_surface_from_arrays()`). .. rst-class:: classref-item-separator @@ -362,7 +362,7 @@ Returns the length in indices of the index array in the requested surface (see : :ref:`int` **surface_get_array_len**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the length in vertices of the vertex array in the requested surface (see :ref:`add_surface_from_arrays`). +Returns the length in vertices of the vertex array in the requested surface (see :ref:`add_surface_from_arrays()`). .. rst-class:: classref-item-separator @@ -374,7 +374,7 @@ Returns the length in vertices of the vertex array in the requested surface (see |bitfield|\[:ref:`ArrayFormat`\] **surface_get_format**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the format mask of the requested surface (see :ref:`add_surface_from_arrays`). +Returns the format mask of the requested surface (see :ref:`add_surface_from_arrays()`). .. rst-class:: classref-item-separator @@ -398,7 +398,7 @@ Gets the name assigned to this surface. :ref:`PrimitiveType` **surface_get_primitive_type**\ (\ surf_idx\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns the primitive type of the requested surface (see :ref:`add_surface_from_arrays`). +Returns the primitive type of the requested surface (see :ref:`add_surface_from_arrays()`). .. rst-class:: classref-item-separator diff --git a/classes/class_arrayoccluder3d.rst b/classes/class_arrayoccluder3d.rst index 8fd397dc36d..4c6278bfbae 100644 --- a/classes/class_arrayoccluder3d.rst +++ b/classes/class_arrayoccluder3d.rst @@ -78,7 +78,7 @@ Property Descriptions The occluder's index position. Indices determine which points from the :ref:`vertices` array should be drawn, and in which order. -\ **Note:** The occluder is always updated after setting this value. If creating occluders procedurally, consider using :ref:`set_arrays` instead to avoid updating the occluder twice when it's created. +\ **Note:** The occluder is always updated after setting this value. If creating occluders procedurally, consider using :ref:`set_arrays()` instead to avoid updating the occluder twice when it's created. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedInt32Array` for more details. @@ -99,7 +99,7 @@ The occluder's index position. Indices determine which points from the :ref:`ver The occluder's vertex positions in local 3D coordinates. -\ **Note:** The occluder is always updated after setting this value. If creating occluders procedurally, consider using :ref:`set_arrays` instead to avoid updating the occluder twice when it's created. +\ **Note:** The occluder is always updated after setting this value. If creating occluders procedurally, consider using :ref:`set_arrays()` instead to avoid updating the occluder twice when it's created. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index dc870e3ff3a..6c4446d8f92 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -128,7 +128,7 @@ Note that this function is hidden in the default **AStar2D** class. Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. -The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. +The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. .. tabs:: @@ -337,7 +337,7 @@ If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` :ref:`int` **get_point_capacity**\ (\ ) |const| :ref:`πŸ”—` -Returns the capacity of the structure backing the points, useful in conjunction with :ref:`reserve_space`. +Returns the capacity of the structure backing the points, useful in conjunction with :ref:`reserve_space()`. .. rst-class:: classref-item-separator @@ -494,7 +494,7 @@ Removes the point associated with the given ``id`` from the points pool. |void| **reserve_space**\ (\ num_nodes\: :ref:`int`\ ) :ref:`πŸ”—` -Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. The new capacity must be greater or equal to the old capacity. +Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. .. rst-class:: classref-item-separator @@ -530,7 +530,7 @@ Sets the ``position`` for the point with the given ``id``. |void| **set_point_weight_scale**\ (\ id\: :ref:`int`, weight_scale\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. .. |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_astar3d.rst b/classes/class_astar3d.rst index c18872fff7f..de0c067c373 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -21,9 +21,9 @@ Description A\* (A star) is a computer algorithm used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Redot's A\* implementation uses points in 3D space and Euclidean distances by default. -You must add points manually with :ref:`add_point` and create segments manually with :ref:`connect_points`. Once done, you can test if there is a path between two points with the :ref:`are_points_connected` function, get a path containing indices by :ref:`get_id_path`, or one containing actual coordinates with :ref:`get_point_path`. +You must add points manually with :ref:`add_point()` and create segments manually with :ref:`connect_points()`. Once done, you can test if there is a path between two points with the :ref:`are_points_connected()` function, get a path containing indices by :ref:`get_id_path()`, or one containing actual coordinates with :ref:`get_point_path()`. -It is also possible to use non-Euclidean distances. To do so, create a script that extends **AStar3D** and override the methods :ref:`_compute_cost` and :ref:`_estimate_cost`. Both should take two point IDs and return the distance between the corresponding points. +It is also possible to use non-Euclidean distances. To do so, create a script that extends **AStar3D** and override the methods :ref:`_compute_cost()` and :ref:`_estimate_cost()`. Both should take two point IDs and return the distance between the corresponding points. \ **Example:** Use Manhattan distance instead of Euclidean distance: @@ -70,9 +70,9 @@ It is also possible to use non-Euclidean distances. To do so, create a script th -\ :ref:`_estimate_cost` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom :ref:`_compute_cost` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost` return the same value as :ref:`_compute_cost` to provide the algorithm with the most accurate information. +\ :ref:`_estimate_cost()` should return a lower bound of the distance, i.e. ``_estimate_cost(u, v) <= _compute_cost(u, v)``. This serves as a hint to the algorithm because the custom :ref:`_compute_cost()` might be computation-heavy. If this is not the case, make :ref:`_estimate_cost()` return the same value as :ref:`_compute_cost()` to provide the algorithm with the most accurate information. -If the default :ref:`_estimate_cost` and :ref:`_compute_cost` methods are used, or if the supplied :ref:`_estimate_cost` method returns a lower bound of the cost, then the paths returned by A\* will be the lowest-cost paths. Here, the cost of a path equals the sum of the :ref:`_compute_cost` results of all segments in the path multiplied by the ``weight_scale``\ s of the endpoints of the respective segments. If the default methods are used and the ``weight_scale``\ s of all points are set to ``1.0``, then this equals the sum of Euclidean distances of all segments in the path. +If the default :ref:`_estimate_cost()` and :ref:`_compute_cost()` methods are used, or if the supplied :ref:`_estimate_cost()` method returns a lower bound of the cost, then the paths returned by A\* will be the lowest-cost paths. Here, the cost of a path equals the sum of the :ref:`_compute_cost()` results of all segments in the path multiplied by the ``weight_scale``\ s of the endpoints of the respective segments. If the default methods are used and the ``weight_scale``\ s of all points are set to ``1.0``, then this equals the sum of Euclidean distances of all segments in the path. .. rst-class:: classref-reftable-group @@ -179,7 +179,7 @@ Note that this function is hidden in the default **AStar3D** class. Adds a new point at the given position with the given identifier. The ``id`` must be 0 or larger, and the ``weight_scale`` must be 0.0 or greater. -The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. +The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower ``weight_scale``\ s to form a path. .. tabs:: @@ -387,7 +387,7 @@ If you change the 2nd point's weight to 3, then the result will be ``[1, 4, 3]`` :ref:`int` **get_point_capacity**\ (\ ) |const| :ref:`πŸ”—` -Returns the capacity of the structure backing the points, useful in conjunction with :ref:`reserve_space`. +Returns the capacity of the structure backing the points, useful in conjunction with :ref:`reserve_space()`. .. rst-class:: classref-item-separator @@ -543,7 +543,7 @@ Removes the point associated with the given ``id`` from the points pool. |void| **reserve_space**\ (\ num_nodes\: :ref:`int`\ ) :ref:`πŸ”—` -Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity. +Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. .. rst-class:: classref-item-separator @@ -579,7 +579,7 @@ Sets the ``position`` for the point with the given ``id``. |void| **set_point_weight_scale**\ (\ id\: :ref:`int`, weight_scale\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. .. |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_astargrid2d.rst b/classes/class_astargrid2d.rst index c7e8641207e..d5246c44cb3 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -21,7 +21,7 @@ Description **AStarGrid2D** is a variant of :ref:`AStar2D` that is specialized for partial 2D grids. It is simpler to use because it doesn't require you to manually create points and connect them together. This class also supports multiple types of heuristics, modes for diagonal movement, and a jumping mode to speed up calculations. -To use **AStarGrid2D**, you only need to set the :ref:`region` of the grid, optionally set the :ref:`cell_size`, and then call the :ref:`update` method: +To use **AStarGrid2D**, you only need to set the :ref:`region` of the grid, optionally set the :ref:`cell_size`, and then call the :ref:`update()` method: .. tabs:: @@ -41,12 +41,12 @@ To use **AStarGrid2D**, you only need to set the :ref:`region`. +To remove a point from the pathfinding grid, it must be set as "solid" with :ref:`set_point_solid()`. .. rst-class:: classref-reftable-group @@ -318,7 +318,7 @@ Property Descriptions - |void| **set_cell_shape**\ (\ value\: :ref:`CellShape`\ ) - :ref:`CellShape` **get_cell_shape**\ (\ ) -The cell shape. Affects how the positions are placed in the grid. If changed, :ref:`update` needs to be called before finding the next path. +The cell shape. Affects how the positions are placed in the grid. If changed, :ref:`update()` needs to be called before finding the next path. .. rst-class:: classref-item-separator @@ -335,7 +335,7 @@ The cell shape. Affects how the positions are placed in the grid. If changed, :r - |void| **set_cell_size**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_cell_size**\ (\ ) -The size of the point cell which will be applied to calculate the resulting point position returned by :ref:`get_point_path`. If changed, :ref:`update` needs to be called before finding the next path. +The size of the point cell which will be applied to calculate the resulting point position returned by :ref:`get_point_path()`. If changed, :ref:`update()` needs to be called before finding the next path. .. rst-class:: classref-item-separator @@ -352,7 +352,7 @@ The size of the point cell which will be applied to calculate the resulting poin - |void| **set_default_compute_heuristic**\ (\ value\: :ref:`Heuristic`\ ) - :ref:`Heuristic` **get_default_compute_heuristic**\ (\ ) -The default :ref:`Heuristic` which will be used to calculate the cost between two points if :ref:`_compute_cost` was not overridden. +The default :ref:`Heuristic` which will be used to calculate the cost between two points if :ref:`_compute_cost()` was not overridden. .. rst-class:: classref-item-separator @@ -369,7 +369,7 @@ The default :ref:`Heuristic` which will be used to c - |void| **set_default_estimate_heuristic**\ (\ value\: :ref:`Heuristic`\ ) - :ref:`Heuristic` **get_default_estimate_heuristic**\ (\ ) -The default :ref:`Heuristic` which will be used to calculate the cost between the point and the end point if :ref:`_estimate_cost` was not overridden. +The default :ref:`Heuristic` which will be used to calculate the cost between the point and the end point if :ref:`_estimate_cost()` was not overridden. .. rst-class:: classref-item-separator @@ -439,7 +439,7 @@ The maximum number of points to traverse before giving up. If set to ``0``, the - |void| **set_offset**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_offset**\ (\ ) -The offset of the grid which will be applied to calculate the resulting point position returned by :ref:`get_point_path`. If changed, :ref:`update` needs to be called before finding the next path. +The offset of the grid which will be applied to calculate the resulting point position returned by :ref:`get_point_path()`. If changed, :ref:`update()` needs to be called before finding the next path. .. rst-class:: classref-item-separator @@ -456,7 +456,7 @@ The offset of the grid which will be applied to calculate the resulting point po - |void| **set_region**\ (\ value\: :ref:`Rect2i`\ ) - :ref:`Rect2i` **get_region**\ (\ ) -The region of grid cells available for pathfinding. If changed, :ref:`update` needs to be called before finding the next path. +The region of grid cells available for pathfinding. If changed, :ref:`update()` needs to be called before finding the next path. .. rst-class:: classref-item-separator @@ -475,7 +475,7 @@ The region of grid cells available for pathfinding. If changed, :ref:`update` instead. -The size of the grid (number of cells of size :ref:`cell_size` on each axis). If changed, :ref:`update` needs to be called before finding the next path. +The size of the grid (number of cells of size :ref:`cell_size` on each axis). If changed, :ref:`update()` needs to be called before finding the next path. .. rst-class:: classref-section-separator @@ -534,7 +534,7 @@ Clears the grid and sets the :ref:`region` to Fills the given ``region`` on the grid with the specified value for the solid flag. -\ **Note:** Calling :ref:`update` is not needed after the call of this function. +\ **Note:** Calling :ref:`update()` is not needed after the call of this function. .. rst-class:: classref-item-separator @@ -548,7 +548,7 @@ Fills the given ``region`` on the grid with the specified value for the solid fl Fills the given ``region`` on the grid with the specified value for the weight scale. -\ **Note:** Calling :ref:`update` is not needed after the call of this function. +\ **Note:** Calling :ref:`update()` is not needed after the call of this function. .. rst-class:: classref-item-separator @@ -630,7 +630,7 @@ Returns the weight scale of the point associated with the given ``id``. :ref:`bool` **is_dirty**\ (\ ) |const| :ref:`πŸ”—` -Indicates that the grid parameters were changed and :ref:`update` needs to be called. +Indicates that the grid parameters were changed and :ref:`update()` needs to be called. .. rst-class:: classref-item-separator @@ -680,7 +680,7 @@ Returns ``true`` if a point is disabled for pathfinding. By default, all points Disables or enables the specified point for pathfinding. Useful for making an obstacle. By default, all points are enabled. -\ **Note:** Calling :ref:`update` is not needed after the call of this function. +\ **Note:** Calling :ref:`update()` is not needed after the call of this function. .. rst-class:: classref-item-separator @@ -692,9 +692,9 @@ Disables or enables the specified point for pathfinding. Useful for making an ob |void| **set_point_weight_scale**\ (\ id\: :ref:`Vector2i`, weight_scale\: :ref:`float`\ ) :ref:`πŸ”—` -Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost` when determining the overall cost of traveling across a segment from a neighboring point to this point. +Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. -\ **Note:** Calling :ref:`update` is not needed after the call of this function. +\ **Note:** Calling :ref:`update()` is not needed after the call of this function. .. rst-class:: classref-item-separator @@ -706,7 +706,7 @@ Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scal |void| **update**\ (\ ) :ref:`πŸ”—` -Updates the internal state of the grid according to the parameters to prepare it to search the path. Needs to be called if parameters like :ref:`region`, :ref:`cell_size` or :ref:`offset` are changed. :ref:`is_dirty` will return ``true`` if this is the case and this needs to be called. +Updates the internal state of the grid according to the parameters to prepare it to search the path. Needs to be called if parameters like :ref:`region`, :ref:`cell_size` or :ref:`offset` are changed. :ref:`is_dirty()` will return ``true`` if this is the case and this needs to be called. \ **Note:** All point data (solidity and weight scale) will be cleared. diff --git a/classes/class_audioeffect.rst b/classes/class_audioeffect.rst index ce194fd05af..246ecb36cfe 100644 --- a/classes/class_audioeffect.rst +++ b/classes/class_audioeffect.rst @@ -21,7 +21,7 @@ Base class for audio effect resources. Description ----------- -The base :ref:`Resource` for every audio effect. In the editor, an audio effect can be added to the current bus layout through the Audio panel. At run-time, it is also possible to manipulate audio effects through :ref:`AudioServer.add_bus_effect`, :ref:`AudioServer.remove_bus_effect`, and :ref:`AudioServer.get_bus_effect`. +The base :ref:`Resource` for every audio effect. In the editor, an audio effect can be added to the current bus layout through the Audio panel. At run-time, it is also possible to manipulate audio effects through :ref:`AudioServer.add_bus_effect()`, :ref:`AudioServer.remove_bus_effect()`, and :ref:`AudioServer.get_bus_effect()`. When applied on a bus, an audio effect creates a corresponding :ref:`AudioEffectInstance`. The instance is directly responsible for manipulating the sound, based on the original audio effect's properties. @@ -61,7 +61,7 @@ Method Descriptions :ref:`AudioEffectInstance` **_instantiate**\ (\ ) |virtual| :ref:`πŸ”—` -Override this method to customize the :ref:`AudioEffectInstance` created when this effect is applied on a bus in the editor's Audio panel, or through :ref:`AudioServer.add_bus_effect`. +Override this method to customize the :ref:`AudioEffectInstance` created when this effect is applied on a bus in the editor's Audio panel, or through :ref:`AudioServer.add_bus_effect()`. :: diff --git a/classes/class_audioeffectamplify.rst b/classes/class_audioeffectamplify.rst index 4c40139661f..c983ca17ee1 100644 --- a/classes/class_audioeffectamplify.rst +++ b/classes/class_audioeffectamplify.rst @@ -81,7 +81,7 @@ Amount of amplification in decibels. Positive values make the sound louder, nega Amount of amplification as a linear value. -\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db()` on a value. .. |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_audioeffectcapture.rst b/classes/class_audioeffectcapture.rst index 0d71c927ac4..5d81c4e7fee 100644 --- a/classes/class_audioeffectcapture.rst +++ b/classes/class_audioeffectcapture.rst @@ -21,7 +21,7 @@ Description AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer. -Application code should consume these audio frames from this ring buffer using :ref:`get_buffer` and process it as needed, for example to capture data from an :ref:`AudioStreamMicrophone`, implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating-point PCM. +Application code should consume these audio frames from this ring buffer using :ref:`get_buffer()` and process it as needed, for example to capture data from an :ref:`AudioStreamMicrophone`, implement application-defined effects, or to transmit audio over the network. When capturing audio data from a microphone, the format of the samples will be stereo 32-bit floating-point PCM. Unlike :ref:`AudioEffectRecord`, this effect only returns the raw audio samples instead of encoding them into an :ref:`AudioStream`. @@ -171,7 +171,7 @@ Returns the number of audio frames discarded from the audio bus due to full buff :ref:`int` **get_frames_available**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of frames available to read using :ref:`get_buffer`. +Returns the number of frames available to read using :ref:`get_buffer()`. .. rst-class:: classref-item-separator diff --git a/classes/class_audioeffectinstance.rst b/classes/class_audioeffectinstance.rst index 260d0797be6..a887a778bef 100644 --- a/classes/class_audioeffectinstance.rst +++ b/classes/class_audioeffectinstance.rst @@ -21,7 +21,7 @@ Manipulates the audio it receives for a given effect. Description ----------- -An audio effect instance manipulates the audio it receives for a given effect. This instance is automatically created by an :ref:`AudioEffect` when it is added to a bus, and should usually not be created directly. If necessary, it can be fetched at run-time with :ref:`AudioServer.get_bus_effect_instance`. +An audio effect instance manipulates the audio it receives for a given effect. This instance is automatically created by an :ref:`AudioEffect` when it is added to a bus, and should usually not be created directly. If necessary, it can be fetched at run-time with :ref:`AudioServer.get_bus_effect_instance()`. .. rst-class:: classref-introduction-group @@ -59,7 +59,7 @@ Method Descriptions |void| **_process**\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Called by the :ref:`AudioServer` to process this effect. When :ref:`_process_silence` is not overridden or it returns ``false``, this method is called only when the bus is active. +Called by the :ref:`AudioServer` to process this effect. When :ref:`_process_silence()` is not overridden or it returns ``false``, this method is called only when the bus is active. \ **Note:** It is not useful to override this method in GDScript or C#. Only GDExtension can take advantage of it. @@ -75,7 +75,7 @@ Called by the :ref:`AudioServer` to process this effect. When Override this method to customize the processing behavior of this effect instance. -Should return ``true`` to force the :ref:`AudioServer` to always call :ref:`_process`, even if the bus has been muted or cannot otherwise be heard. +Should return ``true`` to force the :ref:`AudioServer` to always call :ref:`_process()`, even if the bus has been muted or cannot otherwise be heard. .. |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_audioeffectphaser.rst b/classes/class_audioeffectphaser.rst index 82ac3c54040..b2dc8b15c9d 100644 --- a/classes/class_audioeffectphaser.rst +++ b/classes/class_audioeffectphaser.rst @@ -70,7 +70,7 @@ Property Descriptions - |void| **set_depth**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_depth**\ (\ ) -Governs how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from 0.1 to 4. +Determines how high the filter frequencies sweep. Low value will primarily affect bass frequencies. High value can sweep high into the treble. Value can range from ``0.1`` to ``4.0``. .. rst-class:: classref-item-separator diff --git a/classes/class_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index 815bc382db7..cce3433c472 100644 --- a/classes/class_audioeffectspectrumanalyzer.rst +++ b/classes/class_audioeffectspectrumanalyzer.rst @@ -21,7 +21,7 @@ Description This audio effect does not affect sound output, but can be used for real-time audio visualizations. -This resource configures an :ref:`AudioEffectSpectrumAnalyzerInstance`, which performs the actual analysis at runtime. An instance can be obtained with :ref:`AudioServer.get_bus_effect_instance`. +This resource configures an :ref:`AudioEffectSpectrumAnalyzerInstance`, which performs the actual analysis at runtime. An instance can be obtained with :ref:`AudioServer.get_bus_effect_instance()`. See also :ref:`AudioStreamGenerator` for procedurally generating sounds. diff --git a/classes/class_audioeffectspectrumanalyzerinstance.rst b/classes/class_audioeffectspectrumanalyzerinstance.rst index c921e8674a5..bca722fbf68 100644 --- a/classes/class_audioeffectspectrumanalyzerinstance.rst +++ b/classes/class_audioeffectspectrumanalyzerinstance.rst @@ -21,7 +21,7 @@ Description The runtime part of an :ref:`AudioEffectSpectrumAnalyzer`, which can be used to query the magnitude of a frequency range on its host bus. -An instance of this class can be obtained with :ref:`AudioServer.get_bus_effect_instance`. +An instance of this class can be obtained with :ref:`AudioServer.get_bus_effect_instance()`. .. rst-class:: classref-introduction-group diff --git a/classes/class_audiolistener2d.rst b/classes/class_audiolistener2d.rst index 20aeb83275a..18deec5933a 100644 --- a/classes/class_audiolistener2d.rst +++ b/classes/class_audiolistener2d.rst @@ -22,7 +22,7 @@ Overrides the location sounds are heard from. Description ----------- -Once added to the scene tree and enabled using :ref:`make_current`, this node will override the location sounds are heard from. Only one **AudioListener2D** can be current. Using :ref:`make_current` will disable the previous **AudioListener2D**. +Once added to the scene tree and enabled using :ref:`make_current()`, this node will override the location sounds are heard from. Only one **AudioListener2D** can be current. Using :ref:`make_current()` will disable the previous **AudioListener2D**. If there is no active **AudioListener2D** in the current :ref:`Viewport`, center of the screen will be used as a hearing point for the audio. **AudioListener2D** needs to be inside :ref:`SceneTree` to function. diff --git a/classes/class_audiolistener3d.rst b/classes/class_audiolistener3d.rst index c985ec7f0fb..a2867d90f2c 100644 --- a/classes/class_audiolistener3d.rst +++ b/classes/class_audiolistener3d.rst @@ -22,7 +22,7 @@ Overrides the location sounds are heard from. Description ----------- -Once added to the scene tree and enabled using :ref:`make_current`, this node will override the location sounds are heard from. This can be used to listen from a location different from the :ref:`Camera3D`. +Once added to the scene tree and enabled using :ref:`make_current()`, this node will override the location sounds are heard from. This can be used to listen from a location different from the :ref:`Camera3D`. .. rst-class:: classref-reftable-group @@ -81,7 +81,7 @@ Returns the listener's global orthonormalized :ref:`Transform3D` **is_current**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the listener was made current using :ref:`make_current`, ``false`` otherwise. +Returns ``true`` if the listener was made current using :ref:`make_current()`, ``false`` otherwise. \ **Note:** There may be more than one AudioListener3D marked as "current" in the scene tree, but only the one that was made current last will be used. diff --git a/classes/class_audioserver.rst b/classes/class_audioserver.rst index c0f40d3357b..01305e0fc71 100644 --- a/classes/class_audioserver.rst +++ b/classes/class_audioserver.rst @@ -319,7 +319,7 @@ Number of available audio buses. - |void| **set_input_device**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_input_device**\ (\ ) -Name of the current device for audio input (see :ref:`get_input_device_list`). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value ``"Default"`` will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to ``"Default"``. +Name of the current device for audio input (see :ref:`get_input_device_list()`). On systems with multiple audio inputs (such as analog, USB and HDMI audio), this can be used to select the audio input device. The value ``"Default"`` will record audio on the system-wide default audio input. If an invalid device name is set, the value will be reverted back to ``"Default"``. \ **Note:** :ref:`ProjectSettings.audio/driver/enable_input` must be ``true`` for audio input to work. See also that setting's description for caveats related to permissions and operating system privacy settings. @@ -338,7 +338,7 @@ Name of the current device for audio input (see :ref:`get_input_device_list`\ ) - :ref:`String` **get_output_device**\ (\ ) -Name of the current device for audio output (see :ref:`get_output_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"``. +Name of the current device for audio output (see :ref:`get_output_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"``. .. rst-class:: classref-item-separator @@ -530,7 +530,7 @@ Returns the volume of the bus at index ``bus_idx`` in dB. Returns the volume of the bus at index ``bus_idx`` as a linear value. -\ **Note:** The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on the result of :ref:`get_bus_volume_db`. +\ **Note:** The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()` on the result of :ref:`get_bus_volume_db()`. .. rst-class:: classref-item-separator @@ -606,7 +606,7 @@ Returns the names of all audio output devices detected on the system. Returns the audio driver's effective output latency. This is based on :ref:`ProjectSettings.audio/driver/output_latency`, but the exact returned value will differ depending on the operating system and audio driver. -\ **Note:** This can be expensive; it is not recommended to call :ref:`get_output_latency` every frame. +\ **Note:** This can be expensive; it is not recommended to call :ref:`get_output_latency()` every frame. .. rst-class:: classref-item-separator @@ -706,7 +706,7 @@ If ``true``, the bus at index ``bus_idx`` is in solo mode. If ``true``, the stream is registered as a sample. The engine will not have to register it before playing the sample. -If ``false``, the stream will have to be registered before playing it. To prevent lag spikes, register the stream as sample with :ref:`register_stream_as_sample`. +If ``false``, the stream will have to be registered before playing it. To prevent lag spikes, register the stream as sample with :ref:`register_stream_as_sample()`. .. rst-class:: classref-item-separator @@ -882,7 +882,7 @@ Sets the volume in decibels of the bus at index ``bus_idx`` to ``volume_db``. Sets the volume as a linear value of the bus at index ``bus_idx`` to ``volume_linear``. -\ **Note:** Using this method is equivalent to calling :ref:`set_bus_volume_db` with the result of :ref:`@GlobalScope.linear_to_db` on a value. +\ **Note:** Using this method is equivalent to calling :ref:`set_bus_volume_db()` with the result of :ref:`@GlobalScope.linear_to_db()` on a value. .. rst-class:: classref-item-separator @@ -894,7 +894,7 @@ Sets the volume as a linear value of the bus at index ``bus_idx`` to ``volume_li |void| **set_enable_tagging_used_audio_streams**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -If set to ``true``, all instances of :ref:`AudioStreamPlayback` will call :ref:`AudioStreamPlayback._tag_used_streams` every mix step. +If set to ``true``, all instances of :ref:`AudioStreamPlayback` will call :ref:`AudioStreamPlayback._tag_used_streams()` every mix step. \ **Note:** This is enabled by default in the editor, as it is used by editor plugins for the audio stream previews. diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index 504bd968144..80754419189 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -148,7 +148,7 @@ Ideally, the returned value should be based off the stream's sample rate (:ref:` :ref:`float` **_get_length**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to customize the returned value of :ref:`get_length`. Should return the length of this audio stream, in seconds. +Override this method to customize the returned value of :ref:`get_length()`. Should return the length of this audio stream, in seconds. .. rst-class:: classref-item-separator @@ -160,7 +160,7 @@ Override this method to customize the returned value of :ref:`get_length`\[:ref:`Dictionary`\] **_get_parameter_list**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Return the controllable parameters of this stream. This array contains dictionaries with a property info description format (see :ref:`Object.get_property_list`). Additionally, the default value for this parameter must be added tho each dictionary in "default_value" field. +Return the controllable parameters of this stream. This array contains dictionaries with a property info description format (see :ref:`Object.get_property_list()`). Additionally, the default value for this parameter must be added tho each dictionary in "default_value" field. .. rst-class:: classref-item-separator @@ -196,7 +196,7 @@ Override this method to return ``true`` if this stream has a loop. :ref:`AudioStreamPlayback` **_instantiate_playback**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to customize the returned value of :ref:`instantiate_playback`. Should return a new :ref:`AudioStreamPlayback` created when the stream is played (such as by an :ref:`AudioStreamPlayer`). +Override this method to customize the returned value of :ref:`instantiate_playback()`. Should return a new :ref:`AudioStreamPlayback` created when the stream is played (such as by an :ref:`AudioStreamPlayer`). .. rst-class:: classref-item-separator @@ -208,7 +208,7 @@ Override this method to customize the returned value of :ref:`instantiate_playba :ref:`bool` **_is_monophonic**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to customize the returned value of :ref:`is_monophonic`. Should return ``true`` if this audio stream only supports one channel. +Override this method to customize the returned value of :ref:`is_monophonic()`. Should return ``true`` if this audio stream only supports one channel. .. rst-class:: classref-item-separator @@ -260,7 +260,7 @@ Returns the length of the audio stream in seconds. :ref:`AudioStreamPlayback` **instantiate_playback**\ (\ ) :ref:`πŸ”—` -Returns a newly created :ref:`AudioStreamPlayback` intended to play this audio stream. Useful for when you want to extend :ref:`_instantiate_playback` but call :ref:`instantiate_playback` from an internally held AudioStream subresource. An example of this can be found in the source code for ``AudioStreamRandomPitch::instantiate_playback``. +Returns a newly created :ref:`AudioStreamPlayback` intended to play this audio stream. Useful for when you want to extend :ref:`_instantiate_playback()` but call :ref:`instantiate_playback()` from an internally held AudioStream subresource. An example of this can be found in the source code for ``AudioStreamRandomPitch::instantiate_playback``. .. rst-class:: classref-item-separator diff --git a/classes/class_audiostreamgenerator.rst b/classes/class_audiostreamgenerator.rst index f3db3aed482..2cec0144fb0 100644 --- a/classes/class_audiostreamgenerator.rst +++ b/classes/class_audiostreamgenerator.rst @@ -31,6 +31,7 @@ Here's a sample on how to use it to generate a sine wave: var playback # Will hold the AudioStreamGeneratorPlayback. @onready var sample_hz = $AudioStreamPlayer.stream.mix_rate var pulse_hz = 440.0 # The frequency of the sound wave. + var phase = 0.0 func _ready(): $AudioStreamPlayer.play() @@ -38,7 +39,6 @@ Here's a sample on how to use it to generate a sine wave: fill_buffer() func fill_buffer(): - var phase = 0.0 var increment = pulse_hz / sample_hz var frames_available = playback.get_frames_available() @@ -53,6 +53,7 @@ Here's a sample on how to use it to generate a sine wave: private AudioStreamGeneratorPlayback _playback; // Will hold the AudioStreamGeneratorPlayback. private float _sampleHz; private float _pulseHz = 440.0f; // The frequency of the sound wave. + private double phase = 0.0; public override void _Ready() { @@ -67,7 +68,6 @@ Here's a sample on how to use it to generate a sine wave: public void FillBuffer() { - double phase = 0.0; float increment = _pulseHz / _sampleHz; int framesAvailable = _playback.GetFramesAvailable(); @@ -101,11 +101,60 @@ Properties .. table:: :widths: auto - +---------------------------+-------------------------------------------------------------------------+-------------+ - | :ref:`float` | :ref:`buffer_length` | ``0.5`` | - +---------------------------+-------------------------------------------------------------------------+-------------+ - | :ref:`float` | :ref:`mix_rate` | ``44100.0`` | - +---------------------------+-------------------------------------------------------------------------+-------------+ + +-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`buffer_length` | ``0.5`` | + +-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+-------------+ + | :ref:`float` | :ref:`mix_rate` | ``44100.0`` | + +-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+-------------+ + | :ref:`AudioStreamGeneratorMixRate` | :ref:`mix_rate_mode` | ``2`` | + +-------------------------------------------------------------------------------------------+-------------------------------------------------------------------------+-------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_AudioStreamGenerator_AudioStreamGeneratorMixRate: + +.. rst-class:: classref-enumeration + +enum **AudioStreamGeneratorMixRate**: :ref:`πŸ”—` + +.. _class_AudioStreamGenerator_constant_MIX_RATE_OUTPUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AudioStreamGeneratorMixRate` **MIX_RATE_OUTPUT** = ``0`` + +Current :ref:`AudioServer` output mixing rate. + +.. _class_AudioStreamGenerator_constant_MIX_RATE_INPUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AudioStreamGeneratorMixRate` **MIX_RATE_INPUT** = ``1`` + +Current :ref:`AudioServer` input mixing rate. + +.. _class_AudioStreamGenerator_constant_MIX_RATE_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`AudioStreamGeneratorMixRate` **MIX_RATE_CUSTOM** = ``2`` + +Custom mixing rate, specified by :ref:`mix_rate`. + +.. _class_AudioStreamGenerator_constant_MIX_RATE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`AudioStreamGeneratorMixRate` **MIX_RATE_MAX** = ``3`` + +Maximum value for the mixing rate mode enum. .. rst-class:: classref-section-separator @@ -150,6 +199,27 @@ In games, common sample rates in use are ``11025``, ``16000``, ``22050``, ``3200 According to the `Nyquist-Shannon sampling theorem `__, there is no quality difference to human hearing when going past 40,000 Hz (since most humans can only hear up to ~20,000 Hz, often less). If you are generating lower-pitched sounds such as voices, lower sample rates such as ``32000`` or ``22050`` may be usable with no loss in quality. +\ **Note:** **AudioStreamGenerator** is not automatically resampling input data, to produce expected result :ref:`mix_rate_mode` should match the sampling rate of input data. + +\ **Note:** If you are using :ref:`AudioEffectCapture` as the source of your data, set :ref:`mix_rate_mode` to :ref:`MIX_RATE_INPUT` or :ref:`MIX_RATE_OUTPUT` to automatically match current :ref:`AudioServer` mixing rate. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamGenerator_property_mix_rate_mode: + +.. rst-class:: classref-property + +:ref:`AudioStreamGeneratorMixRate` **mix_rate_mode** = ``2`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_mix_rate_mode**\ (\ value\: :ref:`AudioStreamGeneratorMixRate`\ ) +- :ref:`AudioStreamGeneratorMixRate` **get_mix_rate_mode**\ (\ ) + +Mixing rate mode. If set to :ref:`MIX_RATE_CUSTOM`, :ref:`mix_rate` is used, otherwise current :ref:`AudioServer` mixing rate is used. + .. |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_audiostreamgeneratorplayback.rst b/classes/class_audiostreamgeneratorplayback.rst index 99121c1916e..872711bcdcf 100644 --- a/classes/class_audiostreamgeneratorplayback.rst +++ b/classes/class_audiostreamgeneratorplayback.rst @@ -115,7 +115,7 @@ Returns the number of times the playback skipped due to a buffer underrun in the :ref:`bool` **push_buffer**\ (\ frames\: :ref:`PackedVector2Array`\ ) :ref:`πŸ”—` -Pushes several audio data frames to the buffer. This is usually more efficient than :ref:`push_frame` in C# and compiled languages via GDExtension, but :ref:`push_buffer` may be *less* efficient in GDScript. +Pushes several audio data frames to the buffer. This is usually more efficient than :ref:`push_frame()` in C# and compiled languages via GDExtension, but :ref:`push_buffer()` may be *less* efficient in GDScript. .. rst-class:: classref-item-separator @@ -127,7 +127,7 @@ Pushes several audio data frames to the buffer. This is usually more efficient t :ref:`bool` **push_frame**\ (\ frame\: :ref:`Vector2`\ ) :ref:`πŸ”—` -Pushes a single audio data frame to the buffer. This is usually less efficient than :ref:`push_buffer` in C# and compiled languages via GDExtension, but :ref:`push_frame` may be *more* efficient in GDScript. +Pushes a single audio data frame to the buffer. This is usually less efficient than :ref:`push_buffer()` in C# and compiled languages via GDExtension, but :ref:`push_frame()` may be *more* efficient in GDScript. .. |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_audiostreaminteractive.rst b/classes/class_audiostreaminteractive.rst index e13f076d001..8dd684bb2d0 100644 --- a/classes/class_audiostreaminteractive.rst +++ b/classes/class_audiostreaminteractive.rst @@ -19,7 +19,7 @@ Audio stream that can playback music interactively, combining clips and a transi Description ----------- -This is an audio stream that can playback music interactively, combining clips and a transition table. Clips must be added first, and then the transition rules via the :ref:`add_transition`. Additionally, this stream exports a property parameter to control the playback via :ref:`AudioStreamPlayer`, :ref:`AudioStreamPlayer2D`, or :ref:`AudioStreamPlayer3D`. +This is an audio stream that can playback music interactively, combining clips and a transition table. Clips must be added first, and then the transition rules via the :ref:`add_transition()`. Additionally, this stream exports a property parameter to control the playback via :ref:`AudioStreamPlayer`, :ref:`AudioStreamPlayer2D`, or :ref:`AudioStreamPlayer3D`. The way this is used is by filling a number of clips, then configuring the transition table. From there, clips are selected for playback and the music will smoothly go from the current to the new one while using the corresponding transition rule defined in the transition table. @@ -240,7 +240,7 @@ Enable auto-advance, a clip must be specified. :ref:`AutoAdvanceMode` **AUTO_ADVANCE_RETURN_TO_HOLD** = ``2`` -Enable auto-advance, but instead of specifying a clip, the playback will return to hold (see :ref:`add_transition`). +Enable auto-advance, but instead of specifying a clip, the playback will return to hold (see :ref:`add_transition()`). .. rst-class:: classref-section-separator @@ -351,7 +351,7 @@ Erase a transition by providing ``from_clip`` and ``to_clip`` clip indices. :ref :ref:`AutoAdvanceMode` **get_clip_auto_advance**\ (\ clip_index\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return whether a clip has auto-advance enabled. See :ref:`set_clip_auto_advance`. +Return whether a clip has auto-advance enabled. See :ref:`set_clip_auto_advance()`. .. rst-class:: classref-item-separator @@ -399,7 +399,7 @@ Return the :ref:`AudioStream` associated with a clip. :ref:`float` **get_transition_fade_beats**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return the time (in beats) for a transition (see :ref:`add_transition`). +Return the time (in beats) for a transition (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -411,7 +411,7 @@ Return the time (in beats) for a transition (see :ref:`add_transition` **get_transition_fade_mode**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return the mode for a transition (see :ref:`add_transition`). +Return the mode for a transition (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -423,7 +423,7 @@ Return the mode for a transition (see :ref:`add_transition` **get_transition_filler_clip**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return the filler clip for a transition (see :ref:`add_transition`). +Return the filler clip for a transition (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -435,7 +435,7 @@ Return the filler clip for a transition (see :ref:`add_transition` **get_transition_from_time**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return the source time position for a transition (see :ref:`add_transition`). +Return the source time position for a transition (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -459,7 +459,7 @@ Return the list of transitions (from, to interleaved). :ref:`TransitionToTime` **get_transition_to_time**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return the destination time position for a transition (see :ref:`add_transition`). +Return the destination time position for a transition (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -471,7 +471,7 @@ Return the destination time position for a transition (see :ref:`add_transition< :ref:`bool` **has_transition**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if a given transition exists (was added via :ref:`add_transition`). +Returns ``true`` if a given transition exists (was added via :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -483,7 +483,7 @@ Returns ``true`` if a given transition exists (was added via :ref:`add_transitio :ref:`bool` **is_transition_holding_previous**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return whether a transition uses the *hold previous* functionality (see :ref:`add_transition`). +Return whether a transition uses the *hold previous* functionality (see :ref:`add_transition()`). .. rst-class:: classref-item-separator @@ -495,7 +495,7 @@ Return whether a transition uses the *hold previous* functionality (see :ref:`ad :ref:`bool` **is_transition_using_filler_clip**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Return whether a transition uses the *filler clip* functionality (see :ref:`add_transition`). +Return whether a transition uses the *filler clip* functionality (see :ref:`add_transition()`). .. rst-class:: classref-item-separator diff --git a/classes/class_audiostreammp3.rst b/classes/class_audiostreammp3.rst index 982486b2c4b..98372791a12 100644 --- a/classes/class_audiostreammp3.rst +++ b/classes/class_audiostreammp3.rst @@ -21,6 +21,8 @@ Description MP3 audio stream driver. See :ref:`data` if you want to load an MP3 file at run-time. +\ **Note:** This class can optionally support legacy MP1 and MP2 formats, provided that the engine is compiled with the ``minimp3_extra_formats=yes`` SCons option. These extra formats are not enabled by default. + .. rst-class:: classref-reftable-group Properties @@ -43,6 +45,20 @@ Properties | :ref:`float` | :ref:`loop_offset` | ``0.0`` | +-----------------------------------------------+---------------------------------------------------------------+-----------------------+ +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamMP3` | :ref:`load_from_buffer`\ (\ stream_data\: :ref:`PackedByteArray`\ ) |static| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamMP3` | :ref:`load_from_file`\ (\ path\: :ref:`String`\ ) |static| | + +---------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + .. rst-class:: classref-section-separator ---- @@ -183,6 +199,35 @@ If ``true``, the stream will automatically loop when it reaches the end. Time in seconds at which the stream starts after being looped. +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AudioStreamMP3_method_load_from_buffer: + +.. rst-class:: classref-method + +:ref:`AudioStreamMP3` **load_from_buffer**\ (\ stream_data\: :ref:`PackedByteArray`\ ) |static| :ref:`πŸ”—` + +Creates a new **AudioStreamMP3** instance from the given buffer. The buffer must contain MP3 data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamMP3_method_load_from_file: + +.. rst-class:: classref-method + +:ref:`AudioStreamMP3` **load_from_file**\ (\ path\: :ref:`String`\ ) |static| :ref:`πŸ”—` + +Creates a new **AudioStreamMP3** instance from the given file path. The file must be in MP3 format. + .. |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_audiostreamoggvorbis.rst b/classes/class_audiostreamoggvorbis.rst index 645d27737da..f6ecc928166 100644 --- a/classes/class_audiostreamoggvorbis.rst +++ b/classes/class_audiostreamoggvorbis.rst @@ -58,11 +58,11 @@ Methods .. table:: :widths: auto - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamOggVorbis` | :ref:`load_from_buffer`\ (\ buffer\: :ref:`PackedByteArray`\ ) |static| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamOggVorbis` | :ref:`load_from_file`\ (\ path\: :ref:`String`\ ) |static| | - +---------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamOggVorbis` | :ref:`load_from_buffer`\ (\ stream_data\: :ref:`PackedByteArray`\ ) |static| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamOggVorbis` | :ref:`load_from_file`\ (\ path\: :ref:`String`\ ) |static| | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -190,9 +190,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`AudioStreamOggVorbis` **load_from_buffer**\ (\ buffer\: :ref:`PackedByteArray`\ ) |static| :ref:`πŸ”—` +:ref:`AudioStreamOggVorbis` **load_from_buffer**\ (\ stream_data\: :ref:`PackedByteArray`\ ) |static| :ref:`πŸ”—` -Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer must contain Ogg Vorbis data. +Creates a new **AudioStreamOggVorbis** instance from the given buffer. The buffer must contain Ogg Vorbis data. .. rst-class:: classref-item-separator @@ -204,7 +204,7 @@ Creates a new AudioStreamOggVorbis instance from the given buffer. The buffer mu :ref:`AudioStreamOggVorbis` **load_from_file**\ (\ path\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Creates a new AudioStreamOggVorbis instance from the given file path. The file must be in Ogg Vorbis format. +Creates a new **AudioStreamOggVorbis** instance from the given file path. The file must be in Ogg Vorbis format. .. |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_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index 5d91093e10c..882fbffd9b1 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -105,7 +105,7 @@ Overridable method. Should return how many times this audio stream has looped. M :ref:`Variant` **_get_parameter**\ (\ name\: :ref:`StringName`\ ) |virtual| |const| :ref:`πŸ”—` -Return the current value of a playback parameter by name (see :ref:`AudioStream._get_parameter_list`). +Return the current value of a playback parameter by name (see :ref:`AudioStream._get_parameter_list()`). .. rst-class:: classref-item-separator @@ -155,7 +155,7 @@ Override this method to customize how the audio stream is mixed. This method is |void| **_seek**\ (\ position\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Override this method to customize what happens when seeking this audio stream at the given ``position``, such as by calling :ref:`AudioStreamPlayer.seek`. +Override this method to customize what happens when seeking this audio stream at the given ``position``, such as by calling :ref:`AudioStreamPlayer.seek()`. .. rst-class:: classref-item-separator @@ -167,7 +167,7 @@ Override this method to customize what happens when seeking this audio stream at |void| **_set_parameter**\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Set the current value of a playback parameter by name (see :ref:`AudioStream._get_parameter_list`). +Set the current value of a playback parameter by name (see :ref:`AudioStream._get_parameter_list()`). .. rst-class:: classref-item-separator @@ -179,7 +179,7 @@ Set the current value of a playback parameter by name (see :ref:`AudioStream._ge |void| **_start**\ (\ from_pos\: :ref:`float`\ ) |virtual| :ref:`πŸ”—` -Override this method to customize what happens when the playback starts at the given position, such as by calling :ref:`AudioStreamPlayer.play`. +Override this method to customize what happens when the playback starts at the given position, such as by calling :ref:`AudioStreamPlayer.play()`. .. rst-class:: classref-item-separator @@ -191,7 +191,7 @@ Override this method to customize what happens when the playback starts at the g |void| **_stop**\ (\ ) |virtual| :ref:`πŸ”—` -Override this method to customize what happens when the playback is stopped, such as by calling :ref:`AudioStreamPlayer.stop`. +Override this method to customize what happens when the playback is stopped, such as by calling :ref:`AudioStreamPlayer.stop()`. .. rst-class:: classref-item-separator @@ -203,7 +203,7 @@ Override this method to customize what happens when the playback is stopped, suc |void| **_tag_used_streams**\ (\ ) |virtual| :ref:`πŸ”—` -Overridable method. Called whenever the audio stream is mixed if the playback is active and :ref:`AudioServer.set_enable_tagging_used_audio_streams` has been set to ``true``. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview. +Overridable method. Called whenever the audio stream is mixed if the playback is active and :ref:`AudioServer.set_enable_tagging_used_audio_streams()` has been set to ``true``. Editor plugins may use this method to "tag" the current position along the audio stream and display it in a preview. .. rst-class:: classref-item-separator diff --git a/classes/class_audiostreamplaybackinteractive.rst b/classes/class_audiostreamplaybackinteractive.rst index d51f037faf7..20d134182fa 100644 --- a/classes/class_audiostreamplaybackinteractive.rst +++ b/classes/class_audiostreamplaybackinteractive.rst @@ -52,7 +52,7 @@ Method Descriptions :ref:`int` **get_current_clip_index**\ (\ ) |const| :ref:`πŸ”—` -Return the index of the currently playing clip. You can use this to get the name of the currently playing clip with :ref:`AudioStreamInteractive.get_clip_name`. +Return the index of the currently playing clip. You can use this to get the name of the currently playing clip with :ref:`AudioStreamInteractive.get_clip_name()`. \ **Example:** Get the currently playing clip name from inside an :ref:`AudioStreamPlayer` node. diff --git a/classes/class_audiostreamplaybackpolyphonic.rst b/classes/class_audiostreamplaybackpolyphonic.rst index 4a4199c9c9c..d879b4df4f0 100644 --- a/classes/class_audiostreamplaybackpolyphonic.rst +++ b/classes/class_audiostreamplaybackpolyphonic.rst @@ -19,7 +19,7 @@ Playback instance for :ref:`AudioStreamPolyphonic`. Description ----------- -Playback instance for :ref:`AudioStreamPolyphonic`. After setting the ``stream`` property of :ref:`AudioStreamPlayer`, :ref:`AudioStreamPlayer2D`, or :ref:`AudioStreamPlayer3D`, the playback instance can be obtained by calling :ref:`AudioStreamPlayer.get_stream_playback`, :ref:`AudioStreamPlayer2D.get_stream_playback` or :ref:`AudioStreamPlayer3D.get_stream_playback` methods. +Playback instance for :ref:`AudioStreamPolyphonic`. After setting the ``stream`` property of :ref:`AudioStreamPlayer`, :ref:`AudioStreamPlayer2D`, or :ref:`AudioStreamPlayer3D`, the playback instance can be obtained by calling :ref:`AudioStreamPlayer.get_stream_playback()`, :ref:`AudioStreamPlayer2D.get_stream_playback()` or :ref:`AudioStreamPlayer3D.get_stream_playback()` methods. .. rst-class:: classref-reftable-group @@ -56,7 +56,7 @@ Constants **INVALID_ID** = ``-1`` :ref:`πŸ”—` -Returned by :ref:`play_stream` in case it could not allocate a stream for playback. +Returned by :ref:`play_stream()` in case it could not allocate a stream for playback. .. rst-class:: classref-section-separator @@ -73,7 +73,7 @@ Method Descriptions :ref:`bool` **is_stream_playing**\ (\ stream\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the stream associated with the given integer ID is still playing. Check :ref:`play_stream` for information on when this ID becomes invalid. +Returns ``true`` if the stream associated with the given integer ID is still playing. Check :ref:`play_stream()` for information on when this ID becomes invalid. .. rst-class:: classref-item-separator @@ -89,7 +89,7 @@ Play an :ref:`AudioStream` at a given offset, volume, pitch s The return value is a unique integer ID that is associated to this playback stream and which can be used to control it. -This ID becomes invalid when the stream ends (if it does not loop), when the **AudioStreamPlaybackPolyphonic** is stopped, or when :ref:`stop_stream` is called. +This ID becomes invalid when the stream ends (if it does not loop), when the **AudioStreamPlaybackPolyphonic** is stopped, or when :ref:`stop_stream()` is called. This function returns :ref:`INVALID_ID` if the amount of streams currently playing equals :ref:`AudioStreamPolyphonic.polyphony`. If you need a higher amount of maximum polyphony, raise this value. @@ -103,7 +103,7 @@ This function returns :ref:`INVALID_ID`, pitch_scale\: :ref:`float`\ ) :ref:`πŸ”—` -Change the stream pitch scale. The ``stream`` argument is an integer ID returned by :ref:`play_stream`. +Change the stream pitch scale. The ``stream`` argument is an integer ID returned by :ref:`play_stream()`. .. rst-class:: classref-item-separator @@ -115,7 +115,7 @@ Change the stream pitch scale. The ``stream`` argument is an integer ID returned |void| **set_stream_volume**\ (\ stream\: :ref:`int`, volume_db\: :ref:`float`\ ) :ref:`πŸ”—` -Change the stream volume (in db). The ``stream`` argument is an integer ID returned by :ref:`play_stream`. +Change the stream volume (in db). The ``stream`` argument is an integer ID returned by :ref:`play_stream()`. .. rst-class:: classref-item-separator @@ -127,7 +127,7 @@ Change the stream volume (in db). The ``stream`` argument is an integer ID retur |void| **stop_stream**\ (\ stream\: :ref:`int`\ ) :ref:`πŸ”—` -Stop a stream. The ``stream`` argument is an integer ID returned by :ref:`play_stream`, which becomes invalid after calling this function. +Stop a stream. The ``stream`` argument is an integer ID returned by :ref:`play_stream()`, which becomes invalid after calling this function. .. |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_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index 8ec3e96e943..bfd65926d60 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -114,7 +114,7 @@ Signals **finished**\ (\ ) :ref:`πŸ”—` -Emitted when a sound finishes playing without interruptions. This signal is *not* emitted when calling :ref:`stop`, or when exiting the tree while sounds are playing. +Emitted when a sound finishes playing without interruptions. This signal is *not* emitted when calling :ref:`stop()`, or when exiting the tree while sounds are playing. .. rst-class:: classref-section-separator @@ -175,7 +175,7 @@ Property Descriptions - |void| **set_autoplay**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_autoplay_enabled**\ (\ ) -If ``true``, this node calls :ref:`play` when entering the tree. +If ``true``, this node calls :ref:`play()` when entering the tree. .. rst-class:: classref-item-separator @@ -194,7 +194,7 @@ If ``true``, this node calls :ref:`play` wh The target bus name. All sounds from this node will be playing on this bus. -\ **Note:** At runtime, if no bus with the given name exists, all sounds will fall back on ``"Master"``. See also :ref:`AudioServer.get_bus_name`. +\ **Note:** At runtime, if no bus with the given name exists, all sounds will fall back on ``"Master"``. See also :ref:`AudioServer.get_bus_name()`. .. rst-class:: classref-item-separator @@ -211,7 +211,7 @@ The target bus name. All sounds from this node will be playing on this bus. - |void| **set_max_polyphony**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_max_polyphony**\ (\ ) -The maximum number of sounds this node can play at the same time. Calling :ref:`play` after this value is reached will cut off the oldest sounds. +The maximum number of sounds this node can play at the same time. Calling :ref:`play()` after this value is reached will cut off the oldest sounds. .. rst-class:: classref-item-separator @@ -281,7 +281,7 @@ The playback type of the stream player. If set other than to the default value, - |void| **set_playing**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_playing**\ (\ ) -If ``true``, this node is playing sounds. Setting this property has the same effect as :ref:`play` and :ref:`stop`. +If ``true``, this node is playing sounds. Setting this property has the same effect as :ref:`play()` and :ref:`stop()`. .. rst-class:: classref-item-separator @@ -336,7 +336,7 @@ If ``true``, the sounds are paused. Setting :ref:`stream_paused`'s volume. -\ **Note:** To convert between decibel and linear energy (like most volume sliders do), use :ref:`volume_linear`, or :ref:`@GlobalScope.db_to_linear` and :ref:`@GlobalScope.linear_to_db`. +\ **Note:** To convert between decibel and linear energy (like most volume sliders do), use :ref:`volume_linear`, or :ref:`@GlobalScope.db_to_linear()` and :ref:`@GlobalScope.linear_to_db()`. .. rst-class:: classref-item-separator @@ -355,7 +355,7 @@ Volume of sound, in decibels. This is an offset of the :ref:`stream` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db()` on a value. .. rst-class:: classref-section-separator @@ -374,7 +374,7 @@ Method Descriptions Returns the position in the :ref:`AudioStream` of the latest sound, in seconds. Returns ``0.0`` if no sounds are playing. -\ **Note:** The position is not always accurate, as the :ref:`AudioServer` does not mix audio every processed frame. To get more accurate results, add :ref:`AudioServer.get_time_since_last_mix` to the returned position. +\ **Note:** The position is not always accurate, as the :ref:`AudioServer` does not mix audio every processed frame. To get more accurate results, add :ref:`AudioServer.get_time_since_last_mix()` to the returned position. \ **Note:** This method always returns ``0.0`` if the :ref:`stream` is an :ref:`AudioStreamInteractive`, since it can have multiple clips playing at once. @@ -388,7 +388,7 @@ Returns the position in the :ref:`AudioStream` of the latest :ref:`AudioStreamPlayback` **get_stream_playback**\ (\ ) :ref:`πŸ”—` -Returns the latest :ref:`AudioStreamPlayback` of this node, usually the most recently created by :ref:`play`. If no sounds are playing, this method fails and returns an empty playback. +Returns the latest :ref:`AudioStreamPlayback` of this node, usually the most recently created by :ref:`play()`. If no sounds are playing, this method fails and returns an empty playback. .. rst-class:: classref-item-separator @@ -400,7 +400,7 @@ Returns the latest :ref:`AudioStreamPlayback` of this :ref:`bool` **has_stream_playback**\ (\ ) :ref:`πŸ”—` -Returns ``true`` if any sound is active, even if :ref:`stream_paused` is set to ``true``. See also :ref:`playing` and :ref:`get_stream_playback`. +Returns ``true`` if any sound is active, even if :ref:`stream_paused` is set to ``true``. See also :ref:`playing` and :ref:`get_stream_playback()`. .. rst-class:: classref-item-separator diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index 089af165b40..3224a44c76f 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -24,7 +24,7 @@ Description Plays audio that is attenuated with distance to the listener. -By default, audio is heard from the screen center. This can be changed by adding an :ref:`AudioListener2D` node to the scene and enabling it by calling :ref:`AudioListener2D.make_current` on it. +By default, audio is heard from the screen center. This can be changed by adding an :ref:`AudioListener2D` node to the scene and enabling it by calling :ref:`AudioListener2D.make_current()` on it. See also :ref:`AudioStreamPlayer` to play a sound non-positionally. @@ -291,7 +291,7 @@ The playback type of the stream player. If set other than to the default value, - |void| **set_playing**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_playing**\ (\ ) -If ``true``, audio is playing or is queued to be played (see :ref:`play`). +If ``true``, audio is playing or is queued to be played (see :ref:`play()`). .. rst-class:: classref-item-separator @@ -361,7 +361,7 @@ Base volume before attenuation, in decibels. Base volume before attenuation, as a linear value. -\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db()` on a value. .. rst-class:: classref-section-separator diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index e6132685359..c19ab73ad59 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -24,7 +24,7 @@ Description Plays audio with positional sound effects, based on the relative position of the audio listener. Positional effects include distance attenuation, directionality, and the Doppler effect. For greater realism, a low-pass filter is applied to distant sounds. This can be disabled by setting :ref:`attenuation_filter_cutoff_hz` to ``20500``. -By default, audio is heard from the camera position. This can be changed by adding an :ref:`AudioListener3D` node to the scene and enabling it by calling :ref:`AudioListener3D.make_current` on it. +By default, audio is heard from the camera position. This can be changed by adding an :ref:`AudioListener3D` node to the scene and enabling it by calling :ref:`AudioListener3D.make_current()` on it. See also :ref:`AudioStreamPlayer` to play a sound non-positionally. @@ -454,7 +454,11 @@ The maximum number of sounds this node can play at the same time. Playing additi - |void| **set_panning_strength**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_panning_strength**\ (\ ) -Scales the panning strength for this node by multiplying the base :ref:`ProjectSettings.audio/general/3d_panning_strength` with this factor. Higher values will pan audio from left to right more dramatically than lower values. +Scales the panning strength for this node by multiplying the base :ref:`ProjectSettings.audio/general/3d_panning_strength` by this factor. If the product is ``0.0`` then stereo panning is disabled and the volume is the same for all channels. If the product is ``1.0`` then one of the channels will be muted when the sound is located exactly to the left (or right) of the listener. + +Two speaker stereo arrangements implement the `WebAudio standard for StereoPannerNode Panning `__ where the volume is cosine of half the azimuth angle to the ear. + +For other speaker arrangements such as the 5.1 and 7.1 the SPCAP (Speaker-Placement Correction Amplitude) algorithm is implemented. .. rst-class:: classref-item-separator @@ -507,7 +511,7 @@ The playback type of the stream player. If set other than to the default value, - |void| **set_playing**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_playing**\ (\ ) -If ``true``, audio is playing or is queued to be played (see :ref:`play`). +If ``true``, audio is playing or is queued to be played (see :ref:`play()`). .. rst-class:: classref-item-separator @@ -594,7 +598,7 @@ The base sound level before attenuation, in decibels. The base sound level before attenuation, as a linear value. -\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db` on a value. +\ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db()` on a value. .. rst-class:: classref-section-separator diff --git a/classes/class_audiostreampolyphonic.rst b/classes/class_audiostreampolyphonic.rst index 1ec8d7ccbd2..a1bb10c5f2c 100644 --- a/classes/class_audiostreampolyphonic.rst +++ b/classes/class_audiostreampolyphonic.rst @@ -21,7 +21,7 @@ Description AudioStream that lets the user play custom streams at any time from code, simultaneously using a single player. -Playback control is done via the :ref:`AudioStreamPlaybackPolyphonic` instance set inside the player, which can be obtained via :ref:`AudioStreamPlayer.get_stream_playback`, :ref:`AudioStreamPlayer2D.get_stream_playback` or :ref:`AudioStreamPlayer3D.get_stream_playback` methods. Obtaining the playback instance is only valid after the ``stream`` property is set as an **AudioStreamPolyphonic** in those players. +Playback control is done via the :ref:`AudioStreamPlaybackPolyphonic` instance set inside the player, which can be obtained via :ref:`AudioStreamPlayer.get_stream_playback()`, :ref:`AudioStreamPlayer2D.get_stream_playback()` or :ref:`AudioStreamPlayer3D.get_stream_playback()` methods. Obtaining the playback instance is only valid after the ``stream`` property is set as an **AudioStreamPolyphonic** in those players. .. rst-class:: classref-reftable-group diff --git a/classes/class_audiostreamsynchronized.rst b/classes/class_audiostreamsynchronized.rst index 9095e09e9e0..7d7052b756b 100644 --- a/classes/class_audiostreamsynchronized.rst +++ b/classes/class_audiostreamsynchronized.rst @@ -19,7 +19,7 @@ Stream that can be fitted with sub-streams, which will be played in-sync. Description ----------- -This is a stream that can be fitted with sub-streams, which will be played in-sync. The streams being at exactly the same time when play is pressed, and will end when the last of them ends. If one of the sub-streams loops, then playback will continue. +This is a stream that can be fitted with sub-streams, which will be played in-sync. The streams begin at exactly the same time when play is pressed, and will end when the last of them ends. If one of the sub-streams loops, then playback will continue. .. rst-class:: classref-reftable-group diff --git a/classes/class_audiostreamwav.rst b/classes/class_audiostreamwav.rst index 97cbb5cad5a..170651c4a77 100644 --- a/classes/class_audiostreamwav.rst +++ b/classes/class_audiostreamwav.rst @@ -62,13 +62,13 @@ Methods .. table:: :widths: auto - +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamWAV` | :ref:`load_from_buffer`\ (\ buffer\: :ref:`PackedByteArray`, options\: :ref:`Dictionary` = {}\ ) |static| | - +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioStreamWAV` | :ref:`load_from_file`\ (\ path\: :ref:`String`, options\: :ref:`Dictionary` = {}\ ) |static| | - +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_to_wav`\ (\ path\: :ref:`String`\ ) | - +---------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamWAV` | :ref:`load_from_buffer`\ (\ stream_data\: :ref:`PackedByteArray`, options\: :ref:`Dictionary` = {}\ ) |static| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioStreamWAV` | :ref:`load_from_file`\ (\ path\: :ref:`String`, options\: :ref:`Dictionary` = {}\ ) |static| | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_to_wav`\ (\ path\: :ref:`String`\ ) | + +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -306,11 +306,11 @@ Method Descriptions .. rst-class:: classref-method -:ref:`AudioStreamWAV` **load_from_buffer**\ (\ buffer\: :ref:`PackedByteArray`, options\: :ref:`Dictionary` = {}\ ) |static| :ref:`πŸ”—` +:ref:`AudioStreamWAV` **load_from_buffer**\ (\ stream_data\: :ref:`PackedByteArray`, options\: :ref:`Dictionary` = {}\ ) |static| :ref:`πŸ”—` -Creates a new **AudioStreamWAV** instance from the given buffer. The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV`. +Creates a new **AudioStreamWAV** instance from the given buffer. The buffer must contain WAV data. -The usage of ``options`` is identical to :ref:`load_from_file`. +The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV`. The usage of ``options`` is identical to :ref:`load_from_file()`. .. rst-class:: classref-item-separator @@ -322,7 +322,9 @@ The usage of ``options`` is identical to :ref:`load_from_file` **load_from_file**\ (\ path\: :ref:`String`, options\: :ref:`Dictionary` = {}\ ) |static| :ref:`πŸ”—` -Creates a new **AudioStreamWAV** instance from the given file path. The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV`. +Creates a new **AudioStreamWAV** instance from the given file path. The file must be in WAV format. + +The keys and values of ``options`` match the properties of :ref:`ResourceImporterWAV`. \ **Example:** Load the first file dropped as a WAV and play it: diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index bfd8720ed98..e2a1c8513a2 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -288,7 +288,7 @@ To allow both left-click and right-click, use ``MOUSE_BUTTON_MASK_LEFT | MOUSE_B If ``true``, the button's state is pressed. Means the button is pressed down or toggled (if :ref:`toggle_mode` is active). Only works if :ref:`toggle_mode` is ``true``. -\ **Note:** Changing the value of :ref:`button_pressed` will result in :ref:`toggled` to be emitted. If you want to change the pressed state without emitting that signal, use :ref:`set_pressed_no_signal`. +\ **Note:** Changing the value of :ref:`button_pressed` will result in :ref:`toggled` to be emitted. If you want to change the pressed state without emitting that signal, use :ref:`set_pressed_no_signal()`. .. rst-class:: classref-item-separator @@ -377,7 +377,7 @@ If ``true``, the button will highlight for a short amount of time when its short If ``true``, the button will add information about its shortcut in the tooltip. -\ **Note:** This property does nothing when the tooltip control is customized using :ref:`Control._make_custom_tooltip`. +\ **Note:** This property does nothing when the tooltip control is customized using :ref:`Control._make_custom_tooltip()`. .. rst-class:: classref-item-separator @@ -411,7 +411,7 @@ Method Descriptions |void| **_pressed**\ (\ ) |virtual| :ref:`πŸ”—` -Called when the button is pressed. If you need to know the button's pressed state (and :ref:`toggle_mode` is active), use :ref:`_toggled` instead. +Called when the button is pressed. If you need to know the button's pressed state (and :ref:`toggle_mode` is active), use :ref:`_toggled()` instead. .. rst-class:: classref-item-separator diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 4c8bcfd14bc..4bd4f5476e4 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -2219,7 +2219,7 @@ Texture that specifies how much surface emits light at a given point. - |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) - :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| -If ``true``, the object is rendered at the same size regardless of distance. +If ``true``, the object is rendered at the same size regardless of distance. The object's size on screen is the same as if the camera was ``1.0`` units away from the object's origin, regardless of the actual distance from the camera. The :ref:`Camera3D`'s field of view (or :ref:`Camera3D.size` when in orthogonal/frustum mode) still affects the size the object is drawn at. .. rst-class:: classref-item-separator @@ -2238,7 +2238,7 @@ If ``true``, the object is rendered at the same size regardless of distance. If ``true``, enables the vertex grow setting. This can be used to create mesh-based outlines using a second material pass and its :ref:`cull_mode` set to :ref:`CULL_FRONT`. See also :ref:`grow_amount`. -\ **Note:** Vertex growth cannot create new vertices, which means that visible gaps may occur in sharp corners. This can be alleviated by designing the mesh to use smooth normals exclusively using `face weighted normals `__ in the 3D authoring software. In this case, grow will be able to join every outline together, just like in the original mesh. +\ **Note:** Vertex growth cannot create new vertices, which means that visible gaps may occur in sharp corners. This can be alleviated by designing the mesh to use smooth normals exclusively using `face weighted normals `__ in the 3D authoring software. In this case, grow will be able to join every outline together, just like in the original mesh. .. rst-class:: classref-item-separator @@ -2596,7 +2596,7 @@ The strength of the normal map's effect. Texture used to specify the normal at a given pixel. The :ref:`normal_texture` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from :ref:`normal_texture` is oriented around the surface normal provided by the :ref:`Mesh`. -\ **Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with :ref:`SurfaceTool`, you can use :ref:`SurfaceTool.generate_normals` and :ref:`SurfaceTool.generate_tangents` to automatically generate normals and tangents respectively. +\ **Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the normal map won't render correctly and will only appear to darken the whole surface. If creating geometry with :ref:`SurfaceTool`, you can use :ref:`SurfaceTool.generate_normals()` and :ref:`SurfaceTool.generate_tangents()` to automatically generate normals and tangents respectively. \ **Note:** Redot expects the normal map to use X+, Y+, and Z+ coordinates. See `this page `__ for a comparison of normal map coordinates expected by popular engines. diff --git a/classes/class_basis.rst b/classes/class_basis.rst index 2b9fe5d168e..ba8ee2132d6 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -19,7 +19,7 @@ Description The **Basis** built-in :ref:`Variant` type is a 3Γ—3 `matrix `__ used to represent 3D rotation, scale, and shear. It is frequently used within a :ref:`Transform3D`. -A **Basis** is composed by 3 axis vectors, each representing a column of the matrix: :ref:`x`, :ref:`y`, and :ref:`z`. The length of each axis (:ref:`Vector3.length`) influences the basis's scale, while the direction of all axes influence the rotation. Usually, these axes are perpendicular to one another. However, when you rotate any axis individually, the basis becomes sheared. Applying a sheared basis to a 3D model will make the model appear distorted. +A **Basis** is composed by 3 axis vectors, each representing a column of the matrix: :ref:`x`, :ref:`y`, and :ref:`z`. The length of each axis (:ref:`Vector3.length()`) influences the basis's scale, while the direction of all axes influence the rotation. Usually, these axes are perpendicular to one another. However, when you rotate any axis individually, the basis becomes sheared. Applying a sheared basis to a 3D model will make the model appear distorted. A **Basis** is: @@ -27,9 +27,9 @@ A **Basis** is: - **Normalized** if the length of every axis is ``1.0``. -- **Uniform** if all axes share the same length (see :ref:`get_scale`). +- **Uniform** if all axes share the same length (see :ref:`get_scale()`). -- **Orthonormal** if it is both orthogonal and normalized, which allows it to only represent rotations (see :ref:`orthonormalized`). +- **Orthonormal** if it is both orthogonal and normalized, which allows it to only represent rotations (see :ref:`orthonormalized()`). - **Conformal** if it is both orthogonal and uniform, which ensures it is not distorted. @@ -330,7 +330,7 @@ Constructs a **Basis** as a copy of the given **Basis**. Constructs a **Basis** that only represents rotation, rotated around the ``axis`` by the given ``angle``, in radians. The axis must be a normalized vector. -\ **Note:** This is the same as using :ref:`rotated` on the :ref:`IDENTITY` basis. With more than one angle consider using :ref:`from_euler`, instead. +\ **Note:** This is the same as using :ref:`rotated()` on the :ref:`IDENTITY` basis. With more than one angle consider using :ref:`from_euler()`, instead. .. rst-class:: classref-item-separator @@ -371,7 +371,7 @@ Method Descriptions Returns the `determinant `__ of this basis's matrix. For advanced math, this number can be used to determine a few attributes: -- If the determinant is exactly ``0.0``, the basis is not invertible (see :ref:`inverse`). +- If the determinant is exactly ``0.0``, the basis is not invertible (see :ref:`inverse()`). - If the determinant is a negative number, the basis represents a negative scale. @@ -414,7 +414,7 @@ Constructs a new **Basis** that only represents rotation from the given :ref:`Ve -The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): the basis rotates first around the Y axis (yaw), then X (pitch), and lastly Z (roll). When using the opposite method :ref:`get_euler`, this order is reversed. +The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): the basis rotates first around the Y axis (yaw), then X (pitch), and lastly Z (roll). When using the opposite method :ref:`get_euler()`, this order is reversed. .. rst-class:: classref-item-separator @@ -469,11 +469,11 @@ Returns this basis's rotation as a :ref:`Vector3` of `Euler angle - The :ref:`Vector3.z` contains the angle around the :ref:`z` axis (roll). -The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method :ref:`from_euler`, this order is reversed. +The order of each consecutive rotation can be changed with ``order`` (see :ref:`EulerOrder` constants). By default, the YXZ convention is used (:ref:`@GlobalScope.EULER_ORDER_YXZ`): Z (roll) is calculated first, then X (pitch), and lastly Y (yaw). When using the opposite method :ref:`from_euler()`, this order is reversed. -\ **Note:** For this method to return correctly, the basis needs to be *orthonormal* (see :ref:`orthonormalized`). +\ **Note:** For this method to return correctly, the basis needs to be *orthonormal* (see :ref:`orthonormalized()`). -\ **Note:** Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the :ref:`get_rotation_quaternion` method instead, which returns a :ref:`Quaternion`. +\ **Note:** Euler angles are much more intuitive but are not suitable for 3D math. Because of this, consider using the :ref:`get_rotation_quaternion()` method instead, which returns a :ref:`Quaternion`. \ **Note:** In the Inspector dock, a basis's rotation is often displayed in Euler angles (in degrees), as is the case with the :ref:`Node3D.rotation` property. @@ -489,7 +489,7 @@ The order of each consecutive rotation can be changed with ``order`` (see :ref:` Returns this basis's rotation as a :ref:`Quaternion`. -\ **Note:** Quatenions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the :ref:`get_euler` method, which returns Euler angles. +\ **Note:** Quaternions are much more suitable for 3D math but are less intuitive. For user interfaces, consider using the :ref:`get_euler()` method, which returns Euler angles. .. rst-class:: classref-item-separator @@ -534,7 +534,7 @@ Returns the length of each axis of this basis, as a :ref:`Vector3 -\ **Note:** If the value returned by :ref:`determinant` is negative, the scale is also negative. +\ **Note:** If the value returned by :ref:`determinant()` is negative, the scale is also negative. .. rst-class:: classref-item-separator @@ -570,7 +570,7 @@ Returns ``true`` if this basis is conformal. A conformal basis is both *orthogon :ref:`bool` **is_equal_approx**\ (\ b\: :ref:`Basis`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this basis and ``b`` are approximately equal, by calling :ref:`@GlobalScope.is_equal_approx` on all vector components. +Returns ``true`` if this basis and ``b`` are approximately equal, by calling :ref:`@GlobalScope.is_equal_approx()` on all vector components. .. rst-class:: classref-item-separator @@ -582,7 +582,7 @@ Returns ``true`` if this basis and ``b`` are approximately equal, by calling :re :ref:`bool` **is_finite**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this basis is finite, by calling :ref:`@GlobalScope.is_finite` on all vector components. +Returns ``true`` if this basis is finite, by calling :ref:`@GlobalScope.is_finite()` on all vector components. .. rst-class:: classref-item-separator @@ -598,7 +598,9 @@ Creates a new **Basis** with a rotation such that the forward axis (-Z) points t By default, the -Z axis (camera forward) is treated as forward (implies +X is right). If ``use_model_front`` is ``true``, the +Z axis (asset front) is treated as forward (implies +X is left) and points toward the ``target`` position. -The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The returned basis is orthonormalized (see :ref:`orthonormalized`). The ``target`` and ``up`` vectors cannot be :ref:`Vector3.ZERO`, and cannot be parallel to each other. +The up axis (+Y) points as close to the ``up`` vector as possible while staying perpendicular to the forward axis. The returned basis is orthonormalized (see :ref:`orthonormalized()`). + +The ``target`` and the ``up`` cannot be :ref:`Vector3.ZERO`, and shouldn't be colinear to avoid unintended rotation around local Z axis. .. rst-class:: classref-item-separator @@ -650,7 +652,7 @@ It is often useful to call this method to avoid rounding errors on a rotating ba Returns a copy of this basis rotated around the given ``axis`` by the given ``angle`` (in radians). -The ``axis`` must be a normalized vector (see :ref:`Vector3.normalized`). If ``angle`` is positive, the basis is rotated counter-clockwise around the axis. +The ``axis`` must be a normalized vector (see :ref:`Vector3.normalized()`). If ``angle`` is positive, the basis is rotated counter-clockwise around the axis. .. tabs:: @@ -755,7 +757,7 @@ Performs a spherical-linear interpolation with the ``to`` basis, given a ``weigh :ref:`float` **tdotx**\ (\ with\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns the transposed dot product between ``with`` and the :ref:`x` axis (see :ref:`transposed`). +Returns the transposed dot product between ``with`` and the :ref:`x` axis (see :ref:`transposed()`). This is equivalent to ``basis.x.dot(vector)``. @@ -769,7 +771,7 @@ This is equivalent to ``basis.x.dot(vector)``. :ref:`float` **tdoty**\ (\ with\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns the transposed dot product between ``with`` and the :ref:`y` axis (see :ref:`transposed`). +Returns the transposed dot product between ``with`` and the :ref:`y` axis (see :ref:`transposed()`). This is equivalent to ``basis.y.dot(vector)``. @@ -783,7 +785,7 @@ This is equivalent to ``basis.y.dot(vector)``. :ref:`float` **tdotz**\ (\ with\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns the transposed dot product between ``with`` and the :ref:`z` axis (see :ref:`transposed`). +Returns the transposed dot product between ``with`` and the :ref:`z` axis (see :ref:`transposed()`). This is equivalent to ``basis.z.dot(vector)``. @@ -847,7 +849,7 @@ Operator Descriptions Returns ``true`` if the components of both **Basis** matrices are not equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -952,7 +954,7 @@ Divides all components of the **Basis** by the given :ref:`int`. This Returns ``true`` if the components of both **Basis** matrices are exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator diff --git a/classes/class_bitmap.rst b/classes/class_bitmap.rst index 4ca893127ec..bd6710b3dd9 100644 --- a/classes/class_bitmap.rst +++ b/classes/class_bitmap.rst @@ -156,7 +156,7 @@ Returns the number of bitmap elements that are set to ``true``. |void| **grow_mask**\ (\ pixels\: :ref:`int`, rect\: :ref:`Rect2i`\ ) :ref:`πŸ”—` -Applies morphological dilation or erosion to the bitmap. If ``pixels`` is positive, dilation is applied to the bitmap. If ``pixels`` is negative, erosion is applied to the bitmap. ``rect`` defines the area where the morphological operation is applied. Pixels located outside the ``rect`` are unaffected by :ref:`grow_mask`. +Applies morphological dilation or erosion to the bitmap. If ``pixels`` is positive, dilation is applied to the bitmap. If ``pixels`` is negative, erosion is applied to the bitmap. ``rect`` defines the area where the morphological operation is applied. Pixels located outside the ``rect`` are unaffected by :ref:`grow_mask()`. .. rst-class:: classref-item-separator diff --git a/classes/class_bone2d.rst b/classes/class_bone2d.rst index f13c36ac33f..a1eabe02f3b 100644 --- a/classes/class_bone2d.rst +++ b/classes/class_bone2d.rst @@ -23,7 +23,7 @@ A hierarchy of **Bone2D**\ s can be bound to a :ref:`Skeleton2D` nodes to animate 2D meshes created with the :ref:`Polygon2D` UV editor. -Each bone has a :ref:`rest` transform that you can reset to with :ref:`apply_rest`. These rest poses are relative to the bone's parent. +Each bone has a :ref:`rest` transform that you can reset to with :ref:`apply_rest()`. These rest poses are relative to the bone's parent. If in the editor, you can set the rest pose of an entire skeleton using a menu option, from the code, you need to iterate over the bones to set their individual rest poses. @@ -87,7 +87,7 @@ Property Descriptions - |void| **set_rest**\ (\ value\: :ref:`Transform2D`\ ) - :ref:`Transform2D` **get_rest**\ (\ ) -Rest transform of the bone. You can reset the node's transforms to this value using :ref:`apply_rest`. +Rest transform of the bone. You can reset the node's transforms to this value using :ref:`apply_rest()`. .. rst-class:: classref-section-separator diff --git a/classes/class_boneattachment3d.rst b/classes/class_boneattachment3d.rst index f006a15a40c..3ddf6e616ca 100644 --- a/classes/class_boneattachment3d.rst +++ b/classes/class_boneattachment3d.rst @@ -32,13 +32,15 @@ Properties .. table:: :widths: auto - +-----------------------------+---------------------------------------------------------------------+-----------+ - | :ref:`int` | :ref:`bone_idx` | ``-1`` | - +-----------------------------+---------------------------------------------------------------------+-----------+ - | :ref:`String` | :ref:`bone_name` | ``""`` | - +-----------------------------+---------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`override_pose` | ``false`` | - +-----------------------------+---------------------------------------------------------------------+-----------+ + +---------------------------------------------------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bone_idx` | ``-1`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`bone_name` | ``""`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`override_pose` | ``false`` | + +---------------------------------------------------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | + +---------------------------------------------------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -147,7 +149,7 @@ Returns the :ref:`NodePath` to the external :ref:`Skeleton3D` **get_skeleton**\ (\ ) :ref:`πŸ”—` -Get parent or external :ref:`Skeleton3D` node if found. +Returns the parent or external :ref:`Skeleton3D` node if it exists, otherwise returns ``null``. .. rst-class:: classref-item-separator @@ -183,7 +185,7 @@ A function that is called automatically when the :ref:`Skeleton3D`\ ) :ref:`πŸ”—` -Sets the :ref:`NodePath` to the external skeleton that the BoneAttachment3D node should use. See :ref:`set_use_external_skeleton` to enable the external :ref:`Skeleton3D` node. +Sets the :ref:`NodePath` to the external skeleton that the BoneAttachment3D node should use. See :ref:`set_use_external_skeleton()` to enable the external :ref:`Skeleton3D` node. .. rst-class:: classref-item-separator @@ -195,7 +197,7 @@ Sets the :ref:`NodePath` to the external skeleton that the BoneA |void| **set_use_external_skeleton**\ (\ use_external_skeleton\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets whether the BoneAttachment3D node will use an external :ref:`Skeleton3D` node rather than attempting to use its parent node as the :ref:`Skeleton3D`. When set to ``true``, the BoneAttachment3D node will use the external :ref:`Skeleton3D` node set in :ref:`set_external_skeleton`. +Sets whether the BoneAttachment3D node will use an external :ref:`Skeleton3D` node rather than attempting to use its parent node as the :ref:`Skeleton3D`. When set to ``true``, the BoneAttachment3D node will use the external :ref:`Skeleton3D` node set in :ref:`set_external_skeleton()`. .. |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_bool.rst b/classes/class_bool.rst index d8b4e0b19f9..85df5d84994 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -71,7 +71,7 @@ Booleans can be combined with the logical operators ``and``, ``or``, ``not`` to \ **Note:** In modern programming languages, logical operators are evaluated in order. All remaining conditions are skipped if their result would have no effect on the final value. This concept is known as `short-circuit evaluation `__ and can be useful to avoid evaluating expensive conditions in some performance-critical cases. -\ **Note:** By convention, built-in methods and properties that return booleans are usually defined as yes-no questions, single adjectives, or similar (:ref:`String.is_empty`, :ref:`Node.can_process`, :ref:`Camera2D.enabled`, etc.). +\ **Note:** By convention, built-in methods and properties that return booleans are usually defined as yes-no questions, single adjectives, or similar (:ref:`String.is_empty()`, :ref:`Node.can_process()`, :ref:`Camera2D.enabled`, etc.). .. rst-class:: classref-reftable-group diff --git a/classes/class_button.rst b/classes/class_button.rst index 82b5b4476b9..465857a4d09 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -82,6 +82,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`AutowrapMode` | :ref:`autowrap_mode` | ``0`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ + | |bitfield|\[:ref:`LineBreakFlag`\] | :ref:`autowrap_trim_flags` | ``128`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`clip_text` | ``false`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`expand_icon` | ``false`` | @@ -220,6 +222,23 @@ If set to something other than :ref:`TextServer.AUTOWRAP_OFF`\] **autowrap_trim_flags** = ``128`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_autowrap_trim_flags**\ (\ value\: |bitfield|\[:ref:`LineBreakFlag`\]\ ) +- |bitfield|\[:ref:`LineBreakFlag`\] **get_autowrap_trim_flags**\ (\ ) + +Autowrap space trimming flags. See :ref:`TextServer.BREAK_TRIM_START_EDGE_SPACES` and :ref:`TextServer.BREAK_TRIM_END_EDGE_SPACES` for more info. + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_property_clip_text: .. rst-class:: classref-property diff --git a/classes/class_callable.rst b/classes/class_callable.rst index 7a027e9b2fc..9b60fe8b744 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -17,7 +17,7 @@ A built-in type representing a method or a standalone function. Description ----------- -**Callable** is a built-in :ref:`Variant` type that represents a function. It can either be a method within an :ref:`Object` instance, or a custom callable used for different purposes (see :ref:`is_custom`). Like all :ref:`Variant` types, it can be stored in variables and passed to other functions. It is most commonly used for signal callbacks. +**Callable** is a built-in :ref:`Variant` type that represents a function. It can either be a method within an :ref:`Object` instance, or a custom callable used for different purposes (see :ref:`is_custom()`). Like all :ref:`Variant` types, it can be stored in variables and passed to other functions. It is most commonly used for signal callbacks. .. tabs:: @@ -30,7 +30,7 @@ Description func test(): var callable = Callable(self, "print_args") callable.call("hello", "world") # Prints "hello world ". - callable.call(Vector2.UP, 42, callable) # Prints "(0.0, -1.0) 42 Node(node.gd)::print_args". + callable.call(Vector2.UP, 42, callable) # Prints "(0.0, -1.0) 42 Node(node.gd)::print_args" callable.call("invalid") # Invalid call, should have at least 2 arguments. .. code-tab:: csharp @@ -46,13 +46,13 @@ Description // Invalid calls fail silently. Callable callable = new Callable(this, MethodName.PrintArgs); callable.Call("hello", "world"); // Default parameter values are not supported, should have 3 arguments. - callable.Call(Vector2.Up, 42, callable); // Prints "(0, -1) 42 Node(Node.cs)::PrintArgs". + callable.Call(Vector2.Up, 42, callable); // Prints "(0, -1) 42 Node(Node.cs)::PrintArgs" callable.Call("invalid"); // Invalid call, should have 3 arguments. } -In GDScript, it's possible to create lambda functions within a method. Lambda functions are custom callables that are not associated with an :ref:`Object` instance. Optionally, lambda functions can also be named. The name will be displayed in the debugger, or when calling :ref:`get_method`. +In GDScript, it's possible to create lambda functions within a method. Lambda functions are custom callables that are not associated with an :ref:`Object` instance. Optionally, lambda functions can also be named. The name will be displayed in the debugger, or when calling :ref:`get_method()`. :: @@ -60,7 +60,7 @@ In GDScript, it's possible to create lambda functions within a method. Lambda fu var my_lambda = func (message): print(message) - # Prints Hello everyone! + # Prints "Hello everyone!" my_lambda.call("Hello everyone!") # Prints "Attack!", when the button_pressed signal is emitted. @@ -209,7 +209,7 @@ Constructs a **Callable** as a copy of the given **Callable**. Creates a new **Callable** for the method named ``method`` in the specified ``object``. -\ **Note:** For methods of built-in :ref:`Variant` types, use :ref:`create` instead. +\ **Note:** For methods of built-in :ref:`Variant` types, use :ref:`create()` instead. .. rst-class:: classref-section-separator @@ -226,7 +226,7 @@ Method Descriptions :ref:`Callable` **bind**\ (\ ...\ ) |vararg| |const| :ref:`πŸ”—` -Returns a copy of this **Callable** with one or more arguments bound. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call`. See also :ref:`unbind`. +Returns a copy of this **Callable** with one or more arguments bound. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call()`. See also :ref:`unbind()`. \ **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. @@ -240,7 +240,7 @@ Returns a copy of this **Callable** with one or more arguments bound. When calle :ref:`Callable` **bindv**\ (\ arguments\: :ref:`Array`\ ) :ref:`πŸ”—` -Returns a copy of this **Callable** with one or more arguments bound, reading them from an array. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call`. See also :ref:`unbind`. +Returns a copy of this **Callable** with one or more arguments bound, reading them from an array. When called, the bound arguments are passed *after* the arguments supplied by :ref:`call()`. See also :ref:`unbind()`. \ **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. @@ -287,7 +287,7 @@ Calls the method represented by this **Callable** in deferred mode, i.e. at the \ **Note:** Deferred calls are processed at idle time. Idle time happens mainly at the end of process and physics frames. In it, deferred calls will be run until there are none left, which means you can defer calls from other deferred calls and they'll still be run in the current idle time cycle. This means you should not call a method deferred from itself (or from a method called by it), as this causes infinite recursion the same way as if you had called the method directly. -See also :ref:`Object.call_deferred`. +See also :ref:`Object.call_deferred()`. .. rst-class:: classref-item-separator @@ -299,7 +299,7 @@ See also :ref:`Object.call_deferred`. :ref:`Variant` **callv**\ (\ arguments\: :ref:`Array`\ ) |const| :ref:`πŸ”—` -Calls the method represented by this **Callable**. Unlike :ref:`call`, this method expects all arguments to be contained inside the ``arguments`` :ref:`Array`. +Calls the method represented by this **Callable**. Unlike :ref:`call()`, this method expects all arguments to be contained inside the ``arguments`` :ref:`Array`. .. rst-class:: classref-item-separator @@ -311,7 +311,7 @@ Calls the method represented by this **Callable**. Unlike :ref:`call` **create**\ (\ variant\: :ref:`Variant`, method\: :ref:`StringName`\ ) |static| :ref:`πŸ”—` -Creates a new **Callable** for the method named ``method`` in the specified ``variant``. To represent a method of a built-in :ref:`Variant` type, a custom callable is used (see :ref:`is_custom`). If ``variant`` is :ref:`Object`, then a standard callable will be created instead. +Creates a new **Callable** for the method named ``method`` in the specified ``variant``. To represent a method of a built-in :ref:`Variant` type, a custom callable is used (see :ref:`is_custom()`). If ``variant`` is :ref:`Object`, then a standard callable will be created instead. \ **Note:** This method is always necessary for the :ref:`Dictionary` type, as property syntax is used to access its entries. You may also use this method when ``variant``'s type is not known in advance (for polymorphism). @@ -325,7 +325,7 @@ Creates a new **Callable** for the method named ``method`` in the specified ``va :ref:`int` **get_argument_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the total number of arguments this **Callable** should take, including optional arguments. This means that any arguments bound with :ref:`bind` are *subtracted* from the result, and any arguments unbound with :ref:`unbind` are *added* to the result. +Returns the total number of arguments this **Callable** should take, including optional arguments. This means that any arguments bound with :ref:`bind()` are *subtracted* from the result, and any arguments unbound with :ref:`unbind()` are *added* to the result. .. rst-class:: classref-item-separator @@ -337,7 +337,7 @@ Returns the total number of arguments this **Callable** should take, including o :ref:`Array` **get_bound_arguments**\ (\ ) |const| :ref:`πŸ”—` -Returns the array of arguments bound via successive :ref:`bind` or :ref:`unbind` calls. These arguments will be added *after* the arguments passed to the call, from which :ref:`get_unbound_arguments_count` arguments on the right have been previously excluded. +Returns the array of arguments bound via successive :ref:`bind()` or :ref:`unbind()` calls. These arguments will be added *after* the arguments passed to the call, from which :ref:`get_unbound_arguments_count()` arguments on the right have been previously excluded. :: @@ -357,9 +357,9 @@ Returns the array of arguments bound via successive :ref:`bind` **get_bound_arguments_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the total amount of arguments bound via successive :ref:`bind` or :ref:`unbind` calls. This is the same as the size of the array returned by :ref:`get_bound_arguments`. See :ref:`get_bound_arguments` for details. +Returns the total amount of arguments bound via successive :ref:`bind()` or :ref:`unbind()` calls. This is the same as the size of the array returned by :ref:`get_bound_arguments()`. See :ref:`get_bound_arguments()` for details. -\ **Note:** The :ref:`get_bound_arguments_count` and :ref:`get_unbound_arguments_count` methods can both return positive values. +\ **Note:** The :ref:`get_bound_arguments_count()` and :ref:`get_unbound_arguments_count()` methods can both return positive values. .. rst-class:: classref-item-separator @@ -395,7 +395,7 @@ Returns the object on which this **Callable** is called. :ref:`int` **get_object_id**\ (\ ) |const| :ref:`πŸ”—` -Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id`). +Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id()`). .. rst-class:: classref-item-separator @@ -407,9 +407,9 @@ Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id` **get_unbound_arguments_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the total amount of arguments unbound via successive :ref:`bind` or :ref:`unbind` calls. See :ref:`get_bound_arguments` for details. +Returns the total amount of arguments unbound via successive :ref:`bind()` or :ref:`unbind()` calls. See :ref:`get_bound_arguments()` for details. -\ **Note:** The :ref:`get_bound_arguments_count` and :ref:`get_unbound_arguments_count` methods can both return positive values. +\ **Note:** The :ref:`get_bound_arguments_count()` and :ref:`get_unbound_arguments_count()` methods can both return positive values. .. rst-class:: classref-item-separator @@ -423,7 +423,7 @@ Returns the total amount of arguments unbound via successive :ref:`bind`. +\ **Note:** **Callable**\ s with equal content will always produce identical hash values. However, the reverse is not true. Returning identical hash values does *not* imply the callables are equal, because different callables can have identical hash values due to hash collisions. The engine uses a 32-bit hash algorithm for :ref:`hash()`. .. rst-class:: classref-item-separator @@ -437,9 +437,9 @@ Returns the 32-bit hash value of this **Callable**'s object. Returns ``true`` if this **Callable** is a custom callable. Custom callables are used: -- for binding/unbinding arguments (see :ref:`bind` and :ref:`unbind`); +- for binding/unbinding arguments (see :ref:`bind()` and :ref:`unbind()`); -- for representing methods of built-in :ref:`Variant` types (see :ref:`create`); +- for representing methods of built-in :ref:`Variant` types (see :ref:`create()`); - for representing global, lambda, and RPC functions in GDScript; @@ -457,7 +457,7 @@ Returns ``true`` if this **Callable** is a custom callable. Custom callables are Returns ``true`` if this **Callable** has no target to call the method on. Equivalent to ``callable == Callable()``. -\ **Note:** This is *not* the same as ``not is_valid()`` and using ``not is_null()`` will *not* guarantee that this callable can be called. Use :ref:`is_valid` instead. +\ **Note:** This is *not* the same as ``not is_valid()`` and using ``not is_null()`` will *not* guarantee that this callable can be called. Use :ref:`is_valid()` instead. .. rst-class:: classref-item-separator @@ -469,7 +469,7 @@ Returns ``true`` if this **Callable** has no target to call the method on. Equiv :ref:`bool` **is_standard**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this **Callable** is a standard callable. This method is the opposite of :ref:`is_custom`. Returns ``false`` if this callable is a lambda function. +Returns ``true`` if this **Callable** is a standard callable. This method is the opposite of :ref:`is_custom()`. Returns ``false`` if this callable is a lambda function. .. rst-class:: classref-item-separator @@ -493,7 +493,7 @@ Returns ``true`` if the callable's object exists and has a valid method name ass |void| **rpc**\ (\ ...\ ) |vararg| |const| :ref:`πŸ”—` -Perform an RPC (Remote Procedure Call) on all connected peers. This is used for multiplayer and is normally not available, unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc` or :ref:`Node.rpc_config`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc`. +Perform an RPC (Remote Procedure Call) on all connected peers. This is used for multiplayer and is normally not available, unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc` or :ref:`Node.rpc_config()`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc()`. .. rst-class:: classref-item-separator @@ -505,7 +505,7 @@ Perform an RPC (Remote Procedure Call) on all connected peers. This is used for |void| **rpc_id**\ (\ peer_id\: :ref:`int`, ...\ ) |vararg| |const| :ref:`πŸ”—` -Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc` or :ref:`Node.rpc_config`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc_id`. +Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as *RPC* (using :ref:`@GDScript.@rpc` or :ref:`Node.rpc_config()`). Calling this method on unsupported functions will result in an error. See :ref:`Node.rpc_id()`. .. rst-class:: classref-item-separator @@ -517,7 +517,7 @@ Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer do :ref:`Callable` **unbind**\ (\ argcount\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns a copy of this **Callable** with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to ``argcount``. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also :ref:`bind`. +Returns a copy of this **Callable** with a number of arguments unbound. In other words, when the new callable is called the last few arguments supplied by the user are ignored, according to ``argcount``. The remaining arguments are passed to the callable. This allows to use the original callable in a context that attempts to pass more arguments than this callable can handle, e.g. a signal with a fixed number of arguments. See also :ref:`bind()`. \ **Note:** When this method is chained with other similar methods, the order in which the argument list is modified is read from right to left. diff --git a/classes/class_callbacktweener.rst b/classes/class_callbacktweener.rst index 3a4a337c54b..209798c7fb2 100644 --- a/classes/class_callbacktweener.rst +++ b/classes/class_callbacktweener.rst @@ -19,11 +19,11 @@ Calls the specified method after optional delay. Description ----------- -**CallbackTweener** is used to call a method in a tweening sequence. See :ref:`Tween.tween_callback` for more usage information. +**CallbackTweener** is used to call a method in a tweening sequence. See :ref:`Tween.tween_callback()` for more usage information. The tweener will finish automatically if the callback's target object is freed. -\ **Note:** :ref:`Tween.tween_callback` is the only correct way to create **CallbackTweener**. Any **CallbackTweener** created manually will not function correctly. +\ **Note:** :ref:`Tween.tween_callback()` is the only correct way to create **CallbackTweener**. Any **CallbackTweener** created manually will not function correctly. .. rst-class:: classref-reftable-group @@ -54,7 +54,7 @@ Method Descriptions Makes the callback call delayed by given time in seconds. -\ **Example:** Call :ref:`Node.queue_free` after 2 seconds: +\ **Example:** Call :ref:`Node.queue_free()` after 2 seconds: :: diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index f8ccb5c3ae0..52edac49670 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -23,9 +23,9 @@ Camera node for 2D scenes. It forces the screen (current layer) to scroll follow Cameras register themselves in the nearest :ref:`Viewport` node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. -This node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from :ref:`Node2D` and change the transform of the canvas by setting :ref:`Viewport.canvas_transform` in :ref:`Viewport` (you can obtain the current :ref:`Viewport` by using :ref:`Node.get_viewport`). +This node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from :ref:`Node2D` and change the transform of the canvas by setting :ref:`Viewport.canvas_transform` in :ref:`Viewport` (you can obtain the current :ref:`Viewport` by using :ref:`Node.get_viewport()`). -Note that the **Camera2D** node's ``position`` doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use :ref:`get_screen_center_position` to get the real position. +Note that the **Camera2D** node's ``position`` doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use :ref:`get_screen_center_position()` to get the real position. .. rst-class:: classref-introduction-group @@ -77,6 +77,8 @@ Properties +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ | :ref:`int` | :ref:`limit_bottom` | ``10000000`` | +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`limit_enabled` | ``true`` | + +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ | :ref:`int` | :ref:`limit_left` | ``-10000000`` | +-----------------------------------------------------------------------+---------------------------------------------------------------------------------------+-------------------+ | :ref:`int` | :ref:`limit_right` | ``10000000`` | @@ -434,7 +436,7 @@ If ``true``, draws the camera's screen rectangle in the editor. - |void| **set_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_enabled**\ (\ ) -Controls whether the camera can be active or not. If ``true``, the **Camera2D** will become the main camera when it enters the scene tree and there is no active camera currently (see :ref:`Viewport.get_camera_2d`). +Controls whether the camera can be active or not. If ``true``, the **Camera2D** will become the main camera when it enters the scene tree and there is no active camera currently (see :ref:`Viewport.get_camera_2d()`). When the camera is currently active and :ref:`enabled` is set to ``false``, the next enabled **Camera2D** in the scene tree will become active. @@ -476,6 +478,23 @@ Bottom scroll limit in pixels. The camera stops moving when reaching this value, ---- +.. _class_Camera2D_property_limit_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **limit_enabled** = ``true`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_limit_enabled**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_limit_enabled**\ (\ ) + +If ``true``, the limits will be enabled. Disabling this will allow the camera to focus anywhere, when the four ``limit_*`` properties will not work. + +.. rst-class:: classref-item-separator + +---- + .. _class_Camera2D_property_limit_left: .. rst-class:: classref-property @@ -525,7 +544,7 @@ If ``true``, the camera smoothly stops when reaches its limits. This property has no effect if :ref:`position_smoothing_enabled` is ``false``. -\ **Note:** To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke :ref:`reset_smoothing`. +\ **Note:** To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke :ref:`reset_smoothing()`. .. rst-class:: classref-item-separator @@ -732,7 +751,7 @@ Returns the camera limit for the specified :ref:`Side`. Returns the center of the screen from this camera's point of view, in global coordinates. -\ **Note:** The exact targeted position of the camera may be different. See :ref:`get_target_position`. +\ **Note:** The exact targeted position of the camera may be different. See :ref:`get_target_position()`. .. rst-class:: classref-item-separator @@ -746,7 +765,7 @@ Returns the center of the screen from this camera's point of view, in global coo Returns this camera's target position, in global coordinates. -\ **Note:** The returned value is not the same as :ref:`Node2D.global_position`, as it is affected by the drag properties. It is also not the same as the current position if :ref:`position_smoothing_enabled` is ``true`` (see :ref:`get_screen_center_position`). +\ **Note:** The returned value is not the same as :ref:`Node2D.global_position`, as it is affected by the drag properties. It is also not the same as the current position if :ref:`position_smoothing_enabled` is ``true`` (see :ref:`get_screen_center_position()`). .. rst-class:: classref-item-separator @@ -758,7 +777,7 @@ Returns this camera's target position, in global coordinates. :ref:`bool` **is_current**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this **Camera2D** is the active camera (see :ref:`Viewport.get_camera_2d`). +Returns ``true`` if this **Camera2D** is the active camera (see :ref:`Viewport.get_camera_2d()`). .. rst-class:: classref-item-separator diff --git a/classes/class_camera3d.rst b/classes/class_camera3d.rst index a3649be8a13..f19c449d5e7 100644 --- a/classes/class_camera3d.rst +++ b/classes/class_camera3d.rst @@ -275,7 +275,7 @@ The culling mask that describes which :ref:`VisualInstance3D.layers` allows for 32 layers to be stored in total, there are an additional 12 layers that are only used internally by the engine and aren't exposed in the editor. Setting :ref:`cull_mask` using a script allows you to toggle those reserved layers, which can be useful for editor plugins. -To adjust :ref:`cull_mask` more easily using a script, use :ref:`get_cull_mask_value` and :ref:`set_cull_mask_value`. +To adjust :ref:`cull_mask` more easily using a script, use :ref:`get_cull_mask_value()` and :ref:`set_cull_mask_value()`. \ **Note:** :ref:`VoxelGI`, SDFGI and :ref:`LightmapGI` will always take all layers into account to determine what contributes to global illumination. If this is an issue, set :ref:`GeometryInstance3D.gi_mode` to :ref:`GeometryInstance3D.GI_MODE_DISABLED` for meshes and :ref:`Light3D.light_bake_mode` to :ref:`Light3D.BAKE_DISABLED` for lights to exclude them from global illumination. @@ -732,7 +732,7 @@ Sets the camera projection to perspective mode (see :ref:`PROJECTION_PERSPECTIVE Returns the 2D coordinate in the :ref:`Viewport` rectangle that maps to the given 3D point in world space. -\ **Note:** When using this to position GUI elements over a 3D viewport, use :ref:`is_position_behind` to prevent them from appearing if the 3D point is behind the camera: +\ **Note:** When using this to position GUI elements over a 3D viewport, use :ref:`is_position_behind()` to prevent them from appearing if the 3D point is behind the camera: :: diff --git a/classes/class_cameraserver.rst b/classes/class_cameraserver.rst index c5542f95298..c5aecd1824d 100644 --- a/classes/class_cameraserver.rst +++ b/classes/class_cameraserver.rst @@ -27,6 +27,18 @@ It is notably used to provide AR modules with a video feed from the camera. .. rst-class:: classref-reftable-group +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`monitoring_feeds` | ``false`` | + +-------------------------+-----------------------------------------------------------------------+-----------+ + +.. rst-class:: classref-reftable-group + Methods ------- @@ -127,6 +139,30 @@ The CbCr component camera image. .. rst-class:: classref-descriptions-group +Property Descriptions +--------------------- + +.. _class_CameraServer_property_monitoring_feeds: + +.. rst-class:: classref-property + +:ref:`bool` **monitoring_feeds** = ``false`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_monitoring_feeds**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_monitoring_feeds**\ (\ ) + +If ``true``, the server is actively monitoring available camera feeds. + +This has a performance cost, so only set it to ``true`` when you're actively accessing the camera. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 54e0b6f33e8..377ccdc9b46 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -23,7 +23,7 @@ Description Abstract base class for everything in 2D space. Canvas items are laid out in a tree; children inherit and extend their parent's transform. **CanvasItem** is extended by :ref:`Control` for GUI-related nodes, and by :ref:`Node2D` for 2D game objects. -Any **CanvasItem** can draw. For this, :ref:`queue_redraw` is called by the engine, then :ref:`NOTIFICATION_DRAW` will be received on idle time to request a redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the **CanvasItem** are provided (see ``draw_*`` functions). However, they can only be used inside :ref:`_draw`, its corresponding :ref:`Object._notification` or methods connected to the :ref:`draw` signal. +Any **CanvasItem** can draw. For this, :ref:`queue_redraw()` is called by the engine, then :ref:`NOTIFICATION_DRAW` will be received on idle time to request a redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the **CanvasItem** are provided (see ``draw_*`` functions). However, they can only be used inside :ref:`_draw()`, its corresponding :ref:`Object._notification()` or methods connected to the :ref:`draw` signal. Canvas items are drawn in tree order on their canvas layer. By default, children are on top of their parents, so a root **CanvasItem** will be drawn behind everything. This behavior can be changed on a per-item basis. @@ -90,127 +90,127 @@ Methods .. table:: :widths: auto - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_draw`\ (\ ) |virtual| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_animation_slice`\ (\ animation_length\: :ref:`float`, slice_begin\: :ref:`float`, slice_end\: :ref:`float`, offset\: :ref:`float` = 0.0\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_arc`\ (\ center\: :ref:`Vector2`, radius\: :ref:`float`, start_angle\: :ref:`float`, end_angle\: :ref:`float`, point_count\: :ref:`int`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_char`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_char_outline`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, size\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_circle`\ (\ position\: :ref:`Vector2`, radius\: :ref:`float`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_colored_polygon`\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_dashed_line`\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, dash\: :ref:`float` = 2.0, aligned\: :ref:`bool` = true, antialiased\: :ref:`bool` = false\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_end_animation`\ (\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_lcd_texture_rect_region`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_line`\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_mesh`\ (\ mesh\: :ref:`Mesh`, texture\: :ref:`Texture2D`, transform\: :ref:`Transform2D` = Transform2D(1, 0, 0, 1, 0, 0), modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_msdf_texture_rect_region`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), outline\: :ref:`float` = 0.0, pixel_range\: :ref:`float` = 4.0, scale\: :ref:`float` = 1.0\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_multiline`\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_multiline_colors`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_multiline_string`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_multiline_string_outline`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_multimesh`\ (\ multimesh\: :ref:`MultiMesh`, texture\: :ref:`Texture2D`\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_polygon`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_polyline`\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_polyline_colors`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_primitive`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array`, texture\: :ref:`Texture2D` = null\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_rect`\ (\ rect\: :ref:`Rect2`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_set_transform`\ (\ position\: :ref:`Vector2`, rotation\: :ref:`float` = 0.0, scale\: :ref:`Vector2` = Vector2(1, 1)\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_set_transform_matrix`\ (\ xform\: :ref:`Transform2D`\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_string`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_string_outline`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_style_box`\ (\ style_box\: :ref:`StyleBox`, rect\: :ref:`Rect2`\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_texture`\ (\ texture\: :ref:`Texture2D`, position\: :ref:`Vector2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_texture_rect`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, tile\: :ref:`bool`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`draw_texture_rect_region`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false, clip_uv\: :ref:`bool` = true\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`force_update_transform`\ (\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_canvas`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_canvas_item`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CanvasLayer` | :ref:`get_canvas_layer_node`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_canvas_transform`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_global_mouse_position`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_global_transform`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_global_transform_with_canvas`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`get_instance_shader_parameter`\ (\ name\: :ref:`StringName`\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_local_mouse_position`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_screen_transform`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_transform`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`get_viewport_rect`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Transform2D` | :ref:`get_viewport_transform`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_visibility_layer_bit`\ (\ layer\: :ref:`int`\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`World2D` | :ref:`get_world_2d`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`hide`\ (\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_local_transform_notification_enabled`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_transform_notification_enabled`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_visible_in_tree`\ (\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`make_canvas_position_local`\ (\ viewport_point\: :ref:`Vector2`\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`InputEvent` | :ref:`make_input_local`\ (\ event\: :ref:`InputEvent`\ ) |const| | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`move_to_front`\ (\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`queue_redraw`\ (\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_instance_shader_parameter`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_notify_local_transform`\ (\ enable\: :ref:`bool`\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_notify_transform`\ (\ enable\: :ref:`bool`\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_visibility_layer_bit`\ (\ layer\: :ref:`int`, enabled\: :ref:`bool`\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`show`\ (\ ) | - +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_draw`\ (\ ) |virtual| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_animation_slice`\ (\ animation_length\: :ref:`float`, slice_begin\: :ref:`float`, slice_end\: :ref:`float`, offset\: :ref:`float` = 0.0\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_arc`\ (\ center\: :ref:`Vector2`, radius\: :ref:`float`, start_angle\: :ref:`float`, end_angle\: :ref:`float`, point_count\: :ref:`int`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_char`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1), oversampling\: :ref:`float` = 0.0\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_char_outline`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, size\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), oversampling\: :ref:`float` = 0.0\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_circle`\ (\ position\: :ref:`Vector2`, radius\: :ref:`float`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_colored_polygon`\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_dashed_line`\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, dash\: :ref:`float` = 2.0, aligned\: :ref:`bool` = true, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_end_animation`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_lcd_texture_rect_region`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_line`\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_mesh`\ (\ mesh\: :ref:`Mesh`, texture\: :ref:`Texture2D`, transform\: :ref:`Transform2D` = Transform2D(1, 0, 0, 1, 0, 0), modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_msdf_texture_rect_region`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), outline\: :ref:`float` = 0.0, pixel_range\: :ref:`float` = 4.0, scale\: :ref:`float` = 1.0\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multiline`\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multiline_colors`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multiline_string`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multiline_string_outline`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_multimesh`\ (\ multimesh\: :ref:`MultiMesh`, texture\: :ref:`Texture2D`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_polygon`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_polyline`\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_polyline_colors`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_primitive`\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array`, texture\: :ref:`Texture2D` = null\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_rect`\ (\ rect\: :ref:`Rect2`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_set_transform`\ (\ position\: :ref:`Vector2`, rotation\: :ref:`float` = 0.0, scale\: :ref:`Vector2` = Vector2(1, 1)\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_set_transform_matrix`\ (\ xform\: :ref:`Transform2D`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_string`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_string_outline`\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_style_box`\ (\ style_box\: :ref:`StyleBox`, rect\: :ref:`Rect2`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_texture`\ (\ texture\: :ref:`Texture2D`, position\: :ref:`Vector2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_texture_rect`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, tile\: :ref:`bool`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`draw_texture_rect_region`\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false, clip_uv\: :ref:`bool` = true\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_update_transform`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_canvas`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_canvas_item`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CanvasLayer` | :ref:`get_canvas_layer_node`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_canvas_transform`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_global_mouse_position`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_global_transform`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_global_transform_with_canvas`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_instance_shader_parameter`\ (\ name\: :ref:`StringName`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_local_mouse_position`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_screen_transform`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_transform`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`get_viewport_rect`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Transform2D` | :ref:`get_viewport_transform`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_visibility_layer_bit`\ (\ layer\: :ref:`int`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`World2D` | :ref:`get_world_2d`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`hide`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_local_transform_notification_enabled`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_transform_notification_enabled`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_visible_in_tree`\ (\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`make_canvas_position_local`\ (\ viewport_point\: :ref:`Vector2`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`InputEvent` | :ref:`make_input_local`\ (\ event\: :ref:`InputEvent`\ ) |const| | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`move_to_front`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`queue_redraw`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_instance_shader_parameter`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_notify_local_transform`\ (\ enable\: :ref:`bool`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_notify_transform`\ (\ enable\: :ref:`bool`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_visibility_layer_bit`\ (\ layer\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`show`\ (\ ) | + +---------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -227,7 +227,7 @@ Signals **draw**\ (\ ) :ref:`πŸ”—` -Emitted when the **CanvasItem** must redraw, *after* the related :ref:`NOTIFICATION_DRAW` notification, and *before* :ref:`_draw` is called. +Emitted when the **CanvasItem** must redraw, *after* the related :ref:`NOTIFICATION_DRAW` notification, and *before* :ref:`_draw()` is called. \ **Note:** Deferred connections do not allow drawing through the ``draw_*`` methods. @@ -241,7 +241,7 @@ Emitted when the **CanvasItem** must redraw, *after* the related :ref:`NOTIFICAT **hidden**\ (\ ) :ref:`πŸ”—` -Emitted when the **CanvasItem** is hidden, i.e. it's no longer visible in the tree (see :ref:`is_visible_in_tree`). +Emitted when this node becomes hidden, i.e. it's no longer visible in the tree (see :ref:`is_visible_in_tree()`). .. rst-class:: classref-item-separator @@ -265,7 +265,9 @@ Emitted when the **CanvasItem**'s boundaries (position or size) change, or when **visibility_changed**\ (\ ) :ref:`πŸ”—` -Emitted when the **CanvasItem**'s visibility changes, either because its own :ref:`visible` property changed or because its visibility in the tree changed (see :ref:`is_visible_in_tree`). +Emitted when the **CanvasItem**'s visibility changes, either because its own :ref:`visible` property changed or because its visibility in the tree changed (see :ref:`is_visible_in_tree()`). + +This signal is emitted *after* the related :ref:`NOTIFICATION_VISIBILITY_CHANGED` notification. .. rst-class:: classref-section-separator @@ -378,7 +380,7 @@ The **CanvasItem** will inherit the filter from its parent. :ref:`TextureRepeat` **TEXTURE_REPEAT_DISABLED** = ``1`` -Texture will not repeat. +The texture does not repeat. .. _class_CanvasItem_constant_TEXTURE_REPEAT_ENABLED: @@ -386,7 +388,7 @@ Texture will not repeat. :ref:`TextureRepeat` **TEXTURE_REPEAT_ENABLED** = ``2`` -Texture will repeat normally. +The texture repeats when exceeding the texture's size. .. _class_CanvasItem_constant_TEXTURE_REPEAT_MIRROR: @@ -394,7 +396,7 @@ Texture will repeat normally. :ref:`TextureRepeat` **TEXTURE_REPEAT_MIRROR** = ``3`` -Texture will repeat in a 2Γ—2 tiled mode, where elements at even positions are mirrored. +The texture repeats when the exceeding the texture's size in a "2Γ—2 tiled mode". Repeated textures at even positions are mirrored. .. _class_CanvasItem_constant_TEXTURE_REPEAT_MAX: @@ -420,7 +422,7 @@ enum **ClipChildrenMode**: :ref:`πŸ”—` :ref:`ClipChildrenMode` **CLIP_CHILDREN_DISABLED** = ``0`` -Child draws over parent and is not clipped. +Children are drawn over this node and are not clipped. .. _class_CanvasItem_constant_CLIP_CHILDREN_ONLY: @@ -428,7 +430,7 @@ Child draws over parent and is not clipped. :ref:`ClipChildrenMode` **CLIP_CHILDREN_ONLY** = ``1`` -Parent is used for the purposes of clipping only. Child is clipped to the parent's visible area, parent is not drawn. +This node is used as a mask and is **not** drawn. The mask is based on this node's alpha channel: Opaque pixels are kept, transparent pixels are discarded, and semi-transparent pixels are blended in according to their opacity. Children are clipped to this node's drawn area. .. _class_CanvasItem_constant_CLIP_CHILDREN_AND_DRAW: @@ -436,7 +438,7 @@ Parent is used for the purposes of clipping only. Child is clipped to the parent :ref:`ClipChildrenMode` **CLIP_CHILDREN_AND_DRAW** = ``2`` -Parent is used for clipping child, but parent is also drawn underneath child as normal before clipping child to its visible area. +This node is used as a mask and is also drawn. The mask is based on this node's alpha channel: Opaque pixels are kept, transparent pixels are discarded, and semi-transparent pixels are blended in according to their opacity. Children are clipped to the parent's drawn area. .. _class_CanvasItem_constant_CLIP_CHILDREN_MAX: @@ -461,7 +463,9 @@ Constants **NOTIFICATION_TRANSFORM_CHANGED** = ``2000`` :ref:`πŸ”—` -The **CanvasItem**'s global transform has changed. This notification is only received if enabled by :ref:`set_notify_transform`. +Notification received when this node's global transform changes, if :ref:`is_transform_notification_enabled()` is ``true``. See also :ref:`set_notify_transform()` and :ref:`get_transform()`. + +\ **Note:** Many canvas items such as :ref:`Camera2D` or :ref:`CollisionObject2D` automatically enable this in order to function correctly. .. _class_CanvasItem_constant_NOTIFICATION_LOCAL_TRANSFORM_CHANGED: @@ -469,7 +473,9 @@ The **CanvasItem**'s global transform has changed. This notification is only rec **NOTIFICATION_LOCAL_TRANSFORM_CHANGED** = ``35`` :ref:`πŸ”—` -The **CanvasItem**'s local transform has changed. This notification is only received if enabled by :ref:`set_notify_local_transform`. +Notification received when this node's transform changes, if :ref:`is_local_transform_notification_enabled()` is ``true``. This is not received when a parent :ref:`Node2D`'s transform changes. See also :ref:`set_notify_local_transform()`. + +\ **Note:** Many canvas items such as :ref:`Camera2D` or :ref:`CollisionShape2D` automatically enable this in order to function correctly. .. _class_CanvasItem_constant_NOTIFICATION_DRAW: @@ -477,7 +483,7 @@ The **CanvasItem**'s local transform has changed. This notification is only rece **NOTIFICATION_DRAW** = ``30`` :ref:`πŸ”—` -The **CanvasItem** is requested to draw (see :ref:`_draw`). +The **CanvasItem** is requested to draw (see :ref:`_draw()`). .. _class_CanvasItem_constant_NOTIFICATION_VISIBILITY_CHANGED: @@ -485,7 +491,9 @@ The **CanvasItem** is requested to draw (see :ref:`_draw` -The **CanvasItem**'s visibility has changed. +Notification received when this node's visibility changes (see :ref:`visible` and :ref:`is_visible_in_tree()`). + +This notification is received *before* the related :ref:`visibility_changed` signal. .. _class_CanvasItem_constant_NOTIFICATION_ENTER_CANVAS: @@ -509,7 +517,7 @@ The **CanvasItem** has exited the canvas. **NOTIFICATION_WORLD_2D_CHANGED** = ``36`` :ref:`πŸ”—` -The **CanvasItem**'s active :ref:`World2D` changed. +Notification received when this **CanvasItem** is registered to a new :ref:`World2D` (see :ref:`get_world_2d()`). .. rst-class:: classref-section-separator @@ -531,9 +539,9 @@ Property Descriptions - |void| **set_clip_children_mode**\ (\ value\: :ref:`ClipChildrenMode`\ ) - :ref:`ClipChildrenMode` **get_clip_children_mode**\ (\ ) -Allows the current node to clip child nodes, essentially acting as a mask. +The mode in which this node clips its children, acting as a mask. -\ **Note:** Clipping nodes cannot be nested or placed within :ref:`CanvasGroup`\ s. If an ancestor of this node clips its children or is a :ref:`CanvasGroup`, then this node's clip mode should be set to :ref:`CLIP_CHILDREN_DISABLED` to avoid unexpected behavior. +\ **Note:** Clipping nodes cannot be nested or placed within a :ref:`CanvasGroup`. If an ancestor of this node clips its children or is a :ref:`CanvasGroup`, then this node's clip mode should be set to :ref:`CLIP_CHILDREN_DISABLED` to avoid unexpected behavior. .. rst-class:: classref-item-separator @@ -603,7 +611,7 @@ The color applied to this **CanvasItem**. This property does affect child **Canv The color applied to this **CanvasItem**. This property does **not** affect child **CanvasItem**\ s, unlike :ref:`modulate` which affects both the node itself and its children. -\ **Note:** Internal children (e.g. sliders in :ref:`ColorPicker` or tab bar in :ref:`TabContainer`) are also not affected by this property (see ``include_internal`` parameter of :ref:`Node.get_child` and other similar methods). +\ **Note:** Internal children are also not affected by this property (see the ``include_internal`` parameter in :ref:`Node.add_child()`). For built-in nodes this includes sliders in :ref:`ColorPicker`, and the tab bar in :ref:`TabContainer`. .. rst-class:: classref-item-separator @@ -620,7 +628,7 @@ The color applied to this **CanvasItem**. This property does **not** affect chil - |void| **set_draw_behind_parent**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_draw_behind_parent_enabled**\ (\ ) -If ``true``, the object draws behind its parent. +If ``true``, this node draws behind its parent. .. rst-class:: classref-item-separator @@ -637,7 +645,7 @@ If ``true``, the object draws behind its parent. - |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter`\ ) - :ref:`TextureFilter` **get_texture_filter**\ (\ ) -The texture filtering mode to use on this **CanvasItem**. +The filtering mode used to render this **CanvasItem**'s texture(s). .. rst-class:: classref-item-separator @@ -654,7 +662,7 @@ The texture filtering mode to use on this **CanvasItem**. - |void| **set_texture_repeat**\ (\ value\: :ref:`TextureRepeat`\ ) - :ref:`TextureRepeat` **get_texture_repeat**\ (\ ) -The texture repeating mode to use on this **CanvasItem**. +The repeating mode used to render this **CanvasItem**'s texture(s). .. rst-class:: classref-item-separator @@ -688,7 +696,7 @@ If ``true``, this **CanvasItem** will *not* inherit its transform from parent ** - |void| **set_use_parent_material**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_use_parent_material**\ (\ ) -If ``true``, the parent **CanvasItem**'s :ref:`material` property is used as this one's material. +If ``true``, the parent **CanvasItem**'s :ref:`material` is used as this node's material. .. rst-class:: classref-item-separator @@ -722,7 +730,7 @@ The rendering layer in which this **CanvasItem** is rendered by :ref:`Viewport`\ ) - :ref:`bool` **is_visible**\ (\ ) -If ``true``, this **CanvasItem** may be drawn. Whether this **CanvasItem** is actually drawn depends on the visibility of all of its **CanvasItem** ancestors. In other words: this **CanvasItem** will be drawn when :ref:`is_visible_in_tree` returns ``true`` and all **CanvasItem** ancestors share at least one :ref:`visibility_layer` with this **CanvasItem**. +If ``true``, this **CanvasItem** may be drawn. Whether this **CanvasItem** is actually drawn depends on the visibility of all of its **CanvasItem** ancestors. In other words: this **CanvasItem** will be drawn when :ref:`is_visible_in_tree()` returns ``true`` and all **CanvasItem** ancestors share at least one :ref:`visibility_layer` with this **CanvasItem**. \ **Note:** For controls that inherit :ref:`Popup`, the correct way to make them visible is to call one of the multiple ``popup*()`` functions instead. @@ -762,7 +770,9 @@ Nodes sort relative to each other only if they are on the same :ref:`z_index`\ ) - :ref:`bool` **is_z_relative**\ (\ ) -If ``true``, the node's Z index is relative to its parent's Z index. If this node's Z index is 2 and its parent's effective Z index is 3, then this node's effective Z index will be 2 + 3 = 5. +If ``true``, this node's final Z index is relative to its parent's Z index. + +For example, if :ref:`z_index` is ``2`` and its parent's final Z index is ``3``, then this node's final Z index will be ``5`` (``2 + 3``). .. rst-class:: classref-item-separator @@ -779,9 +789,9 @@ If ``true``, the node's Z index is relative to its parent's Z index. If this nod - |void| **set_z_index**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_z_index**\ (\ ) -Controls the order in which the nodes render. A node with a higher Z index will display in front of others. Must be between :ref:`RenderingServer.CANVAS_ITEM_Z_MIN` and :ref:`RenderingServer.CANVAS_ITEM_Z_MAX` (inclusive). +The order in which this node is drawn. A node with a higher Z index will display in front of others. Must be between :ref:`RenderingServer.CANVAS_ITEM_Z_MIN` and :ref:`RenderingServer.CANVAS_ITEM_Z_MAX` (inclusive). -\ **Note:** Changing the Z index of a :ref:`Control` only affects the drawing order, not the order in which input events are handled. This can be useful to implement certain UI animations, e.g. a menu where hovered items are scaled and should overlap others. +\ **Note:** The Z index does **not** affect the order in which **CanvasItem** nodes are processed or the way input events are handled. This is especially important to keep in mind for :ref:`Control` nodes. .. rst-class:: classref-section-separator @@ -798,9 +808,9 @@ Method Descriptions |void| **_draw**\ (\ ) |virtual| :ref:`πŸ”—` -Called when **CanvasItem** has been requested to redraw (after :ref:`queue_redraw` is called, either manually or by the engine). +Called when **CanvasItem** has been requested to redraw (after :ref:`queue_redraw()` is called, either manually or by the engine). -Corresponds to the :ref:`NOTIFICATION_DRAW` notification in :ref:`Object._notification`. +Corresponds to the :ref:`NOTIFICATION_DRAW` notification in :ref:`Object._notification()`. .. rst-class:: classref-item-separator @@ -824,7 +834,7 @@ Subsequent drawing commands will be ignored unless they fall within the specifie |void| **draw_arc**\ (\ center\: :ref:`Vector2`, radius\: :ref:`float`, start_angle\: :ref:`float`, end_angle\: :ref:`float`, point_count\: :ref:`int`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws an unfilled arc between the given angles with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). The larger the value of ``point_count``, the smoother the curve. See also :ref:`draw_circle`. +Draws an unfilled arc between the given angles with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). The larger the value of ``point_count``, the smoother the curve. See also :ref:`draw_circle()`. If ``width`` is negative, it will be ignored and the arc will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the arc will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -838,9 +848,9 @@ The arc is drawn from ``start_angle`` towards the value of ``end_angle`` so in c .. rst-class:: classref-method -|void| **draw_char**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`πŸ”—` +|void| **draw_char**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1), oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`πŸ”—` -Draws a string first character using a custom font. +Draws a string first character using a custom font. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. .. rst-class:: classref-item-separator @@ -850,9 +860,9 @@ Draws a string first character using a custom font. .. rst-class:: classref-method -|void| **draw_char_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, size\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`πŸ”—` +|void| **draw_char_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, char\: :ref:`String`, font_size\: :ref:`int` = 16, size\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`πŸ”—` -Draws a string first character outline using a custom font. +Draws a string first character outline using a custom font. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. .. rst-class:: classref-item-separator @@ -864,7 +874,7 @@ Draws a string first character outline using a custom font. |void| **draw_circle**\ (\ position\: :ref:`Vector2`, radius\: :ref:`float`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a circle. See also :ref:`draw_arc`, :ref:`draw_polyline`, and :ref:`draw_polygon`. +Draws a circle. See also :ref:`draw_arc()`, :ref:`draw_polyline()`, and :ref:`draw_polygon()`. If ``filled`` is ``true``, the circle will be filled with the ``color`` specified. If ``filled`` is ``false``, the circle will be drawn as a stroke with the ``color`` and ``width`` specified. @@ -884,9 +894,9 @@ If ``antialiased`` is ``true``, half transparent "feathers" will be attached to |void| **draw_colored_polygon**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) :ref:`πŸ”—` -Draws a colored polygon of any number of points, convex or concave. Unlike :ref:`draw_polygon`, a single color must be specified for the whole polygon. +Draws a colored polygon of any number of points, convex or concave. Unlike :ref:`draw_polygon()`, a single color must be specified for the whole polygon. -\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon` and using :ref:`draw_mesh`, :ref:`draw_multimesh`, or :ref:`RenderingServer.canvas_item_add_triangle_array`. +\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon()` and using :ref:`draw_mesh()`, :ref:`draw_multimesh()`, or :ref:`RenderingServer.canvas_item_add_triangle_array()`. .. rst-class:: classref-item-separator @@ -898,10 +908,12 @@ Draws a colored polygon of any number of points, convex or concave. Unlike :ref: |void| **draw_dashed_line**\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, dash\: :ref:`float` = 2.0, aligned\: :ref:`bool` = true, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a dashed line from a 2D point to another, with a given color and width. See also :ref:`draw_multiline` and :ref:`draw_polyline`. +Draws a dashed line from a 2D point to another, with a given color and width. See also :ref:`draw_line()`, :ref:`draw_multiline()`, and :ref:`draw_polyline()`. If ``width`` is negative, then a two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the line parts will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. +\ ``dash`` is the length of each dash in pixels, with the gap between each dash being the same length. If ``aligned`` is ``true``, the length of the first and last dashes may be shortened or lengthened to allow the line to begin and end at the precise points defined by ``from`` and ``to``. Both ends are always symmetrical when ``aligned`` is ``true``. If ``aligned`` is ``false``, all dashes will have the same length, but the line may appear incomplete at the end due to the dash length not dividing evenly into the line length. Only full dashes are drawn when ``aligned`` is ``false``. + If ``antialiased`` is ``true``, half transparent "feathers" will be attached to the boundary, making outlines smooth. \ **Note:** ``antialiased`` is only effective if ``width`` is greater than ``0.0``. @@ -916,7 +928,7 @@ If ``antialiased`` is ``true``, half transparent "feathers" will be attached to |void| **draw_end_animation**\ (\ ) :ref:`πŸ”—` -After submitting all animations slices via :ref:`draw_animation_slice`, this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required. +After submitting all animations slices via :ref:`draw_animation_slice()`, this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required. .. rst-class:: classref-item-separator @@ -949,7 +961,7 @@ Texture is drawn using the following blend operation, blend mode of the :ref:`Ca |void| **draw_line**\ (\ from\: :ref:`Vector2`, to\: :ref:`Vector2`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also :ref:`draw_multiline` and :ref:`draw_polyline`. +Draws a line from a 2D point to another, with a given color and width. It can be optionally antialiased. See also :ref:`draw_dashed_line()`, :ref:`draw_multiline()`, and :ref:`draw_polyline()`. If ``width`` is negative, then a two-point primitive will be drawn instead of a four-point one. This means that when the CanvasItem is scaled, the line will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -991,7 +1003,7 @@ Value of the ``pixel_range`` should the same that was used during distance field |void| **draw_multiline**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws multiple disconnected lines with a uniform ``width`` and ``color``. Each line is defined by two consecutive points from ``points`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw interconnected lines, use :ref:`draw_polyline` instead. +Draws multiple disconnected lines with a uniform ``width`` and ``color``. Each line is defined by two consecutive points from ``points`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw interconnected lines, use :ref:`draw_polyline()` instead. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1007,7 +1019,7 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f |void| **draw_multiline_colors**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws multiple disconnected lines with a uniform ``width`` and segment-by-segment coloring. Each segment is defined by two consecutive points from ``points`` array and a corresponding color from ``colors`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints and has ``colors[i]`` color. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw interconnected lines, use :ref:`draw_polyline_colors` instead. +Draws multiple disconnected lines with a uniform ``width`` and segment-by-segment coloring. Each segment is defined by two consecutive points from ``points`` array and a corresponding color from ``colors`` array, i.e. i-th segment consists of ``points[2 * i]``, ``points[2 * i + 1]`` endpoints and has ``colors[i]`` color. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw interconnected lines, use :ref:`draw_polyline_colors()` instead. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1021,9 +1033,9 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f .. rst-class:: classref-method -|void| **draw_multiline_string**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| :ref:`πŸ”—` +|void| **draw_multiline_string**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`πŸ”—` -Breaks ``text`` into lines and draws it using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. +Breaks ``text`` into lines and draws it using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. .. rst-class:: classref-item-separator @@ -1033,9 +1045,9 @@ Breaks ``text`` into lines and draws it using the specified ``font`` at the ``po .. rst-class:: classref-method -|void| **draw_multiline_string_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| :ref:`πŸ”—` +|void| **draw_multiline_string_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, max_lines\: :ref:`int` = -1, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), brk_flags\: |bitfield|\[:ref:`LineBreakFlag`\] = 3, justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`πŸ”—` -Breaks ``text`` to the lines and draws text outline using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. +Breaks ``text`` to the lines and draws text outline using the specified ``font`` at the ``pos`` (top-left corner). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. .. rst-class:: classref-item-separator @@ -1059,9 +1071,9 @@ Draws a :ref:`MultiMesh` in 2D with the provided texture. See : |void| **draw_polygon**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array` = PackedVector2Array(), texture\: :ref:`Texture2D` = null\ ) :ref:`πŸ”—` -Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`draw_colored_polygon`, each point's color can be changed individually. See also :ref:`draw_polyline` and :ref:`draw_polyline_colors`. If you need more flexibility (such as being able to use bones), use :ref:`RenderingServer.canvas_item_add_triangle_array` instead. +Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`draw_colored_polygon()`, each point's color can be changed individually. See also :ref:`draw_polyline()` and :ref:`draw_polyline_colors()`. If you need more flexibility (such as being able to use bones), use :ref:`RenderingServer.canvas_item_add_triangle_array()` instead. -\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon` and using :ref:`draw_mesh`, :ref:`draw_multimesh`, or :ref:`RenderingServer.canvas_item_add_triangle_array`. +\ **Note:** If you frequently redraw the same polygon with a large number of vertices, consider pre-calculating the triangulation with :ref:`Geometry2D.triangulate_polygon()` and using :ref:`draw_mesh()`, :ref:`draw_multimesh()`, or :ref:`RenderingServer.canvas_item_add_triangle_array()`. .. rst-class:: classref-item-separator @@ -1073,7 +1085,7 @@ Draws a solid polygon of any number of points, convex or concave. Unlike :ref:`d |void| **draw_polyline**\ (\ points\: :ref:`PackedVector2Array`, color\: :ref:`Color`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws interconnected line segments with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw disconnected lines, use :ref:`draw_multiline` instead. See also :ref:`draw_polygon`. +Draws interconnected line segments with a uniform ``color`` and ``width`` and optional antialiasing (supported only for positive ``width``). When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw disconnected lines, use :ref:`draw_multiline()` instead. See also :ref:`draw_polygon()`. If ``width`` is negative, it will be ignored and the polyline will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1087,7 +1099,7 @@ If ``width`` is negative, it will be ignored and the polyline will be drawn usin |void| **draw_polyline_colors**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws interconnected line segments with a uniform ``width``, point-by-point coloring, and optional antialiasing (supported only for positive ``width``). Colors assigned to line points match by index between ``points`` and ``colors``, i.e. each line segment is filled with a gradient between the colors of the endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line` calls. To draw disconnected lines, use :ref:`draw_multiline_colors` instead. See also :ref:`draw_polygon`. +Draws interconnected line segments with a uniform ``width``, point-by-point coloring, and optional antialiasing (supported only for positive ``width``). Colors assigned to line points match by index between ``points`` and ``colors``, i.e. each line segment is filled with a gradient between the colors of the endpoints. When drawing large amounts of lines, this is faster than using individual :ref:`draw_line()` calls. To draw disconnected lines, use :ref:`draw_multiline_colors()` instead. See also :ref:`draw_polygon()`. If ``width`` is negative, it will be ignored and the polyline will be drawn using :ref:`RenderingServer.PRIMITIVE_LINE_STRIP`. This means that when the CanvasItem is scaled, the polyline will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1101,7 +1113,7 @@ If ``width`` is negative, it will be ignored and the polyline will be drawn usin |void| **draw_primitive**\ (\ points\: :ref:`PackedVector2Array`, colors\: :ref:`PackedColorArray`, uvs\: :ref:`PackedVector2Array`, texture\: :ref:`Texture2D` = null\ ) :ref:`πŸ”—` -Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also :ref:`draw_line`, :ref:`draw_polyline`, :ref:`draw_polygon`, and :ref:`draw_rect`. +Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. If 0 points or more than 4 points are specified, nothing will be drawn and an error message will be printed. See also :ref:`draw_line()`, :ref:`draw_polyline()`, :ref:`draw_polygon()`, and :ref:`draw_rect()`. .. rst-class:: classref-item-separator @@ -1113,7 +1125,7 @@ Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for |void| **draw_rect**\ (\ rect\: :ref:`Rect2`, color\: :ref:`Color`, filled\: :ref:`bool` = true, width\: :ref:`float` = -1.0, antialiased\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a rectangle. If ``filled`` is ``true``, the rectangle will be filled with the ``color`` specified. If ``filled`` is ``false``, the rectangle will be drawn as a stroke with the ``color`` and ``width`` specified. See also :ref:`draw_texture_rect`. +Draws a rectangle. If ``filled`` is ``true``, the rectangle will be filled with the ``color`` specified. If ``filled`` is ``false``, the rectangle will be drawn as a stroke with the ``color`` and ``width`` specified. See also :ref:`draw_texture_rect()`. If ``width`` is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive ``width`` like ``1.0``. @@ -1157,9 +1169,9 @@ Sets a custom transform for drawing via matrix. Anything drawn afterwards will b .. rst-class:: classref-method -|void| **draw_string**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| :ref:`πŸ”—` +|void| **draw_string**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`πŸ”—` -Draws ``text`` using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. +Draws ``text`` using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. \ **Example:** Draw "Hello world", using the project's default font: @@ -1186,7 +1198,7 @@ Draws ``text`` using the specified ``font`` at the ``pos`` (bottom-left corner u -See also :ref:`Font.draw_string`. +See also :ref:`Font.draw_string()`. .. rst-class:: classref-item-separator @@ -1196,9 +1208,9 @@ See also :ref:`Font.draw_string`. .. rst-class:: classref-method -|void| **draw_string_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0\ ) |const| :ref:`πŸ”—` +|void| **draw_string_outline**\ (\ font\: :ref:`Font`, pos\: :ref:`Vector2`, text\: :ref:`String`, alignment\: :ref:`HorizontalAlignment` = 0, width\: :ref:`float` = -1, font_size\: :ref:`int` = 16, size\: :ref:`int` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1), justification_flags\: |bitfield|\[:ref:`JustificationFlag`\] = 3, direction\: :ref:`Direction` = 0, orientation\: :ref:`Orientation` = 0, oversampling\: :ref:`float` = 0.0\ ) |const| :ref:`πŸ”—` -Draws ``text`` outline using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. +Draws ``text`` outline using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. If ``oversampling`` is greater than zero, it is used as font oversampling factor, otherwise viewport oversampling settings are used. .. rst-class:: classref-item-separator @@ -1234,7 +1246,7 @@ Draws a texture at a given position. |void| **draw_texture_rect**\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, tile\: :ref:`bool`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Draws a textured rectangle at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_rect` and :ref:`draw_texture_rect_region`. +Draws a textured rectangle at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_rect()` and :ref:`draw_texture_rect_region()`. .. rst-class:: classref-item-separator @@ -1246,7 +1258,7 @@ Draws a textured rectangle at a given position, optionally modulated by a color. |void| **draw_texture_rect_region**\ (\ texture\: :ref:`Texture2D`, rect\: :ref:`Rect2`, src_rect\: :ref:`Rect2`, modulate\: :ref:`Color` = Color(1, 1, 1, 1), transpose\: :ref:`bool` = false, clip_uv\: :ref:`bool` = true\ ) :ref:`πŸ”—` -Draws a textured rectangle from a texture's region (specified by ``src_rect``) at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_texture_rect`. +Draws a textured rectangle from a texture's region (specified by ``src_rect``) at a given position, optionally modulated by a color. If ``transpose`` is ``true``, the texture will have its X and Y coordinates swapped. See also :ref:`draw_texture_rect()`. .. rst-class:: classref-item-separator @@ -1258,7 +1270,9 @@ Draws a textured rectangle from a texture's region (specified by ``src_rect``) a |void| **force_update_transform**\ (\ ) :ref:`πŸ”—` -Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. +Forces the node's transform to update. Fails if the node is not inside the tree. See also :ref:`get_transform()`. + +\ **Note:** For performance reasons, transform changes are usually accumulated and applied *once* at the end of the frame. The update propagates through **CanvasItem** children, as well. Therefore, use this method only when you need an up-to-date transform (such as during physics operations). .. rst-class:: classref-item-separator @@ -1270,7 +1284,7 @@ Forces the transform to update. Transform changes in physics are not instant for :ref:`RID` **get_canvas**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`RID` of the :ref:`World2D` canvas where this item is in. +Returns the :ref:`RID` of the :ref:`World2D` canvas where this node is registered to, used by the :ref:`RenderingServer`. .. rst-class:: classref-item-separator @@ -1282,7 +1296,7 @@ Returns the :ref:`RID` of the :ref:`World2D` canvas wh :ref:`RID` **get_canvas_item**\ (\ ) |const| :ref:`πŸ”—` -Returns the canvas item RID used by :ref:`RenderingServer` for this item. +Returns the internal canvas item :ref:`RID` used by the :ref:`RenderingServer` for this node. .. rst-class:: classref-item-separator @@ -1306,7 +1320,7 @@ Returns the :ref:`CanvasLayer` that contains this node, or `` :ref:`Transform2D` **get_canvas_transform**\ (\ ) |const| :ref:`πŸ”—` -Returns the transform from the coordinate system of the canvas, this item is in, to the :ref:`Viewport`\ s coordinate system. +Returns the transform of this node, converted from its registered canvas's coordinate system to its viewport's coordinate system. See also :ref:`Node.get_viewport()`. .. rst-class:: classref-item-separator @@ -1318,9 +1332,9 @@ Returns the transform from the coordinate system of the canvas, this item is in, :ref:`Vector2` **get_global_mouse_position**\ (\ ) |const| :ref:`πŸ”—` -Returns the mouse's position in the :ref:`CanvasLayer` that this **CanvasItem** is in using the coordinate system of the :ref:`CanvasLayer`. +Returns mouse cursor's global position relative to the :ref:`CanvasLayer` that contains this node. -\ **Note:** For screen-space coordinates (e.g. when using a non-embedded :ref:`Popup`), you can use :ref:`DisplayServer.mouse_get_position`. +\ **Note:** For screen-space coordinates (e.g. when using a non-embedded :ref:`Popup`), you can use :ref:`DisplayServer.mouse_get_position()`. .. rst-class:: classref-item-separator @@ -1382,7 +1396,7 @@ Returns the mouse's position in this **CanvasItem** using the local coordinate s Returns the transform of this **CanvasItem** in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. -Equals to :ref:`get_global_transform` if the window is embedded (see :ref:`Viewport.gui_embed_subwindows`). +Equals to :ref:`get_global_transform()` if the window is embedded (see :ref:`Viewport.gui_embed_subwindows`). .. rst-class:: classref-item-separator @@ -1394,7 +1408,7 @@ Equals to :ref:`get_global_transform` **get_transform**\ (\ ) |const| :ref:`πŸ”—` -Returns the transform matrix of this item. +Returns the transform matrix of this **CanvasItem**. .. rst-class:: classref-item-separator @@ -1406,7 +1420,7 @@ Returns the transform matrix of this item. :ref:`Rect2` **get_viewport_rect**\ (\ ) |const| :ref:`πŸ”—` -Returns the viewport's boundaries as a :ref:`Rect2`. +Returns this node's viewport boundaries as a :ref:`Rect2`. See also :ref:`Node.get_viewport()`. .. rst-class:: classref-item-separator @@ -1418,7 +1432,7 @@ Returns the viewport's boundaries as a :ref:`Rect2`. :ref:`Transform2D` **get_viewport_transform**\ (\ ) |const| :ref:`πŸ”—` -Returns the transform from the coordinate system of the canvas, this item is in, to the :ref:`Viewport`\ s embedders coordinate system. +Returns the transform of this node, converted from its registered canvas's coordinate system to its viewport embedder's coordinate system. See also :ref:`Viewport.get_final_transform()` and :ref:`Node.get_viewport()`. .. rst-class:: classref-item-separator @@ -1430,7 +1444,7 @@ Returns the transform from the coordinate system of the canvas, this item is in, :ref:`bool` **get_visibility_layer_bit**\ (\ layer\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns an individual bit on the rendering visibility layer. +Returns ``true`` if the layer at the given index is set in :ref:`visibility_layer`. .. rst-class:: classref-item-separator @@ -1442,7 +1456,9 @@ Returns an individual bit on the rendering visibility layer. :ref:`World2D` **get_world_2d**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`World2D` where this item is in. +Returns the :ref:`World2D` this node is registered to. + +Usually, this is the same as this node's viewport (see :ref:`Node.get_viewport()` and :ref:`Viewport.find_world_2d()`). .. rst-class:: classref-item-separator @@ -1466,7 +1482,7 @@ Hide the **CanvasItem** if it's currently visible. This is equivalent to setting :ref:`bool` **is_local_transform_notification_enabled**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if local transform notifications are communicated to children. +Returns ``true`` if the node receives :ref:`NOTIFICATION_LOCAL_TRANSFORM_CHANGED` whenever its local transform changes. This is enabled with :ref:`set_notify_local_transform()`. .. rst-class:: classref-item-separator @@ -1478,7 +1494,7 @@ Returns ``true`` if local transform notifications are communicated to children. :ref:`bool` **is_transform_notification_enabled**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if global transform notifications are communicated to children. +Returns ``true`` if the node receives :ref:`NOTIFICATION_TRANSFORM_CHANGED` whenever its global transform changes. This is enabled with :ref:`set_notify_transform()`. .. rst-class:: classref-item-separator @@ -1490,11 +1506,11 @@ Returns ``true`` if global transform notifications are communicated to children. :ref:`bool` **is_visible_in_tree**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is therefore not drawn (see :ref:`_draw`). +Returns ``true`` if the node is present in the :ref:`SceneTree`, its :ref:`visible` property is ``true`` and all its ancestors are also visible. If any ancestor is hidden, this node will not be visible in the scene tree, and is therefore not drawn (see :ref:`_draw()`). Visibility is checked only in parent nodes that inherit from **CanvasItem**, :ref:`CanvasLayer`, and :ref:`Window`. If the parent is of any other type (such as :ref:`Node`, :ref:`AnimationPlayer`, or :ref:`Node3D`), it is assumed to be visible. -\ **Note:** This method does not take :ref:`visibility_layer` into account, so even if this method returns ``true`` the node might end up not being rendered. +\ **Note:** This method does not take :ref:`visibility_layer` into account, so even if this method returns ``true``, the node might end up not being rendered. .. rst-class:: classref-item-separator @@ -1508,7 +1524,7 @@ Visibility is checked only in parent nodes that inherit from **CanvasItem**, :re Transforms ``viewport_point`` from the viewport's coordinates to this node's local coordinates. -For the opposite operation, use :ref:`get_global_transform_with_canvas`. +For the opposite operation, use :ref:`get_global_transform_with_canvas()`. :: @@ -1524,7 +1540,7 @@ For the opposite operation, use :ref:`get_global_transform_with_canvas` **make_input_local**\ (\ event\: :ref:`InputEvent`\ ) |const| :ref:`πŸ”—` -Transformations issued by ``event``'s inputs are applied in local space instead of global space. +Returns a copy of the given ``event`` with its coordinates converted from global space to this **CanvasItem**'s local space. If not possible, returns the same :ref:`InputEvent` unchanged. .. rst-class:: classref-item-separator @@ -1536,9 +1552,7 @@ Transformations issued by ``event``'s inputs are applied in local space instead |void| **move_to_front**\ (\ ) :ref:`πŸ”—` -Moves this node to display on top of its siblings. - -Internally, the node is moved to the bottom of parent's child list. The method has no effect on nodes without a parent. +Moves this node below its siblings, usually causing the node to draw on top of its siblings. Does nothing if this node does not have a parent. See also :ref:`Node.move_child()`. .. rst-class:: classref-item-separator @@ -1550,7 +1564,7 @@ Internally, the node is moved to the bottom of parent's child list. The method h |void| **queue_redraw**\ (\ ) :ref:`πŸ”—` -Queues the **CanvasItem** to redraw. During idle time, if **CanvasItem** is visible, :ref:`NOTIFICATION_DRAW` is sent and :ref:`_draw` is called. This only occurs **once** per frame, even if this method has been called multiple times. +Queues the **CanvasItem** to redraw. During idle time, if **CanvasItem** is visible, :ref:`NOTIFICATION_DRAW` is sent and :ref:`_draw()` is called. This only occurs **once** per frame, even if this method has been called multiple times. .. rst-class:: classref-item-separator @@ -1562,7 +1576,7 @@ Queues the **CanvasItem** to redraw. During idle time, if **CanvasItem** is visi |void| **set_instance_shader_parameter**\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Set the value of a shader uniform for this instance only (`per-instance uniform <../tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms>`__). See also :ref:`ShaderMaterial.set_shader_parameter` to assign a uniform on all instances using the same :ref:`ShaderMaterial`. +Set the value of a shader uniform for this instance only (`per-instance uniform <../tutorials/shaders/shader_reference/shading_language.html#per-instance-uniforms>`__). See also :ref:`ShaderMaterial.set_shader_parameter()` to assign a uniform on all instances using the same :ref:`ShaderMaterial`. \ **Note:** For a shader uniform to be assignable on a per-instance basis, it *must* be defined with ``instance uniform ...`` rather than ``uniform ...`` in the shader code. @@ -1578,7 +1592,9 @@ Set the value of a shader uniform for this instance only (`per-instance uniform |void| **set_notify_local_transform**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_LOCAL_TRANSFORM_CHANGED` when its local transform changes. +If ``true``, the node will receive :ref:`NOTIFICATION_LOCAL_TRANSFORM_CHANGED` whenever its local transform changes. + +\ **Note:** Many canvas items such as :ref:`Bone2D` or :ref:`CollisionShape2D` automatically enable this in order to function correctly. .. rst-class:: classref-item-separator @@ -1590,7 +1606,9 @@ If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_LOCAL_TRANS |void| **set_notify_transform**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``enable`` is ``true``, this node will receive :ref:`NOTIFICATION_TRANSFORM_CHANGED` when its global transform changes. +If ``true``, the node will receive :ref:`NOTIFICATION_TRANSFORM_CHANGED` whenever global transform changes. + +\ **Note:** Many canvas items such as :ref:`Camera2D` or :ref:`Light2D` automatically enable this in order to function correctly. .. rst-class:: classref-item-separator @@ -1614,7 +1632,9 @@ Set/clear individual bits on the rendering visibility layer. This simplifies edi |void| **show**\ (\ ) :ref:`πŸ”—` -Show the **CanvasItem** if it's currently hidden. This is equivalent to setting :ref:`visible` to ``true``. For controls that inherit :ref:`Popup`, the correct way to make them visible is to call one of the multiple ``popup*()`` functions instead. +Show the **CanvasItem** if it's currently hidden. This is equivalent to setting :ref:`visible` to ``true``. + +\ **Note:** For controls that inherit :ref:`Popup`, the correct way to make them visible is to call one of the multiple ``popup*()`` functions instead. .. |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_canvaslayer.rst b/classes/class_canvaslayer.rst index f95e14b7137..61047a90595 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -27,7 +27,7 @@ Description \ **Note:** Embedded :ref:`Window`\ s are placed on layer ``1024``. :ref:`CanvasItem`\ s on layers ``1025`` and higher appear in front of embedded windows. -\ **Note:** Each **CanvasLayer** is drawn on one specific :ref:`Viewport` and cannot be shared between multiple :ref:`Viewport`\ s, see :ref:`custom_viewport`. When using multiple :ref:`Viewport`\ s, for example in a split-screen game, you need create an individual **CanvasLayer** for each :ref:`Viewport` you want it to be drawn on. +\ **Note:** Each **CanvasLayer** is drawn on one specific :ref:`Viewport` and cannot be shared between multiple :ref:`Viewport`\ s, see :ref:`custom_viewport`. When using multiple :ref:`Viewport`\ s, for example in a split-screen game, you need to create an individual **CanvasLayer** for each :ref:`Viewport` you want it to be drawn on. .. rst-class:: classref-introduction-group @@ -140,7 +140,7 @@ The custom :ref:`Viewport` node assigned to the **CanvasLayer**. - |void| **set_follow_viewport**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_following_viewport**\ (\ ) -If enabled, the **CanvasLayer** stays in a fixed position on the screen. If disabled, the **CanvasLayer** maintains its position in world space. +If enabled, the **CanvasLayer** maintains its position in world space. If disabled, the **CanvasLayer** stays in a fixed position on the screen. Together with :ref:`follow_viewport_scale`, this can be used for a pseudo-3D effect. diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index 574000152c6..56c01064177 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -19,7 +19,7 @@ A 2D physics body specialized for characters moved by script. Description ----------- -**CharacterBody2D** is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection (:ref:`move_and_slide` method) in addition to the general collision detection provided by :ref:`PhysicsBody2D.move_and_collide`. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters. +**CharacterBody2D** is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection (:ref:`move_and_slide()` method) in addition to the general collision detection provided by :ref:`PhysicsBody2D.move_and_collide()`. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters. For game objects that don't require complex movement or collision detection, such as moving platforms, :ref:`AnimatableBody2D` is simpler to configure. @@ -243,7 +243,7 @@ If ``true``, the body will always move at the same speed on the ground no matter - |void| **set_floor_max_angle**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_floor_max_angle**\ (\ ) -Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide`. The default value equals 45 degrees. +Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide()`. The default value equals 45 degrees. .. rst-class:: classref-item-separator @@ -260,9 +260,9 @@ Maximum angle (in radians) where a slope is still considered a floor (or a ceili - |void| **set_floor_snap_length**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_floor_snap_length**\ (\ ) -Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. +Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide()`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. -As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use :ref:`apply_floor_snap`. +As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use :ref:`apply_floor_snap()`. .. rst-class:: classref-item-separator @@ -279,7 +279,7 @@ As long as the snapping vector is in contact with the ground and the body moves - |void| **set_floor_stop_on_slope_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_floor_stop_on_slope_enabled**\ (\ ) -If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide` when the body is standing still. +If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide()` when the body is standing still. If ``false``, the body will slide on floor's slopes when :ref:`velocity` applies a downward force. @@ -298,7 +298,7 @@ If ``false``, the body will slide on floor's slopes when :ref:`velocity`\ ) - :ref:`int` **get_max_slides**\ (\ ) -Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide`. +Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide()`. Must be greater than zero. .. rst-class:: classref-item-separator @@ -315,7 +315,7 @@ Maximum number of times the body can change direction before it stops when calli - |void| **set_motion_mode**\ (\ value\: :ref:`MotionMode`\ ) - :ref:`MotionMode` **get_motion_mode**\ (\ ) -Sets the motion mode which defines the behavior of :ref:`move_and_slide`. See :ref:`MotionMode` constants for available modes. +Sets the motion mode which defines the behavior of :ref:`move_and_slide()`. See :ref:`MotionMode` constants for available modes. .. rst-class:: classref-item-separator @@ -383,7 +383,7 @@ Collision layers that will be included for detecting wall bodies that will act a - |void| **set_safe_margin**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_safe_margin**\ (\ ) -Extra margin used for collision recovery when calling :ref:`move_and_slide`. +Extra margin used for collision recovery when calling :ref:`move_and_slide()`. If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. @@ -423,7 +423,7 @@ If ``true``, during a jump against the ceiling, the body will slide, if ``false` - |void| **set_up_direction**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_up_direction**\ (\ ) -Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide`. Defaults to :ref:`Vector2.UP`. As the vector will be normalized it can't be equal to :ref:`Vector2.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. +Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide()`. Defaults to :ref:`Vector2.UP`. As the vector will be normalized it can't be equal to :ref:`Vector2.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. .. rst-class:: classref-item-separator @@ -440,7 +440,7 @@ Vector pointing upwards, used to determine what is a wall and what is a floor (o - |void| **set_velocity**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_velocity**\ (\ ) -Current velocity vector in pixels per second, used and modified during calls to :ref:`move_and_slide`. +Current velocity vector in pixels per second, used and modified during calls to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -457,7 +457,7 @@ Current velocity vector in pixels per second, used and modified during calls to - |void| **set_wall_min_slide_angle**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_wall_min_slide_angle**\ (\ ) -Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. This property only affects movement when :ref:`motion_mode` is :ref:`MOTION_MODE_FLOATING`. +Minimum angle (in radians) where the body is allowed to slide when it encounters a wall. The default value equals 15 degrees. This property only affects movement when :ref:`motion_mode` is :ref:`MOTION_MODE_FLOATING`. .. rst-class:: classref-section-separator @@ -474,7 +474,7 @@ Method Descriptions |void| **apply_floor_snap**\ (\ ) :ref:`πŸ”—` -Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor` returns ``true``. +Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor()` returns ``true``. .. rst-class:: classref-item-separator @@ -486,7 +486,7 @@ Allows to manually apply a snap to the floor regardless of the body's velocity. :ref:`float` **get_floor_angle**\ (\ up_direction\: :ref:`Vector2` = Vector2(0, -1)\ ) |const| :ref:`πŸ”—` -Returns the floor's collision angle at the last collision point according to ``up_direction``, which is :ref:`Vector2.UP` by default. This value is always positive and only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the floor's collision angle at the last collision point according to ``up_direction``, which is :ref:`Vector2.UP` by default. This value is always positive and only valid after calling :ref:`move_and_slide()` and when :ref:`is_on_floor()` returns ``true``. .. rst-class:: classref-item-separator @@ -498,7 +498,7 @@ Returns the floor's collision angle at the last collision point according to ``u :ref:`Vector2` **get_floor_normal**\ (\ ) |const| :ref:`πŸ”—` -Returns the collision normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the collision normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide()` and when :ref:`is_on_floor()` returns ``true``. \ **Warning:** The collision normal is not always the same as the surface normal. @@ -512,7 +512,7 @@ Returns the collision normal of the floor at the last collision point. Only vali :ref:`Vector2` **get_last_motion**\ (\ ) |const| :ref:`πŸ”—` -Returns the last motion applied to the **CharacterBody2D** during the last call to :ref:`move_and_slide`. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. +Returns the last motion applied to the **CharacterBody2D** during the last call to :ref:`move_and_slide()`. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. .. rst-class:: classref-item-separator @@ -524,7 +524,7 @@ Returns the last motion applied to the **CharacterBody2D** during the last call :ref:`KinematicCollision2D` **get_last_slide_collision**\ (\ ) :ref:`πŸ”—` -Returns a :ref:`KinematicCollision2D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide`. +Returns a :ref:`KinematicCollision2D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -536,7 +536,7 @@ Returns a :ref:`KinematicCollision2D`, which contain :ref:`Vector2` **get_platform_velocity**\ (\ ) |const| :ref:`πŸ”—` -Returns the linear velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide`. +Returns the linear velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -548,7 +548,7 @@ Returns the linear velocity of the platform at the last collision point. Only va :ref:`Vector2` **get_position_delta**\ (\ ) |const| :ref:`πŸ”—` -Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide`. +Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -560,7 +560,7 @@ Returns the travel (position delta) that occurred during the last call to :ref:` :ref:`Vector2` **get_real_velocity**\ (\ ) |const| :ref:`πŸ”—` -Returns the current real velocity since the last call to :ref:`move_and_slide`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. +Returns the current real velocity since the last call to :ref:`move_and_slide()`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. .. rst-class:: classref-item-separator @@ -572,7 +572,7 @@ Returns the current real velocity since the last call to :ref:`move_and_slide` **get_slide_collision**\ (\ slide_idx\: :ref:`int`\ ) :ref:`πŸ”—` -Returns a :ref:`KinematicCollision2D`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide`. Since the body can collide several times in a single call to :ref:`move_and_slide`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count` - 1). +Returns a :ref:`KinematicCollision2D`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide()`. Since the body can collide several times in a single call to :ref:`move_and_slide()`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count()` - 1). \ **Example:** Iterate through the collisions with a ``for`` loop: @@ -605,7 +605,7 @@ Returns a :ref:`KinematicCollision2D`, which contain :ref:`int` **get_slide_collision_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide`. +Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -617,7 +617,7 @@ Returns the number of times the body collided and changed direction during the l :ref:`Vector2` **get_wall_normal**\ (\ ) |const| :ref:`πŸ”—` -Returns the collision normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_wall` returns ``true``. +Returns the collision normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide()` and when :ref:`is_on_wall()` returns ``true``. \ **Warning:** The collision normal is not always the same as the surface normal. @@ -631,7 +631,7 @@ Returns the collision normal of the wall at the last collision point. Only valid :ref:`bool` **is_on_ceiling**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. +Returns ``true`` if the body collided with the ceiling on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. .. rst-class:: classref-item-separator @@ -643,7 +643,7 @@ Returns ``true`` if the body collided with the ceiling on the last call of :ref: :ref:`bool` **is_on_ceiling_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. +Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. .. rst-class:: classref-item-separator @@ -655,7 +655,7 @@ Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`bool` **is_on_floor**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. +Returns ``true`` if the body collided with the floor on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. .. rst-class:: classref-item-separator @@ -667,7 +667,7 @@ Returns ``true`` if the body collided with the floor on the last call of :ref:`m :ref:`bool` **is_on_floor_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. +Returns ``true`` if the body collided only with the floor on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. .. rst-class:: classref-item-separator @@ -679,7 +679,7 @@ Returns ``true`` if the body collided only with the floor on the last call of :r :ref:`bool` **is_on_wall**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. +Returns ``true`` if the body collided with a wall on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. .. rst-class:: classref-item-separator @@ -691,7 +691,7 @@ Returns ``true`` if the body collided with a wall on the last call of :ref:`move :ref:`bool` **is_on_wall_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. +Returns ``true`` if the body collided only with a wall on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. .. rst-class:: classref-item-separator @@ -705,7 +705,7 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a **CharacterBody2D** or :ref:`RigidBody2D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. -Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for detailed information about collisions that occurred, use :ref:`get_slide_collision`. +Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision()`, for detailed information about collisions that occurred, use :ref:`get_slide_collision()`. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index 019cbf75829..d1f27be7df4 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -19,7 +19,7 @@ A 3D physics body specialized for characters moved by script. Description ----------- -**CharacterBody3D** is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection (:ref:`move_and_slide` method) in addition to the general collision detection provided by :ref:`PhysicsBody3D.move_and_collide`. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters. +**CharacterBody3D** is a specialized class for physics bodies that are meant to be user-controlled. They are not affected by physics at all, but they affect other physics bodies in their path. They are mainly used to provide high-level API to move objects with wall and slope detection (:ref:`move_and_slide()` method) in addition to the general collision detection provided by :ref:`PhysicsBody3D.move_and_collide()`. This makes it useful for highly configurable physics bodies that must move in specific ways and collide with the world, as is often the case with user-controlled characters. For game objects that don't require complex movement or collision detection, such as moving platforms, :ref:`AnimatableBody3D` is simpler to configure. @@ -247,7 +247,7 @@ If ``true``, the body will always move at the same speed on the ground no matter - |void| **set_floor_max_angle**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_floor_max_angle**\ (\ ) -Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide`. The default value equals 45 degrees. +Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling :ref:`move_and_slide()`. The default value equals 45 degrees. .. rst-class:: classref-item-separator @@ -264,9 +264,9 @@ Maximum angle (in radians) where a slope is still considered a floor (or a ceili - |void| **set_floor_snap_length**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_floor_snap_length**\ (\ ) -Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. +Sets a snapping distance. When set to a value different from ``0.0``, the body is kept attached to slopes when calling :ref:`move_and_slide()`. The snapping vector is determined by the given distance along the opposite direction of the :ref:`up_direction`. -As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use :ref:`apply_floor_snap`. +As long as the snapping vector is in contact with the ground and the body moves against :ref:`up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along :ref:`up_direction`, meaning it contains vertical rising velocity, so it will be able to detach from the ground when jumping or when the body is pushed up by something. If you want to apply a snap without taking into account the velocity, use :ref:`apply_floor_snap()`. .. rst-class:: classref-item-separator @@ -283,7 +283,7 @@ As long as the snapping vector is in contact with the ground and the body moves - |void| **set_floor_stop_on_slope_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_floor_stop_on_slope_enabled**\ (\ ) -If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide` when the body is standing still. +If ``true``, the body will not slide on slopes when calling :ref:`move_and_slide()` when the body is standing still. If ``false``, the body will slide on floor's slopes when :ref:`velocity` applies a downward force. @@ -302,7 +302,7 @@ If ``false``, the body will slide on floor's slopes when :ref:`velocity`\ ) - :ref:`int` **get_max_slides**\ (\ ) -Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide`. +Maximum number of times the body can change direction before it stops when calling :ref:`move_and_slide()`. Must be greater than zero. .. rst-class:: classref-item-separator @@ -319,7 +319,7 @@ Maximum number of times the body can change direction before it stops when calli - |void| **set_motion_mode**\ (\ value\: :ref:`MotionMode`\ ) - :ref:`MotionMode` **get_motion_mode**\ (\ ) -Sets the motion mode which defines the behavior of :ref:`move_and_slide`. See :ref:`MotionMode` constants for available modes. +Sets the motion mode which defines the behavior of :ref:`move_and_slide()`. See :ref:`MotionMode` constants for available modes. .. rst-class:: classref-item-separator @@ -387,7 +387,7 @@ Collision layers that will be included for detecting wall bodies that will act a - |void| **set_safe_margin**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_safe_margin**\ (\ ) -Extra margin used for collision recovery when calling :ref:`move_and_slide`. +Extra margin used for collision recovery when calling :ref:`move_and_slide()`. If the body is at least this close to another body, it will consider them to be colliding and will be pushed away before performing the actual motion. @@ -427,7 +427,7 @@ If ``true``, during a jump against the ceiling, the body will slide, if ``false` - |void| **set_up_direction**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_up_direction**\ (\ ) -Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide`. Defaults to :ref:`Vector3.UP`. As the vector will be normalized it can't be equal to :ref:`Vector3.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. +Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling :ref:`move_and_slide()`. Defaults to :ref:`Vector3.UP`. As the vector will be normalized it can't be equal to :ref:`Vector3.ZERO`, if you want all collisions to be reported as walls, consider using :ref:`MOTION_MODE_FLOATING` as :ref:`motion_mode`. .. rst-class:: classref-item-separator @@ -444,7 +444,7 @@ Vector pointing upwards, used to determine what is a wall and what is a floor (o - |void| **set_velocity**\ (\ value\: :ref:`Vector3`\ ) - :ref:`Vector3` **get_velocity**\ (\ ) -Current velocity vector (typically meters per second), used and modified during calls to :ref:`move_and_slide`. +Current velocity vector (typically meters per second), used and modified during calls to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -461,7 +461,7 @@ Current velocity vector (typically meters per second), used and modified during - |void| **set_wall_min_slide_angle**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_wall_min_slide_angle**\ (\ ) -Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. When :ref:`motion_mode` is :ref:`MOTION_MODE_GROUNDED`, it only affects movement if :ref:`floor_block_on_wall` is ``true``. +Minimum angle (in radians) where the body is allowed to slide when it encounters a wall. The default value equals 15 degrees. When :ref:`motion_mode` is :ref:`MOTION_MODE_GROUNDED`, it only affects movement if :ref:`floor_block_on_wall` is ``true``. .. rst-class:: classref-section-separator @@ -478,7 +478,7 @@ Method Descriptions |void| **apply_floor_snap**\ (\ ) :ref:`πŸ”—` -Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor` returns ``true``. +Allows to manually apply a snap to the floor regardless of the body's velocity. This function does nothing when :ref:`is_on_floor()` returns ``true``. .. rst-class:: classref-item-separator @@ -490,7 +490,7 @@ Allows to manually apply a snap to the floor regardless of the body's velocity. :ref:`float` **get_floor_angle**\ (\ up_direction\: :ref:`Vector3` = Vector3(0, 1, 0)\ ) |const| :ref:`πŸ”—` -Returns the floor's collision angle at the last collision point according to ``up_direction``, which is :ref:`Vector3.UP` by default. This value is always positive and only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the floor's collision angle at the last collision point according to ``up_direction``, which is :ref:`Vector3.UP` by default. This value is always positive and only valid after calling :ref:`move_and_slide()` and when :ref:`is_on_floor()` returns ``true``. .. rst-class:: classref-item-separator @@ -502,7 +502,7 @@ Returns the floor's collision angle at the last collision point according to ``u :ref:`Vector3` **get_floor_normal**\ (\ ) |const| :ref:`πŸ”—` -Returns the collision normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_floor` returns ``true``. +Returns the collision normal of the floor at the last collision point. Only valid after calling :ref:`move_and_slide()` and when :ref:`is_on_floor()` returns ``true``. \ **Warning:** The collision normal is not always the same as the surface normal. @@ -516,7 +516,7 @@ Returns the collision normal of the floor at the last collision point. Only vali :ref:`Vector3` **get_last_motion**\ (\ ) |const| :ref:`πŸ”—` -Returns the last motion applied to the **CharacterBody3D** during the last call to :ref:`move_and_slide`. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. +Returns the last motion applied to the **CharacterBody3D** during the last call to :ref:`move_and_slide()`. The movement can be split into multiple motions when sliding occurs, and this method return the last one, which is useful to retrieve the current direction of the movement. .. rst-class:: classref-item-separator @@ -528,7 +528,7 @@ Returns the last motion applied to the **CharacterBody3D** during the last call :ref:`KinematicCollision3D` **get_last_slide_collision**\ (\ ) :ref:`πŸ”—` -Returns a :ref:`KinematicCollision3D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide`. +Returns a :ref:`KinematicCollision3D`, which contains information about the latest collision that occurred during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -540,7 +540,7 @@ Returns a :ref:`KinematicCollision3D`, which contain :ref:`Vector3` **get_platform_angular_velocity**\ (\ ) |const| :ref:`πŸ”—` -Returns the angular velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide`. +Returns the angular velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -552,7 +552,7 @@ Returns the angular velocity of the platform at the last collision point. Only v :ref:`Vector3` **get_platform_velocity**\ (\ ) |const| :ref:`πŸ”—` -Returns the linear velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide`. +Returns the linear velocity of the platform at the last collision point. Only valid after calling :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -564,7 +564,7 @@ Returns the linear velocity of the platform at the last collision point. Only va :ref:`Vector3` **get_position_delta**\ (\ ) |const| :ref:`πŸ”—` -Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide`. +Returns the travel (position delta) that occurred during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -576,7 +576,7 @@ Returns the travel (position delta) that occurred during the last call to :ref:` :ref:`Vector3` **get_real_velocity**\ (\ ) |const| :ref:`πŸ”—` -Returns the current real velocity since the last call to :ref:`move_and_slide`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. +Returns the current real velocity since the last call to :ref:`move_and_slide()`. For example, when you climb a slope, you will move diagonally even though the velocity is horizontal. This method returns the diagonal movement, as opposed to :ref:`velocity` which returns the requested velocity. .. rst-class:: classref-item-separator @@ -588,7 +588,7 @@ Returns the current real velocity since the last call to :ref:`move_and_slide` **get_slide_collision**\ (\ slide_idx\: :ref:`int`\ ) :ref:`πŸ”—` -Returns a :ref:`KinematicCollision3D`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide`. Since the body can collide several times in a single call to :ref:`move_and_slide`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count` - 1). +Returns a :ref:`KinematicCollision3D`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide()`. Since the body can collide several times in a single call to :ref:`move_and_slide()`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count()` - 1). .. rst-class:: classref-item-separator @@ -600,7 +600,7 @@ Returns a :ref:`KinematicCollision3D`, which contain :ref:`int` **get_slide_collision_count**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide`. +Returns the number of times the body collided and changed direction during the last call to :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -612,7 +612,7 @@ Returns the number of times the body collided and changed direction during the l :ref:`Vector3` **get_wall_normal**\ (\ ) |const| :ref:`πŸ”—` -Returns the collision normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide` and when :ref:`is_on_wall` returns ``true``. +Returns the collision normal of the wall at the last collision point. Only valid after calling :ref:`move_and_slide()` and when :ref:`is_on_wall()` returns ``true``. \ **Warning:** The collision normal is not always the same as the surface normal. @@ -626,7 +626,7 @@ Returns the collision normal of the wall at the last collision point. Only valid :ref:`bool` **is_on_ceiling**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. +Returns ``true`` if the body collided with the ceiling on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. .. rst-class:: classref-item-separator @@ -638,7 +638,7 @@ Returns ``true`` if the body collided with the ceiling on the last call of :ref: :ref:`bool` **is_on_ceiling_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. +Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "ceiling" or not. .. rst-class:: classref-item-separator @@ -650,7 +650,7 @@ Returns ``true`` if the body collided only with the ceiling on the last call of :ref:`bool` **is_on_floor**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. +Returns ``true`` if the body collided with the floor on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. .. rst-class:: classref-item-separator @@ -662,7 +662,7 @@ Returns ``true`` if the body collided with the floor on the last call of :ref:`m :ref:`bool` **is_on_floor_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with the floor on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. +Returns ``true`` if the body collided only with the floor on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "floor" or not. .. rst-class:: classref-item-separator @@ -674,7 +674,7 @@ Returns ``true`` if the body collided only with the floor on the last call of :r :ref:`bool` **is_on_wall**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. +Returns ``true`` if the body collided with a wall on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. .. rst-class:: classref-item-separator @@ -686,7 +686,7 @@ Returns ``true`` if the body collided with a wall on the last call of :ref:`move :ref:`bool` **is_on_wall_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the body collided only with a wall on the last call of :ref:`move_and_slide`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. +Returns ``true`` if the body collided only with a wall on the last call of :ref:`move_and_slide()`. Otherwise, returns ``false``. The :ref:`up_direction` and :ref:`floor_max_angle` are used to determine whether a surface is "wall" or not. .. rst-class:: classref-item-separator @@ -700,7 +700,7 @@ Returns ``true`` if the body collided only with a wall on the last call of :ref: Moves the body based on :ref:`velocity`. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a **CharacterBody3D** or :ref:`RigidBody3D`, it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. -Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision`, for more detailed information about collisions that occurred, use :ref:`get_slide_collision`. +Modifies :ref:`velocity` if a slide collision occurred. To get the latest collision call :ref:`get_last_slide_collision()`, for more detailed information about collisions that occurred, use :ref:`get_slide_collision()`. When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. diff --git a/classes/class_charfxtransform.rst b/classes/class_charfxtransform.rst index 9f5e4d814eb..b5240112f61 100644 --- a/classes/class_charfxtransform.rst +++ b/classes/class_charfxtransform.rst @@ -143,7 +143,9 @@ For example, the opening BBCode tag ``[example foo=hello bar=true baz=42 color=# - |void| **set_font**\ (\ value\: :ref:`RID`\ ) - :ref:`RID` **get_font**\ (\ ) -Font resource used to render glyph. +:ref:`TextServer` RID of the font used to render glyph, this value can be used with ``TextServer.font_*`` methods to retrieve font information. + +\ **Note:** Read-only. Setting this property won't affect drawing. .. rst-class:: classref-item-separator @@ -160,7 +162,9 @@ Font resource used to render glyph. - |void| **set_glyph_count**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_glyph_count**\ (\ ) -Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster. Setting this property won't affect drawing. +Number of glyphs in the grapheme cluster. This value is set in the first glyph of a cluster. + +\ **Note:** Read-only. Setting this property won't affect drawing. .. rst-class:: classref-item-separator @@ -177,7 +181,9 @@ Number of glyphs in the grapheme cluster. This value is set in the first glyph o - |void| **set_glyph_flags**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_glyph_flags**\ (\ ) -Glyph flags. See :ref:`GraphemeFlag` for more info. Setting this property won't affect drawing. +Glyph flags. See :ref:`GraphemeFlag` for more info. + +\ **Note:** Read-only. Setting this property won't affect drawing. .. rst-class:: classref-item-separator @@ -194,7 +200,7 @@ Glyph flags. See :ref:`GraphemeFlag` for more info - |void| **set_glyph_index**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_glyph_index**\ (\ ) -Font specific glyph index. +Glyph index specific to the :ref:`font`. If you want to replace this glyph, use :ref:`TextServer.font_get_glyph_index()` with :ref:`font` to get a new glyph index for a single character. .. rst-class:: classref-item-separator @@ -228,7 +234,9 @@ The position offset the character will be drawn with (in pixels). - |void| **set_outline**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_outline**\ (\ ) -If ``true``, FX transform is called for outline drawing. Setting this property won't affect drawing. +If ``true``, FX transform is called for outline drawing. + +\ **Note:** Read-only. Setting this property won't affect drawing. .. rst-class:: classref-item-separator @@ -245,7 +253,9 @@ If ``true``, FX transform is called for outline drawing. Setting this property w - |void| **set_range**\ (\ value\: :ref:`Vector2i`\ ) - :ref:`Vector2i` **get_range**\ (\ ) -Absolute character range in the string, corresponding to the glyph. Setting this property won't affect drawing. +Absolute character range in the string, corresponding to the glyph. + +\ **Note:** Read-only. Setting this property won't affect drawing. .. rst-class:: classref-item-separator @@ -262,7 +272,9 @@ Absolute character range in the string, corresponding to the glyph. Setting this - |void| **set_relative_index**\ (\ value\: :ref:`int`\ ) - :ref:`int` **get_relative_index**\ (\ ) -The character offset of the glyph, relative to the current :ref:`RichTextEffect` custom block. Setting this property won't affect drawing. +The character offset of the glyph, relative to the current :ref:`RichTextEffect` custom block. + +\ **Note:** Read-only. Setting this property won't affect drawing. .. rst-class:: classref-item-separator diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index f1f07e62f47..45301830e8f 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -47,25 +47,29 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+-------------------------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`check_v_offset` | ``0`` | - +-----------------------------------+-------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`checked` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`checked_disabled` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`radio_checked` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`radio_checked_disabled` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`radio_unchecked` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`radio_unchecked_disabled` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`unchecked` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`unchecked_disabled` | | - +-----------------------------------+-------------------------------------------------------------------------------------+-------+ + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`checkbox_checked_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`checkbox_unchecked_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`check_v_offset` | ``0`` | + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`checked` | | + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`checked_disabled` | | + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`radio_checked` | | + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`radio_checked_disabled` | | + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`radio_unchecked` | | + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`radio_unchecked_disabled` | | + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`unchecked` | | + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`unchecked_disabled` | | + +-----------------------------------+--------------------------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-section-separator @@ -76,6 +80,30 @@ Theme Properties Theme Property Descriptions --------------------------- +.. _class_CheckBox_theme_color_checkbox_checked_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **checkbox_checked_color** = ``Color(1, 1, 1, 1)`` :ref:`πŸ”—` + +The color of the checked icon when the checkbox is pressed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CheckBox_theme_color_checkbox_unchecked_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **checkbox_unchecked_color** = ``Color(1, 1, 1, 1)`` :ref:`πŸ”—` + +The color of the unchecked icon when the checkbox is not pressed. + +.. rst-class:: classref-item-separator + +---- + .. _class_CheckBox_theme_constant_check_v_offset: .. rst-class:: classref-themeproperty diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst index 3247231a914..86a4b34d252 100644 --- a/classes/class_checkbutton.rst +++ b/classes/class_checkbutton.rst @@ -45,25 +45,29 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ - | :ref:`int` | :ref:`check_v_offset` | ``0`` | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`checked` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`checked_disabled` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`checked_disabled_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`checked_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`unchecked` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`unchecked_disabled` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`unchecked_disabled_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ - | :ref:`Texture2D` | :ref:`unchecked_mirrored` | | - +-----------------------------------+----------------------------------------------------------------------------------------------+-------+ + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`button_checked_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`button_unchecked_color` | ``Color(1, 1, 1, 1)`` | + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`check_v_offset` | ``0`` | + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`checked` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`checked_disabled` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`checked_disabled_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`checked_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`unchecked` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`unchecked_disabled` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`unchecked_disabled_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`unchecked_mirrored` | | + +-----------------------------------+----------------------------------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-section-separator @@ -74,6 +78,30 @@ Theme Properties Theme Property Descriptions --------------------------- +.. _class_CheckButton_theme_color_button_checked_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **button_checked_color** = ``Color(1, 1, 1, 1)`` :ref:`πŸ”—` + +The color of the checked icon when the checkbox is pressed. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CheckButton_theme_color_button_unchecked_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **button_unchecked_color** = ``Color(1, 1, 1, 1)`` :ref:`πŸ”—` + +The color of the unchecked icon when the checkbox is not pressed. + +.. rst-class:: classref-item-separator + +---- + .. _class_CheckButton_theme_constant_check_v_offset: .. rst-class:: classref-themeproperty diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index fe22f5ca677..7c0a316eb1a 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -367,7 +367,7 @@ Returns the ``signal`` data of ``class`` or its ancestry. The returned value is :ref:`Array`\[:ref:`Dictionary`\] **class_get_signal_list**\ (\ class\: :ref:`StringName`, no_inheritance\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Returns an array with all the signals of ``class`` or its ancestry if ``no_inheritance`` is ``false``. Every element of the array is a :ref:`Dictionary` as described in :ref:`class_get_signal`. +Returns an array with all the signals of ``class`` or its ancestry if ``no_inheritance`` is ``false``. Every element of the array is a :ref:`Dictionary` as described in :ref:`class_get_signal()`. .. rst-class:: classref-item-separator diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index 9fd7cea2690..83e0c5b45a9 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -310,7 +310,7 @@ Signals **breakpoint_toggled**\ (\ line\: :ref:`int`\ ) :ref:`πŸ”—` -Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line. +Emitted when a breakpoint is added or removed from a line. If the line is removed via backspace, a signal is emitted at the old line. .. rst-class:: classref-item-separator @@ -322,7 +322,7 @@ Emitted when a breakpoint is added or removed from a line. If the line is moved **code_completion_requested**\ (\ ) :ref:`πŸ”—` -Emitted when the user requests code completion. This signal will not be sent if :ref:`_request_code_completion` is overridden or :ref:`code_completion_enabled` is ``false``. +Emitted when the user requests code completion. This signal will not be sent if :ref:`_request_code_completion()` is overridden or :ref:`code_completion_enabled` is ``false``. .. rst-class:: classref-item-separator @@ -360,7 +360,7 @@ Emitted when the user has clicked on a valid symbol. **symbol_validate**\ (\ symbol\: :ref:`String`\ ) :ref:`πŸ”—` -Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling :ref:`set_symbol_lookup_word_as_valid`. +Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling :ref:`set_symbol_lookup_word_as_valid()`. \ **Note:** :ref:`symbol_lookup_on_click` must be ``true`` for this signal to be emitted. @@ -572,7 +572,7 @@ Sets the brace pairs to be autocompleted. For each entry in the dictionary, the - |void| **set_code_completion_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_code_completion_enabled**\ (\ ) -If ``true``, the :ref:`ProjectSettings.input/ui_text_completion_query` action requests code completion. To handle it, see :ref:`_request_code_completion` or :ref:`code_completion_requested`. +If ``true``, the :ref:`ProjectSettings.input/ui_text_completion_query` action requests code completion. To handle it, see :ref:`_request_code_completion()` or :ref:`code_completion_requested`. .. rst-class:: classref-item-separator @@ -640,7 +640,7 @@ Sets the string delimiters. All existing string delimiters will be removed. - |void| **set_draw_bookmarks_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_bookmarks_gutter**\ (\ ) -If ``true``, bookmarks are drawn in the gutter. This gutter is shared with breakpoints and executing lines. See :ref:`set_line_as_bookmarked`. +If ``true``, bookmarks are drawn in the gutter. This gutter is shared with breakpoints and executing lines. See :ref:`set_line_as_bookmarked()`. .. rst-class:: classref-item-separator @@ -657,7 +657,7 @@ If ``true``, bookmarks are drawn in the gutter. This gutter is shared with break - |void| **set_draw_breakpoints_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_breakpoints_gutter**\ (\ ) -If ``true``, breakpoints are drawn in the gutter. This gutter is shared with bookmarks and executing lines. Clicking the gutter will toggle the breakpoint for the line, see :ref:`set_line_as_breakpoint`. +If ``true``, breakpoints are drawn in the gutter. This gutter is shared with bookmarks and executing lines. Clicking the gutter will toggle the breakpoint for the line, see :ref:`set_line_as_breakpoint()`. .. rst-class:: classref-item-separator @@ -674,7 +674,7 @@ If ``true``, breakpoints are drawn in the gutter. This gutter is shared with boo - |void| **set_draw_executing_lines_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_executing_lines_gutter**\ (\ ) -If ``true``, executing lines are marked in the gutter. This gutter is shared with breakpoints and bookmarks. See :ref:`set_line_as_executing`. +If ``true``, executing lines are marked in the gutter. This gutter is shared with breakpoints and bookmarks. See :ref:`set_line_as_executing()`. .. rst-class:: classref-item-separator @@ -691,7 +691,7 @@ If ``true``, executing lines are marked in the gutter. This gutter is shared wit - |void| **set_draw_fold_gutter**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_drawing_fold_gutter**\ (\ ) -If ``true``, the fold gutter is drawn. In this gutter, the :ref:`can_fold_code_region` icon is drawn for each foldable line (see :ref:`can_fold_line`) and the :ref:`folded_code_region` icon is drawn for each folded line (see :ref:`is_line_folded`). These icons can be clicked to toggle the fold state, see :ref:`toggle_foldable_line`. :ref:`line_folding` must be ``true`` to show icons. +If ``true``, the fold gutter is drawn. In this gutter, the :ref:`can_fold_code_region` icon is drawn for each foldable line (see :ref:`can_fold_line()`) and the :ref:`folded_code_region` icon is drawn for each folded line (see :ref:`is_line_folded()`). These icons can be clicked to toggle the fold state, see :ref:`toggle_foldable_line()`. :ref:`line_folding` must be ``true`` to show icons. .. rst-class:: classref-item-separator @@ -810,7 +810,7 @@ Use spaces instead of tabs for indentation. - |void| **set_line_folding_enabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_line_folding_enabled**\ (\ ) -If ``true``, lines can be folded. Otherwise, line folding methods like :ref:`fold_line` will not work and :ref:`can_fold_line` will always return ``false``. See :ref:`gutters_draw_fold_gutter`. +If ``true``, lines can be folded. Otherwise, line folding methods like :ref:`fold_line()` will not work and :ref:`can_fold_line()` will always return ``false``. See :ref:`gutters_draw_fold_gutter`. .. rst-class:: classref-item-separator @@ -827,7 +827,7 @@ If ``true``, lines can be folded. Otherwise, line folding methods like :ref:`fol - |void| **set_line_length_guidelines**\ (\ value\: :ref:`Array`\[:ref:`int`\]\ ) - :ref:`Array`\[:ref:`int`\] **get_line_length_guidelines**\ (\ ) -Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently. +Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is drawn more prominently. .. rst-class:: classref-item-separator @@ -861,7 +861,7 @@ Set when a validated word from :ref:`symbol_validate`\ ) - :ref:`bool` **is_symbol_tooltip_on_hover_enabled**\ (\ ) -Set when a word is hovered, the :ref:`symbol_hovered` should be emitted. +If ``true``, the :ref:`symbol_hovered` signal is emitted when hovering over a word. .. rst-class:: classref-section-separator @@ -892,7 +892,7 @@ Override this method to define how the selected entry should be inserted. If ``r Override this method to define what items in ``candidates`` should be displayed. -Both ``candidates`` and the return is a :ref:`Array` of :ref:`Dictionary`, see :ref:`get_code_completion_option` for :ref:`Dictionary` content. +Both ``candidates`` and the return is a :ref:`Array` of :ref:`Dictionary`, see :ref:`get_code_completion_option()` for :ref:`Dictionary` content. .. rst-class:: classref-item-separator @@ -930,7 +930,7 @@ Both the start and end keys must be symbols. Only the start key has to be unique |void| **add_code_completion_option**\ (\ type\: :ref:`CodeCompletionKind`, display_text\: :ref:`String`, insert_text\: :ref:`String`, text_color\: :ref:`Color` = Color(1, 1, 1, 1), icon\: :ref:`Resource` = null, value\: :ref:`Variant` = null, location\: :ref:`int` = 1024\ ) :ref:`πŸ”—` -Submits an item to the queue of potential candidates for the autocomplete menu. Call :ref:`update_code_completion_options` to update the list. +Submits an item to the queue of potential candidates for the autocomplete menu. Call :ref:`update_code_completion_options()` to update the list. \ ``location`` indicates location of the option relative to the location of the code completion query. See :ref:`CodeCompletionLocation` for how to set this value. @@ -974,7 +974,7 @@ If ``line_only`` is ``true`` or ``end_key`` is an empty :ref:`String` **can_fold_line**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is foldable. A line is foldable if it is the start of a valid code region (see :ref:`get_code_region_start_tag`), if it is the start of a comment or string block, or if the next non-empty line is more indented (see :ref:`TextEdit.get_indent_level`). +Returns ``true`` if the given line is foldable. A line is foldable if it is the start of a valid code region (see :ref:`get_code_region_start_tag()`), if it is the start of a comment or string block, or if the next non-empty line is more indented (see :ref:`TextEdit.get_indent_level()`). .. rst-class:: classref-item-separator @@ -1084,11 +1084,11 @@ Values of ``-1`` convert the entire text. |void| **create_code_region**\ (\ ) :ref:`πŸ”—` -Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see :ref:`add_comment_delimiter`). +Creates a new code region with the selection. At least one single line comment delimiter have to be defined (see :ref:`add_comment_delimiter()`). A code region is a part of code that is highlighted when folded and can help organize your script. -Code region start and end tags can be customized (see :ref:`set_code_region_tags`). +Code region start and end tags can be customized (see :ref:`set_code_region_tags()`). Code regions are delimited using start and end tags (respectively ``region`` and ``endregion`` by default) preceded by one line comment delimiter. (eg. ``#region`` and ``#endregion``) @@ -1114,7 +1114,7 @@ Deletes all lines that are selected or have a caret on them. |void| **do_indent**\ (\ ) :ref:`πŸ”—` -If there is no selection, indentation is inserted at the caret. Otherwise, the selected lines are indented like :ref:`indent_lines`. Equivalent to the :ref:`ProjectSettings.input/ui_text_indent` action. The indentation characters used depend on :ref:`indent_use_spaces` and :ref:`indent_size`. +If there is no selection, indentation is inserted at the caret. Otherwise, the selected lines are indented like :ref:`indent_lines()`. Equivalent to the :ref:`ProjectSettings.input/ui_text_indent` action. The indentation characters used depend on :ref:`indent_use_spaces` and :ref:`indent_size`. .. rst-class:: classref-item-separator @@ -1150,7 +1150,7 @@ Duplicates all selected text and duplicates all lines with a caret on them. |void| **fold_all_lines**\ (\ ) :ref:`πŸ”—` -Folds all lines that are possible to be folded (see :ref:`can_fold_line`). +Folds all lines that are possible to be folded (see :ref:`can_fold_line()`). .. rst-class:: classref-item-separator @@ -1162,7 +1162,7 @@ Folds all lines that are possible to be folded (see :ref:`can_fold_line`\ ) :ref:`πŸ”—` -Folds the given line, if possible (see :ref:`can_fold_line`). +Folds the given line, if possible (see :ref:`can_fold_line()`). .. rst-class:: classref-item-separator @@ -1234,7 +1234,7 @@ Gets the completion option at ``index``. The return :ref:`Dictionary`\[:ref:`Dictionary`\] **get_code_completion_options**\ (\ ) |const| :ref:`πŸ”—` -Gets all completion options, see :ref:`get_code_completion_option` for return content. +Gets all completion options, see :ref:`get_code_completion_option()` for return content. .. rst-class:: classref-item-separator @@ -1438,7 +1438,7 @@ Returns ``true`` if string ``start_key`` exists. |void| **indent_lines**\ (\ ) :ref:`πŸ”—` -Indents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. See :ref:`unindent_lines`. +Indents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. See :ref:`unindent_lines()`. .. rst-class:: classref-item-separator @@ -1474,7 +1474,7 @@ Returns the delimiter index if ``line`` ``column`` is in a string. If ``column`` :ref:`bool` **is_line_bookmarked**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is bookmarked. See :ref:`set_line_as_bookmarked`. +Returns ``true`` if the given line is bookmarked. See :ref:`set_line_as_bookmarked()`. .. rst-class:: classref-item-separator @@ -1486,7 +1486,7 @@ Returns ``true`` if the given line is bookmarked. See :ref:`set_line_as_bookmark :ref:`bool` **is_line_breakpointed**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is breakpointed. See :ref:`set_line_as_breakpoint`. +Returns ``true`` if the given line is breakpointed. See :ref:`set_line_as_breakpoint()`. .. rst-class:: classref-item-separator @@ -1498,7 +1498,7 @@ Returns ``true`` if the given line is breakpointed. See :ref:`set_line_as_breakp :ref:`bool` **is_line_code_region_end**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is a code region end. See :ref:`set_code_region_tags`. +Returns ``true`` if the given line is a code region end. See :ref:`set_code_region_tags()`. .. rst-class:: classref-item-separator @@ -1510,7 +1510,7 @@ Returns ``true`` if the given line is a code region end. See :ref:`set_code_regi :ref:`bool` **is_line_code_region_start**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is a code region start. See :ref:`set_code_region_tags`. +Returns ``true`` if the given line is a code region start. See :ref:`set_code_region_tags()`. .. rst-class:: classref-item-separator @@ -1522,7 +1522,7 @@ Returns ``true`` if the given line is a code region start. See :ref:`set_code_re :ref:`bool` **is_line_executing**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is marked as executing. See :ref:`set_line_as_executing`. +Returns ``true`` if the given line is marked as executing. See :ref:`set_line_as_executing()`. .. rst-class:: classref-item-separator @@ -1534,7 +1534,7 @@ Returns ``true`` if the given line is marked as executing. See :ref:`set_line_as :ref:`bool` **is_line_folded**\ (\ line\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given line is folded. See :ref:`fold_line`. +Returns ``true`` if the given line is folded. See :ref:`fold_line()`. .. rst-class:: classref-item-separator @@ -1630,7 +1630,7 @@ Sets the code hint text. Pass an empty string to clear. |void| **set_code_hint_draw_below**\ (\ draw_below\: :ref:`bool`\ ) :ref:`πŸ”—` -If ``true``, the code hint will draw below the main caret. If ``false``, the code hint will draw above the main caret. See :ref:`set_code_hint`. +If ``true``, the code hint will draw below the main caret. If ``false``, the code hint will draw above the main caret. See :ref:`set_code_hint()`. .. rst-class:: classref-item-separator @@ -1654,7 +1654,7 @@ Sets the code region start and end tags (without comment delimiter). |void| **set_line_as_bookmarked**\ (\ line\: :ref:`int`, bookmarked\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets the given line as bookmarked. If ``true`` and :ref:`gutters_draw_bookmarks` is ``true``, draws the :ref:`bookmark` icon in the gutter for this line. See :ref:`get_bookmarked_lines` and :ref:`is_line_bookmarked`. +Sets the given line as bookmarked. If ``true`` and :ref:`gutters_draw_bookmarks` is ``true``, draws the :ref:`bookmark` icon in the gutter for this line. See :ref:`get_bookmarked_lines()` and :ref:`is_line_bookmarked()`. .. rst-class:: classref-item-separator @@ -1666,7 +1666,7 @@ Sets the given line as bookmarked. If ``true`` and :ref:`gutters_draw_bookmarks< |void| **set_line_as_breakpoint**\ (\ line\: :ref:`int`, breakpointed\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets the given line as a breakpoint. If ``true`` and :ref:`gutters_draw_breakpoints_gutter` is ``true``, draws the :ref:`breakpoint` icon in the gutter for this line. See :ref:`get_breakpointed_lines` and :ref:`is_line_breakpointed`. +Sets the given line as a breakpoint. If ``true`` and :ref:`gutters_draw_breakpoints_gutter` is ``true``, draws the :ref:`breakpoint` icon in the gutter for this line. See :ref:`get_breakpointed_lines()` and :ref:`is_line_breakpointed()`. .. rst-class:: classref-item-separator @@ -1678,7 +1678,7 @@ Sets the given line as a breakpoint. If ``true`` and :ref:`gutters_draw_breakpoi |void| **set_line_as_executing**\ (\ line\: :ref:`int`, executing\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets the given line as executing. If ``true`` and :ref:`gutters_draw_executing_lines` is ``true``, draws the :ref:`executing_line` icon in the gutter for this line. See :ref:`get_executing_lines` and :ref:`is_line_executing`. +Sets the given line as executing. If ``true`` and :ref:`gutters_draw_executing_lines` is ``true``, draws the :ref:`executing_line` icon in the gutter for this line. See :ref:`get_executing_lines()` and :ref:`is_line_executing()`. .. rst-class:: classref-item-separator @@ -1750,7 +1750,7 @@ Unfolds the given line if it is folded or if it is hidden under a folded line. |void| **unindent_lines**\ (\ ) :ref:`πŸ”—` -Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. Equivalent to the :ref:`ProjectSettings.input/ui_text_dedent` action. See :ref:`indent_lines`. +Unindents all lines that are selected or have a caret on them. Uses spaces or a tab depending on :ref:`indent_use_spaces`. Equivalent to the :ref:`ProjectSettings.input/ui_text_dedent` action. See :ref:`indent_lines()`. .. rst-class:: classref-item-separator @@ -1762,7 +1762,7 @@ Unindents all lines that are selected or have a caret on them. Uses spaces or a |void| **update_code_completion_options**\ (\ force\: :ref:`bool`\ ) :ref:`πŸ”—` -Submits all completion options added with :ref:`add_code_completion_option`. Will try to force the autocomplete menu to popup, if ``force`` is ``true``. +Submits all completion options added with :ref:`add_code_completion_option()`. Will try to force the autocomplete menu to popup, if ``force`` is ``true``. \ **Note:** This will replace all current candidates. diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index 99aef5b6645..5a3606857f8 100644 --- a/classes/class_collisionobject2d.rst +++ b/classes/class_collisionobject2d.rst @@ -128,7 +128,7 @@ Signals **input_event**\ (\ viewport\: :ref:`Node`, event\: :ref:`InputEvent`, shape_idx\: :ref:`int`\ ) :ref:`πŸ”—` -Emitted when an input event occurs. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. See :ref:`_input_event` for details. +Emitted when an input event occurs. Requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. See :ref:`_input_event()` for details. .. rst-class:: classref-item-separator @@ -336,7 +336,7 @@ Method Descriptions Accepts unhandled :ref:`InputEvent`\ s. ``shape_idx`` is the child index of the clicked :ref:`Shape2D`. Connect to :ref:`input_event` to easily pick up these events. -\ **Note:** :ref:`_input_event` requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. +\ **Note:** :ref:`_input_event()` requires :ref:`input_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. .. rst-class:: classref-item-separator diff --git a/classes/class_collisionobject3d.rst b/classes/class_collisionobject3d.rst index 6fc0ad981ef..a9166ac81a5 100644 --- a/classes/class_collisionobject3d.rst +++ b/classes/class_collisionobject3d.rst @@ -319,7 +319,7 @@ Method Descriptions Receives unhandled :ref:`InputEvent`\ s. ``event_position`` is the location in world space of the mouse pointer on the surface of the shape with index ``shape_idx`` and ``normal`` is the normal vector of the surface at that point. Connect to the :ref:`input_event` signal to easily pick up these events. -\ **Note:** :ref:`_input_event` requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. +\ **Note:** :ref:`_input_event()` requires :ref:`input_ray_pickable` to be ``true`` and at least one :ref:`collision_layer` bit to be set. .. rst-class:: classref-item-separator diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index 53510d3dc51..4cde2af1d42 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -21,7 +21,7 @@ Description A node that provides a polygon shape to a :ref:`CollisionObject2D` parent and allows to edit it. The polygon can be concave or convex. This can give a detection shape to an :ref:`Area2D`, turn :ref:`PhysicsBody2D` into a solid object, or give a hollow shape to a :ref:`StaticBody2D`. -\ **Warning:** A non-uniformly scaled :ref:`CollisionShape2D` will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its shape resource instead. +\ **Warning:** A non-uniformly scaled **CollisionPolygon2D** will likely not behave as expected. Make sure to keep its scale the same on all axes and adjust its polygon instead. .. rst-class:: classref-reftable-group diff --git a/classes/class_collisionpolygon3d.rst b/classes/class_collisionpolygon3d.rst index 578f53fe51f..88c9c752d5a 100644 --- a/classes/class_collisionpolygon3d.rst +++ b/classes/class_collisionpolygon3d.rst @@ -31,15 +31,19 @@ Properties .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ - | :ref:`float` | :ref:`depth` | ``1.0`` | - +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ - | :ref:`bool` | :ref:`disabled` | ``false`` | - +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ - | :ref:`float` | :ref:`margin` | ``0.04`` | - +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ - | :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | - +-----------------------------------------------------+-------------------------------------------------------------+--------------------------+ + +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+ + | :ref:`Color` | :ref:`debug_color` | ``Color(0, 0, 0, 0)`` | + +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`debug_fill` | ``true`` | + +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`depth` | ``1.0`` | + +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+ + | :ref:`bool` | :ref:`disabled` | ``false`` | + +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+ + | :ref:`float` | :ref:`margin` | ``0.04`` | + +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+ + | :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array()`` | + +-----------------------------------------------------+-------------------------------------------------------------------+--------------------------+ .. rst-class:: classref-section-separator @@ -50,6 +54,42 @@ Properties Property Descriptions --------------------- +.. _class_CollisionPolygon3D_property_debug_color: + +.. rst-class:: classref-property + +:ref:`Color` **debug_color** = ``Color(0, 0, 0, 0)`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_debug_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_debug_color**\ (\ ) + +The collision shape color that is displayed in the editor, or in the running project if **Debug > Visible Collision Shapes** is checked at the top of the editor. + +\ **Note:** The default value is :ref:`ProjectSettings.debug/shapes/collision/shape_color`. The ``Color(0, 0, 0, 0)`` value documented here is a placeholder, and not the actual default debug color. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CollisionPolygon3D_property_debug_fill: + +.. rst-class:: classref-property + +:ref:`bool` **debug_fill** = ``true`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_enable_debug_fill**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_enable_debug_fill**\ (\ ) + +If ``true``, when the shape is displayed, it will show a solid fill color in addition to its wireframe. + +.. rst-class:: classref-item-separator + +---- + .. _class_CollisionPolygon3D_property_depth: .. rst-class:: classref-property diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index 69abc486149..4335790caa0 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -93,7 +93,7 @@ The collision shape color that is displayed in the editor, or in the running pro - |void| **set_disabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_disabled**\ (\ ) -A disabled collision shape has no effect in the world. This property should be changed with :ref:`Object.set_deferred`. +A disabled collision shape has no effect in the world. This property should be changed with :ref:`Object.set_deferred()`. .. rst-class:: classref-item-separator diff --git a/classes/class_color.rst b/classes/class_color.rst index 09fbc3e1caf..487cfb3cab6 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -19,7 +19,9 @@ Description A color represented in RGBA format by a red (:ref:`r`), green (:ref:`g`), blue (:ref:`b`), and alpha (:ref:`a`) component. Each component is a 32-bit floating-point value, usually ranging from ``0.0`` to ``1.0``. Some properties (such as :ref:`CanvasItem.modulate`) may support values greater than ``1.0``, for overbright or HDR (High Dynamic Range) colors. -Colors can be created in various ways: By the various **Color** constructors, by static methods such as :ref:`from_hsv`, and by using a name from the set of standardized colors based on `X11 color names `__ with the addition of :ref:`TRANSPARENT`. GDScript also provides :ref:`@GDScript.Color8`, which uses integers from ``0`` to ``255`` and doesn't support overbright colors. +Colors can be created in various ways: By the various **Color** constructors, by static methods such as :ref:`from_hsv()`, and by using a name from the set of standardized colors based on `X11 color names `__ with the addition of :ref:`TRANSPARENT`. GDScript also provides :ref:`@GDScript.Color8()`, which uses integers from ``0`` to ``255`` and doesn't support overbright colors. + +Color data may be stored in many color spaces and encodings. The :ref:`srgb_to_linear()` and :ref:`linear_to_srgb()` methods can convert between nonlinear sRGB encoding and linear RGB encoding. \ **Note:** In a boolean context, a Color will evaluate to ``false`` if it is equal to ``Color(0, 0, 0, 1)`` (opaque black). Otherwise, a Color will always evaluate to ``true``. @@ -121,6 +123,8 @@ Methods +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`from_ok_hsl`\ (\ h\: :ref:`float`, s\: :ref:`float`, l\: :ref:`float`, alpha\: :ref:`float` = 1.0\ ) |static| | +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`from_rgba8`\ (\ r8\: :ref:`int`, g8\: :ref:`int`, b8\: :ref:`int`, a8\: :ref:`int` = 255\ ) |static| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`from_rgbe9995`\ (\ rgbe\: :ref:`int`\ ) |static| | +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`from_string`\ (\ str\: :ref:`String`, default\: :ref:`Color`\ ) |static| | @@ -1392,6 +1396,8 @@ Property Descriptions The color's alpha component, typically on the range of 0 to 1. A value of 0 means that the color is fully transparent. A value of 1 means that the color is fully opaque. +\ **Note:** The alpha channel is always stored with linear encoding, regardless of the color space of the other color channels. The :ref:`linear_to_srgb()` and :ref:`srgb_to_linear()` methods do not affect the alpha channel. + .. rst-class:: classref-item-separator ---- @@ -1710,7 +1716,7 @@ Returns a new color resulting from overlaying this color over the given color. I :ref:`Color` **clamp**\ (\ min\: :ref:`Color` = Color(0, 0, 0, 0), max\: :ref:`Color` = Color(1, 1, 1, 1)\ ) |const| :ref:`πŸ”—` -Returns a new color with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp` on each component. +Returns a new color with all components clamped between the components of ``min`` and ``max``, by running :ref:`@GlobalScope.clamp()` on each component. .. rst-class:: classref-item-separator @@ -1722,7 +1728,7 @@ Returns a new color with all components clamped between the components of ``min` :ref:`Color` **darkened**\ (\ amount\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a new color resulting from making this color darker by the specified ``amount`` (ratio from 0.0 to 1.0). See also :ref:`lightened`. +Returns a new color resulting from making this color darker by the specified ``amount`` (ratio from 0.0 to 1.0). See also :ref:`lightened()`. .. tabs:: @@ -1789,6 +1795,26 @@ Constructs a color from an `OK HSL profile ` **from_rgba8**\ (\ r8\: :ref:`int`, g8\: :ref:`int`, b8\: :ref:`int`, a8\: :ref:`int` = 255\ ) |static| :ref:`πŸ”—` + +Returns a **Color** constructed from red (``r8``), green (``g8``), blue (``b8``), and optionally alpha (``a8``) integer channels, each divided by ``255.0`` for their final value. + +:: + + var red = Color.from_rgba8(255, 0, 0) # Same as Color(1, 0, 0). + var dark_blue = Color.from_rgba8(0, 0, 51) # Same as Color(0, 0, 0.2). + var my_color = Color.from_rgba8(306, 255, 0, 102) # Same as Color(1.2, 1, 0, 0.4). + +\ **Note:** Due to the lower precision of :ref:`from_rgba8()` compared to the standard **Color** constructor, a color created with :ref:`from_rgba8()` will generally not be equal to the same color created with the standard **Color** constructor. Use :ref:`is_equal_approx()` for comparisons to avoid issues with floating-point precision error. + .. rst-class:: classref-item-separator ---- @@ -1827,7 +1853,7 @@ If you want to create a color from String in a constant expression, use the equi Returns the light intensity of the color, as a value between 0.0 and 1.0 (inclusive). This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark. -\ **Note:** :ref:`get_luminance` relies on the color being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use :ref:`srgb_to_linear` to convert it to the linear color space first. +\ **Note:** :ref:`get_luminance()` relies on the color being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use :ref:`srgb_to_linear()` to convert it to the linear color space first. .. rst-class:: classref-item-separator @@ -1839,7 +1865,7 @@ Returns the light intensity of the color, as a value between 0.0 and 1.0 (inclus :ref:`Color` **hex**\ (\ hex\: :ref:`int`\ ) |static| :ref:`πŸ”—` -Returns the **Color** associated with the provided ``hex`` integer in 32-bit RGBA format (8 bits per channel). This method is the inverse of :ref:`to_rgba32`. +Returns the **Color** associated with the provided ``hex`` integer in 32-bit RGBA format (8 bits per channel). This method is the inverse of :ref:`to_rgba32()`. In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix, making it ``"0xRRGGBBAA"``). @@ -1872,7 +1898,7 @@ If you want to use hex notation in a constant expression, use the equivalent con :ref:`Color` **hex64**\ (\ hex\: :ref:`int`\ ) |static| :ref:`πŸ”—` -Returns the **Color** associated with the provided ``hex`` integer in 64-bit RGBA format (16 bits per channel). This method is the inverse of :ref:`to_rgba64`. +Returns the **Color** associated with the provided ``hex`` integer in 64-bit RGBA format (16 bits per channel). This method is the inverse of :ref:`to_rgba64()`. In GDScript and C#, the :ref:`int` is best visualized with hexadecimal notation (``"0x"`` prefix, making it ``"0xRRRRGGGGBBBBAAAA"``). @@ -1917,7 +1943,7 @@ Returns a new color from ``rgba``, an HTML hexadecimal color string. ``rgba`` is :ref:`bool` **html_is_valid**\ (\ color\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The string must be a hexadecimal value (case-insensitive) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). This method is identical to :ref:`String.is_valid_html_color`. +Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The string must be a hexadecimal value (case-insensitive) of either 3, 4, 6 or 8 digits, and may be prefixed by a hash sign (``#``). This method is identical to :ref:`String.is_valid_html_color()`. .. tabs:: @@ -1983,7 +2009,7 @@ Returns the color with its :ref:`r`, :ref:`g` **is_equal_approx**\ (\ to\: :ref:`Color`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if this color and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx` on each component. +Returns ``true`` if this color and ``to`` are approximately equal, by running :ref:`@GlobalScope.is_equal_approx()` on each component. .. rst-class:: classref-item-separator @@ -1995,7 +2021,7 @@ Returns ``true`` if this color and ``to`` are approximately equal, by running :r :ref:`Color` **lerp**\ (\ to\: :ref:`Color`, weight\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns the linear interpolation between this color's components and ``to``'s components. The interpolation factor ``weight`` should be between 0.0 and 1.0 (inclusive). See also :ref:`@GlobalScope.lerp`. +Returns the linear interpolation between this color's components and ``to``'s components. The interpolation factor ``weight`` should be between 0.0 and 1.0 (inclusive). See also :ref:`@GlobalScope.lerp()`. .. tabs:: @@ -2030,7 +2056,7 @@ Returns the linear interpolation between this color's components and ``to``'s co :ref:`Color` **lightened**\ (\ amount\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns a new color resulting from making this color lighter by the specified ``amount``, which should be a ratio from 0.0 to 1.0. See also :ref:`darkened`. +Returns a new color resulting from making this color lighter by the specified ``amount``, which should be a ratio from 0.0 to 1.0. See also :ref:`darkened()`. .. tabs:: @@ -2057,7 +2083,9 @@ Returns a new color resulting from making this color lighter by the specified `` :ref:`Color` **linear_to_srgb**\ (\ ) |const| :ref:`πŸ”—` -Returns the color converted to the `sRGB `__ color space. This method assumes the original color is in the linear color space. See also :ref:`srgb_to_linear` which performs the opposite operation. +Returns the color converted to the `sRGB `__ color space. This method assumes the original color is in the linear color space. See also :ref:`srgb_to_linear()` which performs the opposite operation. + +\ **Note:** The color's :ref:`a`\ lpha channel is not affected. The alpha channel is always stored with linear encoding, regardless of the color space of the other color channels. .. rst-class:: classref-item-separator @@ -2069,7 +2097,9 @@ Returns the color converted to the `sRGB `__ :ref:`Color` **srgb_to_linear**\ (\ ) |const| :ref:`πŸ”—` -Returns the color converted to the linear color space. This method assumes the original color already is in the sRGB color space. See also :ref:`linear_to_srgb` which performs the opposite operation. +Returns the color converted to the linear color space. This method assumes the original color already is in the sRGB color space. See also :ref:`linear_to_srgb()` which performs the opposite operation. + +\ **Note:** The color's :ref:`a`\ lpha channel is not affected. The alpha channel is always stored with linear encoding, regardless of the color space of the other color channels. .. rst-class:: classref-item-separator @@ -2220,7 +2250,7 @@ Setting ``with_alpha`` to ``false``, excludes alpha from the hexadecimal string, :ref:`int` **to_rgba32**\ (\ ) |const| :ref:`πŸ”—` -Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Redot's default format. This method is the inverse of :ref:`hex`. +Returns the color converted to a 32-bit integer in RGBA format (each component is 8 bits). RGBA is Redot's default format. This method is the inverse of :ref:`hex()`. .. tabs:: @@ -2247,7 +2277,7 @@ Returns the color converted to a 32-bit integer in RGBA format (each component i :ref:`int` **to_rgba64**\ (\ ) |const| :ref:`πŸ”—` -Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Redot's default format. This method is the inverse of :ref:`hex64`. +Returns the color converted to a 64-bit integer in RGBA format (each component is 16 bits). RGBA is Redot's default format. This method is the inverse of :ref:`hex64()`. .. tabs:: @@ -2281,7 +2311,7 @@ Operator Descriptions Returns ``true`` if the colors are not exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -2391,7 +2421,7 @@ Divides each component of the **Color** by the given :ref:`int`. Returns ``true`` if the colors are exactly equal. -\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx` instead, which is more reliable. +\ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. rst-class:: classref-item-separator @@ -2427,7 +2457,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, :ref:`Color` **operator unary-**\ (\ ) :ref:`πŸ”—` -Inverts the given color. This is equivalent to ``Color.WHITE - c`` or ``Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)``. Unlike with :ref:`inverted`, the :ref:`a` component is inverted, too. +Inverts the given color. This is equivalent to ``Color.WHITE - c`` or ``Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)``. Unlike with :ref:`inverted()`, the :ref:`a` component is inverted, too. .. |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_colorpicker.rst b/classes/class_colorpicker.rst index 56c8d995a2e..ea89a932f7e 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -96,51 +96,59 @@ Theme Properties .. table:: :widths: auto - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`center_slider_grabbers` | ``1`` | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`h_width` | ``30`` | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`label_width` | ``10`` | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`margin` | ``4`` | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`sv_height` | ``256`` | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`int` | :ref:`sv_width` | ``256`` | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`add_preset` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`bar_arrow` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`color_hue` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`color_okhsl_hue` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`expanded_arrow` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`folded_arrow` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`menu_option` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`overbright_indicator` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`picker_cursor` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`sample_bg` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`sample_revert` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`screen_picker` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`shape_circle` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`shape_rect` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`shape_rect_wheel` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ - | :ref:`Texture2D` | :ref:`wheel_picker_cursor` | | - +-----------------------------------+----------------------------------------------------------------------------------------+---------+ + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Color` | :ref:`focused_not_editing_cursor_color` | ``Color(1, 1, 1, 0.275)`` | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`int` | :ref:`center_slider_grabbers` | ``1`` | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`int` | :ref:`h_width` | ``30`` | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`int` | :ref:`label_width` | ``10`` | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`int` | :ref:`margin` | ``4`` | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`int` | :ref:`sv_height` | ``256`` | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`int` | :ref:`sv_width` | ``256`` | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`add_preset` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`bar_arrow` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`color_hue` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`expanded_arrow` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`folded_arrow` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`menu_option` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`overbright_indicator` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`picker_cursor` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`picker_cursor_bg` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`sample_bg` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`sample_revert` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`screen_picker` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`shape_circle` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`shape_rect` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`shape_rect_wheel` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`Texture2D` | :ref:`wheel_picker_cursor` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`StyleBox` | :ref:`picker_focus_circle` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`StyleBox` | :ref:`picker_focus_rectangle` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :ref:`StyleBox` | :ref:`sample_focus` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ .. rst-class:: classref-section-separator @@ -600,6 +608,18 @@ Returns the list of colors in the recent presets of the color picker. Theme Property Descriptions --------------------------- +.. _class_ColorPicker_theme_color_focused_not_editing_cursor_color: + +.. rst-class:: classref-themeproperty + +:ref:`Color` **focused_not_editing_cursor_color** = ``Color(1, 1, 1, 0.275)`` :ref:`πŸ”—` + +Color of rectangle or circle drawn when a picker shape part is focused but not editable via keyboard or joypad. Displayed *over* the picker shape, so a partially transparent color should be used to ensure the picker shape remains visible. + +.. rst-class:: classref-item-separator + +---- + .. _class_ColorPicker_theme_constant_center_slider_grabbers: .. rst-class:: classref-themeproperty @@ -708,18 +728,6 @@ Custom texture for the hue selection slider on the right. ---- -.. _class_ColorPicker_theme_icon_color_okhsl_hue: - -.. rst-class:: classref-themeproperty - -:ref:`Texture2D` **color_okhsl_hue** :ref:`πŸ”—` - -Custom texture for the H slider in the OKHSL color mode. - -.. rst-class:: classref-item-separator - ----- - .. _class_ColorPicker_theme_icon_expanded_arrow: .. rst-class:: classref-themeproperty @@ -780,6 +788,18 @@ The image displayed over the color box/circle (depending on the :ref:`picker_sha ---- +.. _class_ColorPicker_theme_icon_picker_cursor_bg: + +.. rst-class:: classref-themeproperty + +:ref:`Texture2D` **picker_cursor_bg** :ref:`πŸ”—` + +The fill image displayed behind the picker cursor. + +.. rst-class:: classref-item-separator + +---- + .. _class_ColorPicker_theme_icon_sample_bg: .. rst-class:: classref-themeproperty @@ -860,6 +880,42 @@ The icon for rectangular wheel picker shapes. The image displayed over the color wheel (depending on the :ref:`picker_shape` being :ref:`SHAPE_HSV_WHEEL`), marking the currently selected hue. This icon is rotated from the right side of the wheel. +.. rst-class:: classref-item-separator + +---- + +.. _class_ColorPicker_theme_style_picker_focus_circle: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **picker_focus_circle** :ref:`πŸ”—` + +The :ref:`StyleBox` used when the circle-shaped part of the picker is focused. Displayed *over* the picker shape, so a partially transparent :ref:`StyleBox` should be used to ensure the picker shape remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ColorPicker_theme_style_picker_focus_rectangle: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **picker_focus_rectangle** :ref:`πŸ”—` + +The :ref:`StyleBox` used when the rectangle-shaped part of the picker is focused. Displayed *over* the picker shape, so a partially transparent :ref:`StyleBox` should be used to ensure the picker shape remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ColorPicker_theme_style_sample_focus: + +.. rst-class:: classref-themeproperty + +:ref:`StyleBox` **sample_focus** :ref:`πŸ”—` + +The :ref:`StyleBox` used for the old color sample part when it is focused. Displayed *over* the sample, so a partially transparent :ref:`StyleBox` should be used to ensure the picker shape remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. + .. |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_compositoreffect.rst b/classes/class_compositoreffect.rst index d0191447b80..91aaef8e3b1 100644 --- a/classes/class_compositoreffect.rst +++ b/classes/class_compositoreffect.rst @@ -151,7 +151,7 @@ Property Descriptions If ``true`` and MSAA is enabled, this will trigger a color buffer resolve before the effect is run. -\ **Note:** In :ref:`_render_callback`, to access the resolved buffer use: +\ **Note:** In :ref:`_render_callback()`, to access the resolved buffer use: :: @@ -175,7 +175,7 @@ If ``true`` and MSAA is enabled, this will trigger a color buffer resolve before If ``true`` and MSAA is enabled, this will trigger a depth buffer resolve before the effect is run. -\ **Note:** In :ref:`_render_callback`, to access the resolved buffer use: +\ **Note:** In :ref:`_render_callback()`, to access the resolved buffer use: :: @@ -233,7 +233,7 @@ If ``true`` this rendering effect is applied to any viewport it is added to. If ``true`` this triggers motion vectors being calculated during the opaque render state. -\ **Note:** In :ref:`_render_callback`, to access the motion vector buffer use: +\ **Note:** In :ref:`_render_callback()`, to access the motion vector buffer use: :: @@ -257,7 +257,7 @@ If ``true`` this triggers motion vectors being calculated during the opaque rend If ``true`` this triggers normal and roughness data to be output during our depth pre-pass, only applicable for the Forward+ renderer. -\ **Note:** In :ref:`_render_callback`, to access the roughness buffer use: +\ **Note:** In :ref:`_render_callback()`, to access the roughness buffer use: :: diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index 775b2b149fc..6823dd40db0 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -114,7 +114,7 @@ This example shows how the above file could be loaded: -Any operation that mutates the ConfigFile such as :ref:`set_value`, :ref:`clear`, or :ref:`erase_section`, only changes what is loaded in memory. If you want to write the change to a file, you have to save the changes with :ref:`save`, :ref:`save_encrypted`, or :ref:`save_encrypted_pass`. +Any operation that mutates the ConfigFile such as :ref:`set_value()`, :ref:`clear()`, or :ref:`erase_section()`, only changes what is loaded in memory. If you want to write the change to a file, you have to save the changes with :ref:`save()`, :ref:`save_encrypted()`, or :ref:`save_encrypted_pass()`. Keep in mind that section and property names can't contain spaces. Anything after a space will be ignored on save and on load. diff --git a/classes/class_confirmationdialog.rst b/classes/class_confirmationdialog.rst index 07d76d6ee8c..f6a4656e488 100644 --- a/classes/class_confirmationdialog.rst +++ b/classes/class_confirmationdialog.rst @@ -88,7 +88,7 @@ Property Descriptions - |void| **set_cancel_button_text**\ (\ value\: :ref:`String`\ ) - :ref:`String` **get_cancel_button_text**\ (\ ) -The text displayed by the cancel button (see :ref:`get_cancel_button`). +The text displayed by the cancel button (see :ref:`get_cancel_button()`). .. rst-class:: classref-section-separator diff --git a/classes/class_container.rst b/classes/class_container.rst index cc63da1412a..c5617dbfec2 100644 --- a/classes/class_container.rst +++ b/classes/class_container.rst @@ -12,7 +12,7 @@ Container **Inherits:** :ref:`Control` **<** :ref:`CanvasItem` **<** :ref:`Node` **<** :ref:`Object` -**Inherited By:** :ref:`AspectRatioContainer`, :ref:`BoxContainer`, :ref:`CenterContainer`, :ref:`EditorProperty`, :ref:`FlowContainer`, :ref:`GraphElement`, :ref:`GridContainer`, :ref:`MarginContainer`, :ref:`PanelContainer`, :ref:`ScrollContainer`, :ref:`SplitContainer`, :ref:`SubViewportContainer`, :ref:`TabContainer` +**Inherited By:** :ref:`AspectRatioContainer`, :ref:`BoxContainer`, :ref:`CenterContainer`, :ref:`EditorProperty`, :ref:`FlowContainer`, :ref:`FoldableContainer`, :ref:`GraphElement`, :ref:`GridContainer`, :ref:`MarginContainer`, :ref:`PanelContainer`, :ref:`ScrollContainer`, :ref:`SplitContainer`, :ref:`SubViewportContainer`, :ref:`TabContainer` Base class for all GUI containers. diff --git a/classes/class_control.rst b/classes/class_control.rst index 3f4f20b3ba4..d0d28719098 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -31,17 +31,17 @@ For more information on Redot's UI system, anchors, offsets, and containers, see Redot propagates input events via viewports. Each :ref:`Viewport` is responsible for propagating :ref:`InputEvent`\ s to their child nodes. As the :ref:`SceneTree.root` is a :ref:`Window`, this already happens automatically for all UI elements in your game. -Input events are propagated through the :ref:`SceneTree` from the root node to all child nodes by calling :ref:`Node._input`. For UI elements specifically, it makes more sense to override the virtual method :ref:`_gui_input`, which filters out unrelated input events, such as by checking z-order, :ref:`mouse_filter`, focus, or if the event was inside of the control's bounding box. +Input events are propagated through the :ref:`SceneTree` from the root node to all child nodes by calling :ref:`Node._input()`. For UI elements specifically, it makes more sense to override the virtual method :ref:`_gui_input()`, which filters out unrelated input events, such as by checking z-order, :ref:`mouse_filter`, focus, or if the event was inside of the control's bounding box. -Call :ref:`accept_event` so no other node receives the event. Once you accept an input, it becomes handled so :ref:`Node._unhandled_input` will not process it. +Call :ref:`accept_event()` so no other node receives the event. Once you accept an input, it becomes handled so :ref:`Node._unhandled_input()` will not process it. -Only one **Control** node can be in focus. Only the node in focus will receive events. To get the focus, call :ref:`grab_focus`. **Control** nodes lose focus when another node grabs it, or if you hide the node in focus. +Only one **Control** node can be in focus. Only the node in focus will receive events. To get the focus, call :ref:`grab_focus()`. **Control** nodes lose focus when another node grabs it, or if you hide the node in focus. Sets :ref:`mouse_filter` to :ref:`MOUSE_FILTER_IGNORE` to tell a **Control** node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. -\ :ref:`Theme` resources change the control's appearance. The :ref:`theme` of a **Control** node affects all of its direct and indirect children (as long as a chain of controls is uninterrupted). To override some of the theme items, call one of the ``add_theme_*_override`` methods, like :ref:`add_theme_font_override`. You can also override theme items in the Inspector. +\ :ref:`Theme` resources change the control's appearance. The :ref:`theme` of a **Control** node affects all of its direct and indirect children (as long as a chain of controls is uninterrupted). To override some of the theme items, call one of the ``add_theme_*_override`` methods, like :ref:`add_theme_font_override()`. You can also override theme items in the Inspector. -\ **Note:** Theme items are *not* :ref:`Object` properties. This means you can't access their values using :ref:`Object.get` and :ref:`Object.set`. Instead, use the ``get_theme_*`` and ``add_theme_*_override`` methods provided by this class. +\ **Note:** Theme items are *not* :ref:`Object` properties. This means you can't access their values using :ref:`Object.get()` and :ref:`Object.set()`. Instead, use the ``get_theme_*`` and ``add_theme_*_override`` methods provided by this class. .. rst-class:: classref-introduction-group @@ -81,6 +81,8 @@ Properties +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`custom_minimum_size` | ``Vector2(0, 0)`` | +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`FocusBehaviorRecursive` | :ref:`focus_behavior_recursive` | ``0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`FocusMode` | :ref:`focus_mode` | ``0`` | +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`focus_neighbor_bottom` | ``NodePath("")`` | @@ -105,6 +107,8 @@ Properties +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`localize_numeral_system` | ``true`` | +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`MouseBehaviorRecursive` | :ref:`mouse_behavior_recursive` | ``0`` | + +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`CursorShape` | :ref:`mouse_default_cursor_shape` | ``0`` | +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ | :ref:`MouseFilter` | :ref:`mouse_filter` | ``0`` | @@ -158,6 +162,8 @@ Methods .. table:: :widths: auto + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_accessibility_get_contextual_info`\ (\ ) |virtual| |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_can_drop_data`\ (\ at_position\: :ref:`Vector2`, data\: :ref:`Variant`\ ) |virtual| |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -179,6 +185,10 @@ Methods +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`accept_event`\ (\ ) | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_drag`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_drop`\ (\ ) | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_theme_color_override`\ (\ name\: :ref:`StringName`, color\: :ref:`Color`\ ) | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_theme_constant_override`\ (\ name\: :ref:`StringName`, constant\: :ref:`int`\ ) | @@ -213,12 +223,16 @@ Methods +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_end`\ (\ ) |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FocusMode` | :ref:`get_focus_mode_with_override`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`NodePath` | :ref:`get_focus_neighbor`\ (\ side\: :ref:`Side`\ ) |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Rect2` | :ref:`get_global_rect`\ (\ ) |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_minimum_size`\ (\ ) |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MouseFilter` | :ref:`get_mouse_filter_with_override`\ (\ ) |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_offset`\ (\ offset\: :ref:`Side`\ ) |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_parent_area_size`\ (\ ) |const| | @@ -496,6 +510,82 @@ The node can only grab focus on mouse clicks. Use with :ref:`focus_mode`. +.. _class_Control_constant_FOCUS_ACCESSIBILITY: + +.. rst-class:: classref-enumeration-constant + +:ref:`FocusMode` **FOCUS_ACCESSIBILITY** = ``3`` + +The node can grab focus only when screen reader is active. Use with :ref:`focus_mode`. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_Control_FocusBehaviorRecursive: + +.. rst-class:: classref-enumeration + +enum **FocusBehaviorRecursive**: :ref:`πŸ”—` + +.. _class_Control_constant_FOCUS_BEHAVIOR_INHERITED: + +.. rst-class:: classref-enumeration-constant + +:ref:`FocusBehaviorRecursive` **FOCUS_BEHAVIOR_INHERITED** = ``0`` + +Inherits the :ref:`focus_behavior_recursive` from the parent control. If there is no parent control, this is the same as :ref:`FOCUS_BEHAVIOR_ENABLED`. + +.. _class_Control_constant_FOCUS_BEHAVIOR_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`FocusBehaviorRecursive` **FOCUS_BEHAVIOR_DISABLED** = ``1`` + +Prevents the control from getting focused. :ref:`get_focus_mode_with_override()` will return :ref:`FOCUS_NONE`. + +.. _class_Control_constant_FOCUS_BEHAVIOR_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`FocusBehaviorRecursive` **FOCUS_BEHAVIOR_ENABLED** = ``2`` + +Allows the control to be focused, depending on the :ref:`focus_mode`. This can be used to ignore the parent's :ref:`focus_behavior_recursive`. :ref:`get_focus_mode_with_override()` will return the :ref:`focus_mode`. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_Control_MouseBehaviorRecursive: + +.. rst-class:: classref-enumeration + +enum **MouseBehaviorRecursive**: :ref:`πŸ”—` + +.. _class_Control_constant_MOUSE_BEHAVIOR_INHERITED: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseBehaviorRecursive` **MOUSE_BEHAVIOR_INHERITED** = ``0`` + +Inherits the :ref:`mouse_behavior_recursive` from the parent control. If there is no parent control, this is the same as :ref:`MOUSE_BEHAVIOR_ENABLED`. + +.. _class_Control_constant_MOUSE_BEHAVIOR_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseBehaviorRecursive` **MOUSE_BEHAVIOR_DISABLED** = ``1`` + +Prevents the control from receiving mouse input. :ref:`get_mouse_filter_with_override()` will return :ref:`MOUSE_FILTER_IGNORE`. + +.. _class_Control_constant_MOUSE_BEHAVIOR_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseBehaviorRecursive` **MOUSE_BEHAVIOR_ENABLED** = ``2`` + +Allows the control to be receive mouse input, depending on the :ref:`mouse_filter`. This can be used to ignore the parent's :ref:`mouse_behavior_recursive`. :ref:`get_mouse_filter_with_override()` will return the :ref:`mouse_filter`. + .. rst-class:: classref-item-separator ---- @@ -658,7 +748,7 @@ enum **LayoutPreset**: :ref:`πŸ”—` :ref:`LayoutPreset` **PRESET_TOP_LEFT** = ``0`` -Snap all 4 anchors to the top-left of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the top-left of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_TOP_RIGHT: @@ -666,7 +756,7 @@ Snap all 4 anchors to the top-left of the parent control's bounds. Use with :ref :ref:`LayoutPreset` **PRESET_TOP_RIGHT** = ``1`` -Snap all 4 anchors to the top-right of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the top-right of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_BOTTOM_LEFT: @@ -674,7 +764,7 @@ Snap all 4 anchors to the top-right of the parent control's bounds. Use with :re :ref:`LayoutPreset` **PRESET_BOTTOM_LEFT** = ``2`` -Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_BOTTOM_RIGHT: @@ -682,7 +772,7 @@ Snap all 4 anchors to the bottom-left of the parent control's bounds. Use with : :ref:`LayoutPreset` **PRESET_BOTTOM_RIGHT** = ``3`` -Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_CENTER_LEFT: @@ -690,7 +780,7 @@ Snap all 4 anchors to the bottom-right of the parent control's bounds. Use with :ref:`LayoutPreset` **PRESET_CENTER_LEFT** = ``4`` -Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the center of the left edge of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_CENTER_TOP: @@ -698,7 +788,7 @@ Snap all 4 anchors to the center of the left edge of the parent control's bounds :ref:`LayoutPreset` **PRESET_CENTER_TOP** = ``5`` -Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the center of the top edge of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_CENTER_RIGHT: @@ -706,7 +796,7 @@ Snap all 4 anchors to the center of the top edge of the parent control's bounds. :ref:`LayoutPreset` **PRESET_CENTER_RIGHT** = ``6`` -Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the center of the right edge of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_CENTER_BOTTOM: @@ -714,7 +804,7 @@ Snap all 4 anchors to the center of the right edge of the parent control's bound :ref:`LayoutPreset` **PRESET_CENTER_BOTTOM** = ``7`` -Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the center of the bottom edge of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_CENTER: @@ -722,7 +812,7 @@ Snap all 4 anchors to the center of the bottom edge of the parent control's boun :ref:`LayoutPreset` **PRESET_CENTER** = ``8`` -Snap all 4 anchors to the center of the parent control's bounds. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the center of the parent control's bounds. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_LEFT_WIDE: @@ -730,7 +820,7 @@ Snap all 4 anchors to the center of the parent control's bounds. Use with :ref:` :ref:`LayoutPreset` **PRESET_LEFT_WIDE** = ``9`` -Snap all 4 anchors to the left edge of the parent control. The left offset becomes relative to the left edge and the top offset relative to the top left corner of the node's parent. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the left edge of the parent control. The left offset becomes relative to the left edge and the top offset relative to the top left corner of the node's parent. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_TOP_WIDE: @@ -738,7 +828,7 @@ Snap all 4 anchors to the left edge of the parent control. The left offset becom :ref:`LayoutPreset` **PRESET_TOP_WIDE** = ``10`` -Snap all 4 anchors to the top edge of the parent control. The left offset becomes relative to the top left corner, the top offset relative to the top edge, and the right offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the top edge of the parent control. The left offset becomes relative to the top left corner, the top offset relative to the top edge, and the right offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_RIGHT_WIDE: @@ -746,7 +836,7 @@ Snap all 4 anchors to the top edge of the parent control. The left offset become :ref:`LayoutPreset` **PRESET_RIGHT_WIDE** = ``11`` -Snap all 4 anchors to the right edge of the parent control. The right offset becomes relative to the right edge and the top offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the right edge of the parent control. The right offset becomes relative to the right edge and the top offset relative to the top right corner of the node's parent. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_BOTTOM_WIDE: @@ -754,7 +844,7 @@ Snap all 4 anchors to the right edge of the parent control. The right offset bec :ref:`LayoutPreset` **PRESET_BOTTOM_WIDE** = ``12`` -Snap all 4 anchors to the bottom edge of the parent control. The left offset becomes relative to the bottom left corner, the bottom offset relative to the bottom edge, and the right offset relative to the bottom right corner of the node's parent. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the bottom edge of the parent control. The left offset becomes relative to the bottom left corner, the bottom offset relative to the bottom edge, and the right offset relative to the bottom right corner of the node's parent. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_VCENTER_WIDE: @@ -762,7 +852,7 @@ Snap all 4 anchors to the bottom edge of the parent control. The left offset bec :ref:`LayoutPreset` **PRESET_VCENTER_WIDE** = ``13`` -Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to a vertical line that cuts the parent control in half. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_HCENTER_WIDE: @@ -770,7 +860,7 @@ Snap all 4 anchors to a vertical line that cuts the parent control in half. Use :ref:`LayoutPreset` **PRESET_HCENTER_WIDE** = ``14`` -Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to a horizontal line that cuts the parent control in half. Use with :ref:`set_anchors_preset()`. .. _class_Control_constant_PRESET_FULL_RECT: @@ -778,7 +868,7 @@ Snap all 4 anchors to a horizontal line that cuts the parent control in half. Us :ref:`LayoutPreset` **PRESET_FULL_RECT** = ``15`` -Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the **Control** will fit its parent control. Use with :ref:`set_anchors_preset`. +Snap all 4 anchors to the respective corners of the parent control. Set all 4 offsets to 0 after you applied this preset and the **Control** will fit its parent control. Use with :ref:`set_anchors_preset()`. .. rst-class:: classref-item-separator @@ -898,7 +988,7 @@ enum **MouseFilter**: :ref:`πŸ”—` :ref:`MouseFilter` **MOUSE_FILTER_STOP** = ``0`` -The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. The control will also receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. +The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input()`. The control will also receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. .. _class_Control_constant_MOUSE_FILTER_PASS: @@ -906,9 +996,9 @@ The control will receive mouse movement input events and mouse button input even :ref:`MouseFilter` **MOUSE_FILTER_PASS** = ``1`` -The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input`. The control will also receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. +The control will receive mouse movement input events and mouse button input events if clicked on through :ref:`_gui_input()`. The control will also receive the :ref:`mouse_entered` and :ref:`mouse_exited` signals. -If this control does not handle the event, the event will propagate up to its parent control if it has one. The event is bubbled up the node hierarchy until it reaches a non-:ref:`CanvasItem`, a control with :ref:`MOUSE_FILTER_STOP`, or a :ref:`CanvasItem` with :ref:`CanvasItem.top_level` enabled. This will allow signals to fire in all controls it reaches. If no control handled it, the event will be passed to :ref:`Node._shortcut_input` for further processing. +If this control does not handle the event, the event will propagate up to its parent control if it has one. The event is bubbled up the node hierarchy until it reaches a non-:ref:`CanvasItem`, a control with :ref:`MOUSE_FILTER_STOP`, or a :ref:`CanvasItem` with :ref:`CanvasItem.top_level` enabled. This will allow signals to fire in all controls it reaches. If no control handled it, the event will be passed to :ref:`Node._shortcut_input()` for further processing. .. _class_Control_constant_MOUSE_FILTER_IGNORE: @@ -916,7 +1006,7 @@ If this control does not handle the event, the event will propagate up to its pa :ref:`MouseFilter` **MOUSE_FILTER_IGNORE** = ``2`` -The control will not receive any mouse movement input events nor mouse button input events through :ref:`_gui_input`. The control will also not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. If a child has :ref:`MOUSE_FILTER_PASS` and an event was passed to this control, the event will further propagate up to the control's parent. +The control will not receive any mouse movement input events nor mouse button input events through :ref:`_gui_input()`. The control will also not receive the :ref:`mouse_entered` nor :ref:`mouse_exited` signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. If a child has :ref:`MOUSE_FILTER_PASS` and an event was passed to this control, the event will further propagate up to the control's parent. \ **Note:** If the control has received :ref:`mouse_entered` but not :ref:`mouse_exited`, changing the :ref:`mouse_filter` to :ref:`MOUSE_FILTER_IGNORE` will cause :ref:`mouse_exited` to be emitted. @@ -970,7 +1060,7 @@ enum **Anchor**: :ref:`πŸ”—` :ref:`Anchor` **ANCHOR_BEGIN** = ``0`` -Snaps one of the 4 anchor's sides to the origin of the node's ``Rect``, in the top left. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset`. +Snaps one of the 4 anchor's sides to the origin of the node's ``Rect``, in the top left. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset()`. .. _class_Control_constant_ANCHOR_END: @@ -978,7 +1068,7 @@ Snaps one of the 4 anchor's sides to the origin of the node's ``Rect``, in the t :ref:`Anchor` **ANCHOR_END** = ``1`` -Snaps one of the 4 anchor's sides to the end of the node's ``Rect``, in the bottom right. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset`. +Snaps one of the 4 anchor's sides to the end of the node's ``Rect``, in the bottom right. Use it with one of the ``anchor_*`` member variables, like :ref:`anchor_left`. To change all 4 anchors at once, use :ref:`set_anchors_preset()`. .. rst-class:: classref-item-separator @@ -1004,7 +1094,7 @@ Automatic layout direction, determined from the parent control layout direction. :ref:`LayoutDirection` **LAYOUT_DIRECTION_APPLICATION_LOCALE** = ``1`` -Automatic layout direction, determined from the current locale. +Automatic layout direction, determined from the current locale. Right-to-left layout direction is automatically used for languages that require it such as Arabic and Hebrew, but only if a valid translation file is loaded for the given language (unless said language is configured as a fallback in :ref:`ProjectSettings.internationalization/locale/fallback`). For all other languages (or if no valid translation file is found by Redot), left-to-right layout direction is used. If using :ref:`TextServerFallback` (:ref:`ProjectSettings.internationalization/rendering/text_driver`), left-to-right layout direction is always used regardless of the language. Right-to-left layout direction can also be forced using :ref:`ProjectSettings.internationalization/rendering/force_right_to_left_layout_direction`. .. _class_Control_constant_LAYOUT_DIRECTION_LTR: @@ -1028,7 +1118,7 @@ Right-to-left layout direction. :ref:`LayoutDirection` **LAYOUT_DIRECTION_SYSTEM_LOCALE** = ``4`` -Automatic layout direction, determined from the system locale. +Automatic layout direction, determined from the system locale. Right-to-left layout direction is automatically used for languages that require it such as Arabic and Hebrew, but only if a valid translation file is loaded for the given language.. For all other languages (or if no valid translation file is found by Redot), left-to-right layout direction is used. If using :ref:`TextServerFallback` (:ref:`ProjectSettings.internationalization/rendering/text_driver`), left-to-right layout direction is always used regardless of the language. .. _class_Control_constant_LAYOUT_DIRECTION_MAX: @@ -1193,7 +1283,7 @@ Sent when the node needs to refresh its theme items. This happens in one of the \ **Note:** As an optimization, this notification won't be sent from changes that occur while this node is outside of the scene tree. Instead, all of the theme item updates can be applied at once when the node enters the scene tree. -\ **Note:** This notification is received alongside :ref:`Node.NOTIFICATION_ENTER_TREE`, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup theming for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using :ref:`Node.is_node_ready`. +\ **Note:** This notification is received alongside :ref:`Node.NOTIFICATION_ENTER_TREE`, so if you are instantiating a scene, the child nodes will not be initialized yet. You can use it to setup theming for this node, child nodes created from script, or if you want to access child nodes added in the editor, make sure the node is ready using :ref:`Node.is_node_ready()`. :: @@ -1229,7 +1319,7 @@ Sent when this node is inside a :ref:`ScrollContainer` wh **NOTIFICATION_LAYOUT_DIRECTION_CHANGED** = ``49`` :ref:`πŸ”—` -Sent when control layout direction is changed. +Sent when the control layout direction is changed from LTR or RTL or vice versa. This notification is propagated to child Control nodes as result of a change to :ref:`layout_direction`. .. rst-class:: classref-section-separator @@ -1351,7 +1441,24 @@ Enables whether rendering of :ref:`CanvasItem` based children - |void| **set_custom_minimum_size**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_custom_minimum_size**\ (\ ) -The minimum size of the node's bounding rectangle. If you set it to a value greater than ``(0, 0)``, the node's bounding rectangle will always have at least this size. Note that **Control** nodes have their internal minimum size returned by :ref:`get_minimum_size`. It depends on the control's contents, like text, textures, or style boxes. The actual minimum size is the maximum value of this property and the internal minimum size (see :ref:`get_combined_minimum_size`). +The minimum size of the node's bounding rectangle. If you set it to a value greater than ``(0, 0)``, the node's bounding rectangle will always have at least this size. Note that **Control** nodes have their internal minimum size returned by :ref:`get_minimum_size()`. It depends on the control's contents, like text, textures, or style boxes. The actual minimum size is the maximum value of this property and the internal minimum size (see :ref:`get_combined_minimum_size()`). + +.. rst-class:: classref-item-separator + +---- + +.. _class_Control_property_focus_behavior_recursive: + +.. rst-class:: classref-property + +:ref:`FocusBehaviorRecursive` **focus_behavior_recursive** = ``0`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_focus_behavior_recursive**\ (\ value\: :ref:`FocusBehaviorRecursive`\ ) +- :ref:`FocusBehaviorRecursive` **get_focus_behavior_recursive**\ (\ ) + +Determines which controls can be focused together with :ref:`focus_mode`. See :ref:`get_focus_mode_with_override()`. Since the default behavior is :ref:`FOCUS_BEHAVIOR_INHERITED`, this can be used to prevent all children controls from getting focused. .. rst-class:: classref-item-separator @@ -1368,7 +1475,7 @@ The minimum size of the node's bounding rectangle. If you set it to a value grea - |void| **set_focus_mode**\ (\ value\: :ref:`FocusMode`\ ) - :ref:`FocusMode` **get_focus_mode**\ (\ ) -The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard, gamepad, and mouse signals. +Determines which controls can be focused. Only one control can be focused at a time, and the focused control will receive keyboard, gamepad, and mouse events in :ref:`_gui_input()`. Use :ref:`get_focus_mode_with_override()` to determine if a control can grab focus, since :ref:`focus_behavior_recursive` also affects it. See also :ref:`grab_focus()`. .. rst-class:: classref-item-separator @@ -1541,7 +1648,7 @@ Controls the direction on the vertical axis in which the control should grow if - |void| **set_layout_direction**\ (\ value\: :ref:`LayoutDirection`\ ) - :ref:`LayoutDirection` **get_layout_direction**\ (\ ) -Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). +Controls layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). See also :ref:`is_layout_rtl()`. .. rst-class:: classref-item-separator @@ -1560,7 +1667,24 @@ Controls layout direction and text writing direction. Right-to-left layouts are If ``true``, automatically converts code line numbers, list indices, :ref:`SpinBox` and :ref:`ProgressBar` values from the Western Arabic (0..9) to the numeral systems used in current locale. -\ **Note:** Numbers within the text are not automatically converted, it can be done manually, using :ref:`TextServer.format_number`. +\ **Note:** Numbers within the text are not automatically converted, it can be done manually, using :ref:`TextServer.format_number()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Control_property_mouse_behavior_recursive: + +.. rst-class:: classref-property + +:ref:`MouseBehaviorRecursive` **mouse_behavior_recursive** = ``0`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_mouse_behavior_recursive**\ (\ value\: :ref:`MouseBehaviorRecursive`\ ) +- :ref:`MouseBehaviorRecursive` **get_mouse_behavior_recursive**\ (\ ) + +Determines which controls can receive mouse input together with :ref:`mouse_filter`. See :ref:`get_mouse_filter_with_override()`. Since the default behavior is :ref:`MOUSE_BEHAVIOR_INHERITED`, this can be used to prevent all children controls from receiving mouse input. .. rst-class:: classref-item-separator @@ -1596,7 +1720,7 @@ The default cursor shape for this control. Useful for Redot plugins and applicat - |void| **set_mouse_filter**\ (\ value\: :ref:`MouseFilter`\ ) - :ref:`MouseFilter` **get_mouse_filter**\ (\ ) -Controls whether the control will be able to receive mouse button input events through :ref:`_gui_input` and how these events should be handled. Also controls whether the control can receive the :ref:`mouse_entered`, and :ref:`mouse_exited` signals. See the constants to learn what each does. +Determines which controls will be able to receive mouse button input events through :ref:`_gui_input()` and the :ref:`mouse_entered`, and :ref:`mouse_exited` signals. Also determines how these events should be propagated. See the constants to learn what each does. Use :ref:`get_mouse_filter_with_override()` to determine if a control can receive mouse input, since :ref:`mouse_behavior_recursive` also affects it. .. rst-class:: classref-item-separator @@ -1613,9 +1737,9 @@ Controls whether the control will be able to receive mouse button input events t - |void| **set_force_pass_scroll_events**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_force_pass_scroll_events**\ (\ ) -When enabled, scroll wheel events processed by :ref:`_gui_input` will be passed to the parent control even if :ref:`mouse_filter` is set to :ref:`MOUSE_FILTER_STOP`. +When enabled, scroll wheel events processed by :ref:`_gui_input()` will be passed to the parent control even if :ref:`mouse_filter` is set to :ref:`MOUSE_FILTER_STOP`. -You should disable it on the root of your UI if you do not want scroll events to go to the :ref:`Node._unhandled_input` processing. +You should disable it on the root of your UI if you do not want scroll events to go to the :ref:`Node._unhandled_input()` processing. \ **Note:** Because this property defaults to ``true``, this allows nested scrollable containers to work out of the box. @@ -1907,7 +2031,7 @@ The :ref:`Theme` resource this node and all its **Control** and :re The name of a theme type variation used by this **Control** to look up its own theme items. When empty, the class name of the node is used (e.g. ``Button`` for the :ref:`Button` control), as well as the class names of all parent classes (in order of inheritance). -When set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See :ref:`Theme.set_type_variation`. If the theme item cannot be found using this type or its base types, lookup falls back on the class names. +When set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See :ref:`Theme.set_type_variation()`. If the theme item cannot be found using this type or its base types, lookup falls back on the class names. \ **Note:** To look up **Control**'s own items use various ``get_theme_*`` methods without specifying ``theme_type``. @@ -1930,7 +2054,7 @@ When set, this property gives the highest priority to the type of the specified Defines if tooltip text should automatically change to its translated version depending on the current locale. Uses the same auto translate mode as this control when set to :ref:`Node.AUTO_TRANSLATE_MODE_INHERIT`. -\ **Note:** Tooltips customized using :ref:`_make_custom_tooltip` do not use this auto translate mode automatically. +\ **Note:** Tooltips customized using :ref:`_make_custom_tooltip()` do not use this auto translate mode automatically. .. rst-class:: classref-item-separator @@ -1949,9 +2073,9 @@ Defines if tooltip text should automatically change to its translated version de The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the :ref:`mouse_filter` property is not :ref:`MOUSE_FILTER_IGNORE`. The time required for the tooltip to appear can be changed with the :ref:`ProjectSettings.gui/timers/tooltip_delay_sec` setting. -This string is the default return value of :ref:`get_tooltip`. Override :ref:`_get_tooltip` to generate tooltip text dynamically. Override :ref:`_make_custom_tooltip` to customize the tooltip interface and behavior. +This string is the default return value of :ref:`get_tooltip()`. Override :ref:`_get_tooltip()` to generate tooltip text dynamically. Override :ref:`_make_custom_tooltip()` to customize the tooltip interface and behavior. -The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding :ref:`_make_custom_tooltip`. The default tooltip includes a :ref:`PopupPanel` and :ref:`Label` whose theme properties can be customized using :ref:`Theme` methods with the ``"TooltipPanel"`` and ``"TooltipLabel"`` respectively. For example: +The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding :ref:`_make_custom_tooltip()`. The default tooltip includes a :ref:`PopupPanel` and :ref:`Label` whose theme properties can be customized using :ref:`Theme` methods with the ``"TooltipPanel"`` and ``"TooltipLabel"`` respectively. For example: .. tabs:: @@ -1985,15 +2109,29 @@ The tooltip popup will use either a default implementation, or a custom one that Method Descriptions ------------------- +.. _class_Control_private_method__accessibility_get_contextual_info: + +.. rst-class:: classref-method + +:ref:`String` **_accessibility_get_contextual_info**\ (\ ) |virtual| |const| :ref:`πŸ”—` + +Return the description of the keyboard shortcuts and other contextual help for this control. + +.. rst-class:: classref-item-separator + +---- + .. _class_Control_private_method__can_drop_data: .. rst-class:: classref-method :ref:`bool` **_can_drop_data**\ (\ at_position\: :ref:`Vector2`, data\: :ref:`Variant`\ ) |virtual| |const| :ref:`πŸ”—` -Redot calls this method to test if ``data`` from a control's :ref:`_get_drag_data` can be dropped at ``at_position``. ``at_position`` is local to this control. +Redot calls this method to test if ``data`` from a control's :ref:`_get_drag_data()` can be dropped at ``at_position``. ``at_position`` is local to this control. + +This method should only be used to test the data. Process the data in :ref:`_drop_data()`. -This method should only be used to test the data. Process the data in :ref:`_drop_data`. +\ **Note:** If drag was initiated by keyboard shortcut or :ref:`accessibility_drag()`, ``at_position`` is set to ``Vector2(INFINITY, INFINITY)`` and the currently selected item/text position should be used as drop position. .. tabs:: @@ -2026,7 +2164,9 @@ This method should only be used to test the data. Process the data in :ref:`_dro |void| **_drop_data**\ (\ at_position\: :ref:`Vector2`, data\: :ref:`Variant`\ ) |virtual| :ref:`πŸ”—` -Redot calls this method to pass you the ``data`` from a control's :ref:`_get_drag_data` result. Redot first calls :ref:`_can_drop_data` to test if ``data`` is allowed to drop at ``at_position`` where ``at_position`` is local to this control. +Redot calls this method to pass you the ``data`` from a control's :ref:`_get_drag_data()` result. Redot first calls :ref:`_can_drop_data()` to test if ``data`` is allowed to drop at ``at_position`` where ``at_position`` is local to this control. + +\ **Note:** If drag was initiated by keyboard shortcut or :ref:`accessibility_drag()`, ``at_position`` is set to ``Vector2(INFINITY, INFINITY)`` and the currently selected item/text position should be used as drop position. .. tabs:: @@ -2063,9 +2203,11 @@ Redot calls this method to pass you the ``data`` from a control's :ref:`_get_dra :ref:`Variant` **_get_drag_data**\ (\ at_position\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Redot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns ``null`` if there is no data to drag. Controls that want to receive drop data should implement :ref:`_can_drop_data` and :ref:`_drop_data`. ``at_position`` is local to this control. Drag may be forced with :ref:`force_drag`. +Redot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns ``null`` if there is no data to drag. Controls that want to receive drop data should implement :ref:`_can_drop_data()` and :ref:`_drop_data()`. ``at_position`` is local to this control. Drag may be forced with :ref:`force_drag()`. + +A preview that will follow the mouse that should represent the data can be set with :ref:`set_drag_preview()`. A good time to set the preview is in this method. -A preview that will follow the mouse that should represent the data can be set with :ref:`set_drag_preview`. A good time to set the preview is in this method. +\ **Note:** If drag was initiated by keyboard shortcut or :ref:`accessibility_drag()`, ``at_position`` is set to ``Vector2(INFINITY, INFINITY)`` and the currently selected item/text position should be used as drop position. .. tabs:: @@ -2114,9 +2256,9 @@ If not overridden, defaults to :ref:`Vector2.ZERO`. :ref:`String` **_get_tooltip**\ (\ at_position\: :ref:`Vector2`\ ) |virtual| |const| :ref:`πŸ”—` -Virtual method to be implemented by the user. Returns the tooltip text for the position ``at_position`` in control's local coordinates, which will typically appear when the cursor is resting over this control. See :ref:`get_tooltip`. +Virtual method to be implemented by the user. Returns the tooltip text for the position ``at_position`` in control's local coordinates, which will typically appear when the cursor is resting over this control. See :ref:`get_tooltip()`. -\ **Note:** If this method returns an empty :ref:`String` and :ref:`_make_custom_tooltip` is not overridden, no tooltip is displayed. +\ **Note:** If this method returns an empty :ref:`String` and :ref:`_make_custom_tooltip()` is not overridden, no tooltip is displayed. .. rst-class:: classref-item-separator @@ -2128,7 +2270,7 @@ Virtual method to be implemented by the user. Returns the tooltip text for the p |void| **_gui_input**\ (\ event\: :ref:`InputEvent`\ ) |virtual| :ref:`πŸ”—` -Virtual method to be implemented by the user. Override this method to handle and accept inputs on UI elements. See also :ref:`accept_event`. +Virtual method to be implemented by the user. Override this method to handle and accept inputs on UI elements. See also :ref:`accept_event()`. \ **Example:** Click on the control to print a message: @@ -2167,7 +2309,7 @@ If the ``event`` inherits :ref:`InputEventMouse`, this me - the control's parent has :ref:`clip_contents` enabled and the ``event``'s position is outside the parent's rectangle; -- the ``event``'s position is outside the control (see :ref:`_has_point`). +- the ``event``'s position is outside the control (see :ref:`_has_point()`). \ **Note:** The ``event``'s position is relative to this control's origin. @@ -2197,17 +2339,17 @@ If not overridden, default behavior is checking if the point is within control's :ref:`Object` **_make_custom_tooltip**\ (\ for_text\: :ref:`String`\ ) |virtual| |const| :ref:`πŸ”—` -Virtual method to be implemented by the user. Returns a **Control** node that should be used as a tooltip instead of the default one. ``for_text`` is the return value of :ref:`get_tooltip`. +Virtual method to be implemented by the user. Returns a **Control** node that should be used as a tooltip instead of the default one. ``for_text`` is the return value of :ref:`get_tooltip()`. The returned node must be of type **Control** or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When ``null`` or a non-Control node is returned, the default tooltip will be used instead. -The returned node will be added as child to a :ref:`PopupPanel`, so you should only provide the contents of that panel. That :ref:`PopupPanel` can be themed using :ref:`Theme.set_stylebox` for the type ``"TooltipPanel"`` (see :ref:`tooltip_text` for an example). +The returned node will be added as child to a :ref:`PopupPanel`, so you should only provide the contents of that panel. That :ref:`PopupPanel` can be themed using :ref:`Theme.set_stylebox()` for the type ``"TooltipPanel"`` (see :ref:`tooltip_text` for an example). \ **Note:** The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its :ref:`custom_minimum_size` to some non-zero value. \ **Note:** The node (and any relevant children) should have their :ref:`CanvasItem.visible` set to ``true`` when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. -\ **Note:** If overridden, this method is called even if :ref:`get_tooltip` returns an empty string. When this happens with the default tooltip, it is not displayed. To copy this behavior, return ``null`` in this method when ``for_text`` is empty. +\ **Note:** If overridden, this method is called even if :ref:`get_tooltip()` returns an empty string. When this happens with the default tooltip, it is not displayed. To copy this behavior, return ``null`` in this method when ``for_text`` is empty. \ **Example:** Use a constructed node as a tooltip: @@ -2279,7 +2421,7 @@ Returns an :ref:`Array` of :ref:`Vector3i` text ran |void| **accept_event**\ (\ ) :ref:`πŸ”—` -Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to :ref:`Node._unhandled_input` or :ref:`Node._unhandled_key_input`. +Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to :ref:`Node._unhandled_input()` or :ref:`Node._unhandled_key_input()`. \ **Note:** This does not affect the methods in :ref:`Input`, only the way events are propagated. @@ -2287,15 +2429,39 @@ Marks an input event as handled. Once you accept an input event, it stops propag ---- +.. _class_Control_method_accessibility_drag: + +.. rst-class:: classref-method + +|void| **accessibility_drag**\ (\ ) :ref:`πŸ”—` + +Starts drag-and-drop operation without using a mouse. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Control_method_accessibility_drop: + +.. rst-class:: classref-method + +|void| **accessibility_drop**\ (\ ) :ref:`πŸ”—` + +Ends drag-and-drop operation without using a mouse. + +.. rst-class:: classref-item-separator + +---- + .. _class_Control_method_add_theme_color_override: .. rst-class:: classref-method |void| **add_theme_color_override**\ (\ name\: :ref:`StringName`, color\: :ref:`Color`\ ) :ref:`πŸ”—` -Creates a local override for a theme :ref:`Color` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_color_override`. +Creates a local override for a theme :ref:`Color` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_color_override()`. -See also :ref:`get_theme_color`. +See also :ref:`get_theme_color()`. \ **Example:** Override a :ref:`Label`'s color and reset it later: @@ -2332,9 +2498,9 @@ See also :ref:`get_theme_color`. |void| **add_theme_constant_override**\ (\ name\: :ref:`StringName`, constant\: :ref:`int`\ ) :ref:`πŸ”—` -Creates a local override for a theme constant with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_constant_override`. +Creates a local override for a theme constant with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_constant_override()`. -See also :ref:`get_theme_constant`. +See also :ref:`get_theme_constant()`. .. rst-class:: classref-item-separator @@ -2346,9 +2512,9 @@ See also :ref:`get_theme_constant`. |void| **add_theme_font_override**\ (\ name\: :ref:`StringName`, font\: :ref:`Font`\ ) :ref:`πŸ”—` -Creates a local override for a theme :ref:`Font` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_override`. +Creates a local override for a theme :ref:`Font` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_override()`. -See also :ref:`get_theme_font`. +See also :ref:`get_theme_font()`. .. rst-class:: classref-item-separator @@ -2360,9 +2526,9 @@ See also :ref:`get_theme_font`. |void| **add_theme_font_size_override**\ (\ name\: :ref:`StringName`, font_size\: :ref:`int`\ ) :ref:`πŸ”—` -Creates a local override for a theme font size with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_size_override`. +Creates a local override for a theme font size with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_font_size_override()`. -See also :ref:`get_theme_font_size`. +See also :ref:`get_theme_font_size()`. .. rst-class:: classref-item-separator @@ -2374,9 +2540,9 @@ See also :ref:`get_theme_font_size`. |void| **add_theme_icon_override**\ (\ name\: :ref:`StringName`, texture\: :ref:`Texture2D`\ ) :ref:`πŸ”—` -Creates a local override for a theme icon with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_icon_override`. +Creates a local override for a theme icon with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_icon_override()`. -See also :ref:`get_theme_icon`. +See also :ref:`get_theme_icon()`. .. rst-class:: classref-item-separator @@ -2388,9 +2554,9 @@ See also :ref:`get_theme_icon`. |void| **add_theme_stylebox_override**\ (\ name\: :ref:`StringName`, stylebox\: :ref:`StyleBox`\ ) :ref:`πŸ”—` -Creates a local override for a theme :ref:`StyleBox` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_stylebox_override`. +Creates a local override for a theme :ref:`StyleBox` with the specified ``name``. Local overrides always take precedence when fetching theme items for the control. An override can be removed with :ref:`remove_theme_stylebox_override()`. -See also :ref:`get_theme_stylebox`. +See also :ref:`get_theme_stylebox()`. \ **Example:** Modify a property in a :ref:`StyleBox` by duplicating it: @@ -2433,7 +2599,7 @@ See also :ref:`get_theme_stylebox`. |void| **begin_bulk_theme_override**\ (\ ) :ref:`πŸ”—` -Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_CHANGED` until :ref:`end_bulk_theme_override` is called. +Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_CHANGED` until :ref:`end_bulk_theme_override()` is called. .. rst-class:: classref-item-separator @@ -2445,7 +2611,7 @@ Prevents ``*_theme_*_override`` methods from emitting :ref:`NOTIFICATION_THEME_C |void| **end_bulk_theme_override**\ (\ ) :ref:`πŸ”—` -Ends a bulk theme override update. See :ref:`begin_bulk_theme_override`. +Ends a bulk theme override update. See :ref:`begin_bulk_theme_override()`. .. rst-class:: classref-item-separator @@ -2483,7 +2649,7 @@ Finds the previous (above in the tree) **Control** that can receive the focus. Finds the next **Control** that can receive the focus on the specified :ref:`Side`. -\ **Note:** This is different from :ref:`get_focus_neighbor`, which returns the path of a specified focus neighbor. +\ **Note:** This is different from :ref:`get_focus_neighbor()`, which returns the path of a specified focus neighbor. .. rst-class:: classref-item-separator @@ -2495,9 +2661,9 @@ Finds the next **Control** that can receive the focus on the specified :ref:`Sid |void| **force_drag**\ (\ data\: :ref:`Variant`, preview\: :ref:`Control`\ ) :ref:`πŸ”—` -Forces drag and bypasses :ref:`_get_drag_data` and :ref:`set_drag_preview` by passing ``data`` and ``preview``. Drag will start even if the mouse is neither over nor pressed on this control. +Forces drag and bypasses :ref:`_get_drag_data()` and :ref:`set_drag_preview()` by passing ``data`` and ``preview``. Drag will start even if the mouse is neither over nor pressed on this control. -The methods :ref:`_can_drop_data` and :ref:`_drop_data` must be implemented on controls that want to receive drop data. +The methods :ref:`_can_drop_data()` and :ref:`_drop_data()` must be implemented on controls that want to receive drop data. .. rst-class:: classref-item-separator @@ -2533,7 +2699,7 @@ Returns :ref:`offset_left` and :ref:`offset_ :ref:`Vector2` **get_combined_minimum_size**\ (\ ) |const| :ref:`πŸ”—` -Returns combined minimum size from :ref:`custom_minimum_size` and :ref:`get_minimum_size`. +Returns combined minimum size from :ref:`custom_minimum_size` and :ref:`get_minimum_size()`. .. rst-class:: classref-item-separator @@ -2545,7 +2711,7 @@ Returns combined minimum size from :ref:`custom_minimum_size` **get_cursor_shape**\ (\ position\: :ref:`Vector2` = Vector2(0, 0)\ ) |const| :ref:`πŸ”—` -Returns the mouse cursor shape the control displays on mouse hover. See :ref:`CursorShape`. +Returns the mouse cursor shape for this control when hovered over ``position`` in local coordinates. For most controls, this is the same as :ref:`mouse_default_cursor_shape`, but some built-in controls implement more complex logic. See :ref:`CursorShape`. .. rst-class:: classref-item-separator @@ -2563,6 +2729,18 @@ Returns :ref:`offset_right` and :ref:`offse ---- +.. _class_Control_method_get_focus_mode_with_override: + +.. rst-class:: classref-method + +:ref:`FocusMode` **get_focus_mode_with_override**\ (\ ) |const| :ref:`πŸ”—` + +Returns the :ref:`focus_mode`, but takes the :ref:`focus_behavior_recursive` into account. If :ref:`focus_behavior_recursive` is set to :ref:`FOCUS_BEHAVIOR_DISABLED`, or it is set to :ref:`FOCUS_BEHAVIOR_INHERITED` and its ancestor is set to :ref:`FOCUS_BEHAVIOR_DISABLED`, then this returns :ref:`FOCUS_NONE`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Control_method_get_focus_neighbor: .. rst-class:: classref-method @@ -2571,7 +2749,7 @@ Returns :ref:`offset_right` and :ref:`offse Returns the focus neighbor for the specified :ref:`Side`. A getter method for :ref:`focus_neighbor_bottom`, :ref:`focus_neighbor_left`, :ref:`focus_neighbor_right` and :ref:`focus_neighbor_top`. -\ **Note:** To find the next **Control** on the specific :ref:`Side`, even if a neighbor is not assigned, use :ref:`find_valid_focus_neighbor`. +\ **Note:** To find the next **Control** on the specific :ref:`Side`, even if a neighbor is not assigned, use :ref:`find_valid_focus_neighbor()`. .. rst-class:: classref-item-separator @@ -2605,6 +2783,18 @@ Returns the minimum size for this control. See :ref:`custom_minimum_size` **get_mouse_filter_with_override**\ (\ ) |const| :ref:`πŸ”—` + +Returns the :ref:`mouse_filter`, but takes the :ref:`mouse_behavior_recursive` into account. If :ref:`mouse_behavior_recursive` is set to :ref:`MOUSE_BEHAVIOR_DISABLED`, or it is set to :ref:`MOUSE_BEHAVIOR_INHERITED` and its ancestor is set to :ref:`MOUSE_BEHAVIOR_DISABLED`, then this returns :ref:`MOUSE_FILTER_IGNORE`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Control_method_get_offset: .. rst-class:: classref-method @@ -2687,7 +2877,7 @@ Equals to :ref:`global_position` if the Returns a :ref:`Color` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a color item with the specified ``name`` and ``theme_type``. If ``theme_type`` is omitted the class name of the current control is used as the type, or :ref:`theme_type_variation` if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. -For the current control its local overrides are considered first (see :ref:`add_theme_color_override`), then its assigned :ref:`theme`. After the current control, each parent control and its assigned :ref:`theme` are considered; controls without a :ref:`theme` assigned are skipped. If no matching :ref:`Theme` is found in the tree, the custom project :ref:`Theme` (see :ref:`ProjectSettings.gui/theme/custom`) and the default :ref:`Theme` are used (see :ref:`ThemeDB`). +For the current control its local overrides are considered first (see :ref:`add_theme_color_override()`), then its assigned :ref:`theme`. After the current control, each parent control and its assigned :ref:`theme` are considered; controls without a :ref:`theme` assigned are skipped. If no matching :ref:`Theme` is found in the tree, the custom project :ref:`Theme` (see :ref:`ProjectSettings.gui/theme/custom`) and the default :ref:`Theme` are used (see :ref:`ThemeDB`). .. tabs:: @@ -2724,7 +2914,7 @@ For the current control its local overrides are considered first (see :ref:`add_ Returns a constant from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a constant item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2738,7 +2928,7 @@ See :ref:`get_theme_color` for details. Returns the default base scale value from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_base_scale` value. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2752,7 +2942,7 @@ See :ref:`get_theme_color` for details. Returns the default font from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_font` value. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2766,7 +2956,7 @@ See :ref:`get_theme_color` for details. Returns the default font size value from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a valid :ref:`Theme.default_font_size` value. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2780,7 +2970,7 @@ See :ref:`get_theme_color` for details. Returns a :ref:`Font` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a font item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2794,7 +2984,7 @@ See :ref:`get_theme_color` for details. Returns a font size from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a font size item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2808,7 +2998,7 @@ See :ref:`get_theme_color` for details. Returns an icon from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has an icon item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2822,7 +3012,7 @@ See :ref:`get_theme_color` for details. Returns a :ref:`StyleBox` from the first matching :ref:`Theme` in the tree if that :ref:`Theme` has a stylebox item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2836,9 +3026,9 @@ See :ref:`get_theme_color` for details. Returns the tooltip text for the position ``at_position`` in control's local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns :ref:`tooltip_text`. -This method can be overridden to customize its behavior. See :ref:`_get_tooltip`. +This method can be overridden to customize its behavior. See :ref:`_get_tooltip()`. -\ **Note:** If this method returns an empty :ref:`String` and :ref:`_make_custom_tooltip` is not overridden, no tooltip is displayed. +\ **Note:** If this method returns an empty :ref:`String` and :ref:`_make_custom_tooltip()` is not overridden, no tooltip is displayed. .. rst-class:: classref-item-separator @@ -2881,7 +3071,7 @@ Creates an :ref:`InputEventMouseButton` that attemp Steal the focus from another control and become the focused control (see :ref:`focus_mode`). -\ **Note:** Using this method together with :ref:`Callable.call_deferred` makes it more reliable, especially when called inside :ref:`Node._ready`. +\ **Note:** Using this method together with :ref:`Callable.call_deferred()` makes it more reliable, especially when called inside :ref:`Node._ready()`. .. rst-class:: classref-item-separator @@ -2907,7 +3097,7 @@ Returns ``true`` if this is the current focused control. See :ref:`focus_mode` in the tree that has a color item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2921,7 +3111,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme :ref:`Color` with the specified ``name`` in this **Control** node. -See :ref:`add_theme_color_override`. +See :ref:`add_theme_color_override()`. .. rst-class:: classref-item-separator @@ -2935,7 +3125,7 @@ See :ref:`add_theme_color_override` in the tree that has a constant item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2949,7 +3139,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme constant with the specified ``name`` in this **Control** node. -See :ref:`add_theme_constant_override`. +See :ref:`add_theme_constant_override()`. .. rst-class:: classref-item-separator @@ -2963,7 +3153,7 @@ See :ref:`add_theme_constant_override` in the tree that has a font item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -2977,7 +3167,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme :ref:`Font` with the specified ``name`` in this **Control** node. -See :ref:`add_theme_font_override`. +See :ref:`add_theme_font_override()`. .. rst-class:: classref-item-separator @@ -2991,7 +3181,7 @@ See :ref:`add_theme_font_override` Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a font size item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -3005,7 +3195,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme font size with the specified ``name`` in this **Control** node. -See :ref:`add_theme_font_size_override`. +See :ref:`add_theme_font_size_override()`. .. rst-class:: classref-item-separator @@ -3019,7 +3209,7 @@ See :ref:`add_theme_font_size_override` in the tree that has an icon item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -3033,7 +3223,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme icon with the specified ``name`` in this **Control** node. -See :ref:`add_theme_icon_override`. +See :ref:`add_theme_icon_override()`. .. rst-class:: classref-item-separator @@ -3047,7 +3237,7 @@ See :ref:`add_theme_icon_override` Returns ``true`` if there is a matching :ref:`Theme` in the tree that has a stylebox item with the specified ``name`` and ``theme_type``. -See :ref:`get_theme_color` for details. +See :ref:`get_theme_color()` for details. .. rst-class:: classref-item-separator @@ -3061,7 +3251,7 @@ See :ref:`get_theme_color` for details. Returns ``true`` if there is a local override for a theme :ref:`StyleBox` with the specified ``name`` in this **Control** node. -See :ref:`add_theme_stylebox_override`. +See :ref:`add_theme_stylebox_override()`. .. rst-class:: classref-item-separator @@ -3073,7 +3263,7 @@ See :ref:`add_theme_stylebox_override` **is_drag_successful**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if a drag operation is successful. Alternative to :ref:`Viewport.gui_is_drag_successful`. +Returns ``true`` if a drag operation is successful. Alternative to :ref:`Viewport.gui_is_drag_successful()`. Best used with :ref:`Node.NOTIFICATION_DRAG_END`. @@ -3087,7 +3277,7 @@ Best used with :ref:`Node.NOTIFICATION_DRAG_END` **is_layout_rtl**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if layout is right-to-left. +Returns ``true`` if the layout is right-to-left. See also :ref:`layout_direction`. .. rst-class:: classref-item-separator @@ -3111,7 +3301,7 @@ Give up the focus. No other control will be able to receive input. |void| **remove_theme_color_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme :ref:`Color` with the specified ``name`` previously added by :ref:`add_theme_color_override` or via the Inspector dock. +Removes a local override for a theme :ref:`Color` with the specified ``name`` previously added by :ref:`add_theme_color_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3123,7 +3313,7 @@ Removes a local override for a theme :ref:`Color` with the specifie |void| **remove_theme_constant_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme constant with the specified ``name`` previously added by :ref:`add_theme_constant_override` or via the Inspector dock. +Removes a local override for a theme constant with the specified ``name`` previously added by :ref:`add_theme_constant_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3135,7 +3325,7 @@ Removes a local override for a theme constant with the specified ``name`` previo |void| **remove_theme_font_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme :ref:`Font` with the specified ``name`` previously added by :ref:`add_theme_font_override` or via the Inspector dock. +Removes a local override for a theme :ref:`Font` with the specified ``name`` previously added by :ref:`add_theme_font_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3147,7 +3337,7 @@ Removes a local override for a theme :ref:`Font` with the specified |void| **remove_theme_font_size_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme font size with the specified ``name`` previously added by :ref:`add_theme_font_size_override` or via the Inspector dock. +Removes a local override for a theme font size with the specified ``name`` previously added by :ref:`add_theme_font_size_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3159,7 +3349,7 @@ Removes a local override for a theme font size with the specified ``name`` previ |void| **remove_theme_icon_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme icon with the specified ``name`` previously added by :ref:`add_theme_icon_override` or via the Inspector dock. +Removes a local override for a theme icon with the specified ``name`` previously added by :ref:`add_theme_icon_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3171,7 +3361,7 @@ Removes a local override for a theme icon with the specified ``name`` previously |void| **remove_theme_stylebox_override**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` -Removes a local override for a theme :ref:`StyleBox` with the specified ``name`` previously added by :ref:`add_theme_stylebox_override` or via the Inspector dock. +Removes a local override for a theme :ref:`StyleBox` with the specified ``name`` previously added by :ref:`add_theme_stylebox_override()` or via the Inspector dock. .. rst-class:: classref-item-separator @@ -3183,7 +3373,7 @@ Removes a local override for a theme :ref:`StyleBox` with the sp |void| **reset_size**\ (\ ) :ref:`πŸ”—` -Resets the size to :ref:`get_combined_minimum_size`. This is equivalent to calling ``set_size(Vector2())`` (or any size below the minimum). +Resets the size to :ref:`get_combined_minimum_size()`. This is equivalent to calling ``set_size(Vector2())`` (or any size below the minimum). .. rst-class:: classref-item-separator @@ -3211,7 +3401,7 @@ If ``push_opposite_anchor`` is ``true`` and the opposite anchor overlaps this an |void| **set_anchor_and_offset**\ (\ side\: :ref:`Side`, anchor\: :ref:`float`, offset\: :ref:`float`, push_opposite_anchor\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Works the same as :ref:`set_anchor`, but instead of ``keep_offset`` argument and automatic update of offset, it allows to set the offset yourself (see :ref:`set_offset`). +Works the same as :ref:`set_anchor()`, but instead of ``keep_offset`` argument and automatic update of offset, it allows to set the offset yourself (see :ref:`set_offset()`). .. rst-class:: classref-item-separator @@ -3223,7 +3413,7 @@ Works the same as :ref:`set_anchor`, but instea |void| **set_anchors_and_offsets_preset**\ (\ preset\: :ref:`LayoutPreset`, resize_mode\: :ref:`LayoutPresetMode` = 0, margin\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets both anchor preset and offset preset. See :ref:`set_anchors_preset` and :ref:`set_offsets_preset`. +Sets both anchor preset and offset preset. See :ref:`set_anchors_preset()` and :ref:`set_offsets_preset()`. .. rst-class:: classref-item-separator @@ -3265,11 +3455,11 @@ Sets the given callables to be used instead of the control's own drag-and-drop v The arguments for each callable should be exactly the same as their respective virtual methods, which would be: -- ``drag_func`` corresponds to :ref:`_get_drag_data` and requires a :ref:`Vector2`; +- ``drag_func`` corresponds to :ref:`_get_drag_data()` and requires a :ref:`Vector2`; -- ``can_drop_func`` corresponds to :ref:`_can_drop_data` and requires both a :ref:`Vector2` and a :ref:`Variant`; +- ``can_drop_func`` corresponds to :ref:`_can_drop_data()` and requires both a :ref:`Vector2` and a :ref:`Variant`; -- ``drop_func`` corresponds to :ref:`_drop_data` and requires both a :ref:`Vector2` and a :ref:`Variant`. +- ``drop_func`` corresponds to :ref:`_drop_data()` and requires both a :ref:`Vector2` and a :ref:`Variant`. .. rst-class:: classref-item-separator @@ -3281,7 +3471,7 @@ The arguments for each callable should be exactly the same as their respective v |void| **set_drag_preview**\ (\ control\: :ref:`Control`\ ) :ref:`πŸ”—` -Shows the given control at the mouse pointer. A good time to call this method is in :ref:`_get_drag_data`. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended. +Shows the given control at the mouse pointer. A good time to call this method is in :ref:`_get_drag_data()`. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended. .. tabs:: @@ -3419,7 +3609,7 @@ If ``keep_offsets`` is ``true``, control's anchors will be updated instead of of |void| **update_minimum_size**\ (\ ) :ref:`πŸ”—` -Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with :ref:`get_minimum_size` when the return value is changed. Setting :ref:`custom_minimum_size` directly calls this method automatically. +Invalidates the size cache in this node and in parent nodes up to top level. Intended to be used with :ref:`get_minimum_size()` when the return value is changed. Setting :ref:`custom_minimum_size` directly calls this method automatically. .. rst-class:: classref-item-separator @@ -3433,7 +3623,7 @@ Invalidates the size cache in this node and in parent nodes up to top level. Int Moves the mouse cursor to ``position``, relative to :ref:`position` of this **Control**. -\ **Note:** :ref:`warp_mouse` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. +\ **Note:** :ref:`warp_mouse()` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. .. |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_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index 255b84a079a..ef03ebd0cd8 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -73,7 +73,7 @@ Property Descriptions The polygon's list of vertices that form a convex hull. Can be in either clockwise or counterclockwise order. -\ **Warning:** Only set this property to a list of points that actually form a convex hull. Use :ref:`set_point_cloud` to generate the convex hull of an arbitrary set of points. +\ **Warning:** Only set this property to a list of points that actually form a convex hull. Use :ref:`set_point_cloud()` to generate the convex hull of an arbitrary set of points. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. @@ -92,7 +92,7 @@ Method Descriptions |void| **set_point_cloud**\ (\ point_cloud\: :ref:`PackedVector2Array`\ ) :ref:`πŸ”—` -Based on the set of points provided, this assigns the :ref:`points` property using the convex hull algorithm, removing all unneeded points. See :ref:`Geometry2D.convex_hull` for details. +Based on the set of points provided, this assigns the :ref:`points` property using the convex hull algorithm, removing all unneeded points. See :ref:`Geometry2D.convex_hull()` for details. .. |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_convexpolygonshape3d.rst b/classes/class_convexpolygonshape3d.rst index 6da2de6adf9..31c0fb86a9d 100644 --- a/classes/class_convexpolygonshape3d.rst +++ b/classes/class_convexpolygonshape3d.rst @@ -23,7 +23,7 @@ A 3D convex polyhedron shape, intended for use in physics. Usually used to provi \ **ConvexPolygonShape3D** is *solid*, which means it detects collisions from objects that are fully inside it, unlike :ref:`ConcavePolygonShape3D` which is hollow. This makes it more suitable for both detection and physics. -\ **Convex decomposition:** A concave polyhedron can be split up into several convex polyhedra. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several **ConvexPolygonShape3D** nodes. To generate a convex decomposition from a mesh, select the :ref:`MeshInstance3D` node, go to the **Mesh** menu that appears above the viewport, and choose **Create Multiple Convex Collision Siblings**. Alternatively, :ref:`MeshInstance3D.create_multiple_convex_collisions` can be called in a script to perform this decomposition at run-time. +\ **Convex decomposition:** A concave polyhedron can be split up into several convex polyhedra. This allows dynamic physics bodies to have complex concave collisions (at a performance cost) and can be achieved by using several **ConvexPolygonShape3D** nodes. To generate a convex decomposition from a mesh, select the :ref:`MeshInstance3D` node, go to the **Mesh** menu that appears above the viewport, and choose **Create Multiple Convex Collision Siblings**. Alternatively, :ref:`MeshInstance3D.create_multiple_convex_collisions()` can be called in a script to perform this decomposition at run-time. \ **Performance:** **ConvexPolygonShape3D** is faster to check collisions against compared to :ref:`ConcavePolygonShape3D`, but it is slower than primitive collision shapes such as :ref:`SphereShape3D` and :ref:`BoxShape3D`. Its use should generally be limited to medium-sized objects that cannot have their collision accurately represented by primitive shapes. diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index 1a772e52267..27d404b663d 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -38,137 +38,143 @@ Properties .. table:: :widths: auto - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`amount` | ``8`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`angle_curve` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`angle_max` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`angle_min` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`angular_velocity_curve` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`anim_offset_curve` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`anim_speed_curve` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Gradient` | :ref:`color_initial_ramp` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Gradient` | :ref:`color_ramp` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`damping_curve` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`damping_max` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`damping_min` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Vector2` | :ref:`direction` | ``Vector2(1, 0)`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`DrawOrder` | :ref:`draw_order` | ``0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`PackedColorArray` | :ref:`emission_colors` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`PackedVector2Array` | :ref:`emission_normals` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`PackedVector2Array` | :ref:`emission_points` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Vector2` | :ref:`emission_rect_extents` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`emission_sphere_radius` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`emitting` | ``true`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`explosiveness` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`int` | :ref:`fixed_fps` | ``0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`fract_delta` | ``true`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Vector2` | :ref:`gravity` | ``Vector2(0, 980)`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`hue_variation_curve` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`hue_variation_max` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`hue_variation_min` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`initial_velocity_max` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`initial_velocity_min` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`lifetime` | ``1.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`lifetime_randomness` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`linear_accel_curve` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`local_coords` | ``false`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`one_shot` | ``false`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`orbit_velocity_curve` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`orbit_velocity_max` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`orbit_velocity_min` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`preprocess` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`radial_accel_curve` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`randomness` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`scale_amount_curve` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`scale_amount_max` | ``1.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`scale_amount_min` | ``1.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`scale_curve_x` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`scale_curve_y` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`speed_scale` | ``1.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`bool` | :ref:`split_scale` | ``false`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`spread` | ``45.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Curve` | :ref:`tangential_accel_curve` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ - | :ref:`Texture2D` | :ref:`texture` | | - +---------------------------------------------------------+-------------------------------------------------------------------------------------+-----------------------+ + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`amount` | ``8`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`angle_curve` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_max` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angle_min` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`angular_velocity_curve` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`anim_offset_curve` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`anim_speed_curve` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Gradient` | :ref:`color_initial_ramp` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Gradient` | :ref:`color_ramp` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`damping_curve` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`damping_max` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`damping_min` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`direction` | ``Vector2(1, 0)`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`DrawOrder` | :ref:`draw_order` | ``0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`emission_colors` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`emission_normals` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`emission_points` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`emission_rect_extents` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`emission_sphere_radius` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`emitting` | ``true`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`explosiveness` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`fixed_fps` | ``0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`fract_delta` | ``true`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`gravity` | ``Vector2(0, 980)`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`hue_variation_curve` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`hue_variation_max` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`hue_variation_min` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`initial_velocity_max` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`initial_velocity_min` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`lifetime` | ``1.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`lifetime_randomness` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`linear_accel_curve` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`local_coords` | ``false`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`one_shot` | ``false`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`orbit_velocity_curve` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`orbit_velocity_max` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`orbit_velocity_min` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`preprocess` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`radial_accel_curve` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`randomness` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`scale_amount_curve` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`scale_amount_max` | ``1.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`scale_amount_min` | ``1.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`scale_curve_x` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`scale_curve_y` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`seed` | ``0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`speed_scale` | ``1.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`split_scale` | ``false`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`spread` | ``45.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Curve` | :ref:`tangential_accel_curve` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`texture` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_fixed_seed` | ``false`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -189,7 +195,9 @@ Methods +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_particle_flag`\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`restart`\ (\ ) | + | |void| | :ref:`request_particles_process`\ (\ process_time\: :ref:`float`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`restart`\ (\ keep_seed\: :ref:`bool` = false\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_param_curve`\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -264,7 +272,7 @@ enum **Parameter**: :ref:`πŸ”—` :ref:`Parameter` **PARAM_INITIAL_LINEAR_VELOCITY** = ``0`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set initial velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set initial velocity properties. .. _class_CPUParticles2D_constant_PARAM_ANGULAR_VELOCITY: @@ -272,7 +280,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANGULAR_VELOCITY** = ``1`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angular velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set angular velocity properties. .. _class_CPUParticles2D_constant_PARAM_ORBIT_VELOCITY: @@ -280,7 +288,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ORBIT_VELOCITY** = ``2`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set orbital velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set orbital velocity properties. .. _class_CPUParticles2D_constant_PARAM_LINEAR_ACCEL: @@ -288,7 +296,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_LINEAR_ACCEL** = ``3`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set linear acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set linear acceleration properties. .. _class_CPUParticles2D_constant_PARAM_RADIAL_ACCEL: @@ -296,7 +304,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_RADIAL_ACCEL** = ``4`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set radial acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set radial acceleration properties. .. _class_CPUParticles2D_constant_PARAM_TANGENTIAL_ACCEL: @@ -304,7 +312,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_TANGENTIAL_ACCEL** = ``5`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set tangential acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set tangential acceleration properties. .. _class_CPUParticles2D_constant_PARAM_DAMPING: @@ -312,7 +320,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_DAMPING** = ``6`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set damping properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set damping properties. .. _class_CPUParticles2D_constant_PARAM_ANGLE: @@ -320,7 +328,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANGLE** = ``7`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angle properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set angle properties. .. _class_CPUParticles2D_constant_PARAM_SCALE: @@ -328,7 +336,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_SCALE** = ``8`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set scale properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set scale properties. .. _class_CPUParticles2D_constant_PARAM_HUE_VARIATION: @@ -336,7 +344,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_HUE_VARIATION** = ``9`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set hue variation properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set hue variation properties. .. _class_CPUParticles2D_constant_PARAM_ANIM_SPEED: @@ -344,7 +352,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANIM_SPEED** = ``10`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation speed properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set animation speed properties. .. _class_CPUParticles2D_constant_PARAM_ANIM_OFFSET: @@ -352,7 +360,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANIM_OFFSET** = ``11`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation offset properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set animation offset properties. .. _class_CPUParticles2D_constant_PARAM_MAX: @@ -378,7 +386,7 @@ enum **ParticleFlags**: :ref:`πŸ”—` :ref:`ParticleFlags` **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = ``0`` -Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. +Use with :ref:`set_particle_flag()` to set :ref:`particle_flag_align_y`. .. _class_CPUParticles2D_constant_PARTICLE_FLAG_ROTATE_Y: @@ -730,7 +738,7 @@ Each particle's initial color. If :ref:`texture`\ ) - :ref:`Gradient` **get_color_initial_ramp**\ (\ ) -Each particle's initial color will vary along this :ref:`GradientTexture1D` (multiplied with :ref:`color`). +Each particle's initial color will vary along this :ref:`Gradient` (multiplied with :ref:`color`). .. rst-class:: classref-item-separator @@ -747,7 +755,7 @@ Each particle's initial color will vary along this :ref:`GradientTexture1D`\ ) - :ref:`Gradient` **get_color_ramp**\ (\ ) -Each particle's color will vary along this :ref:`Gradient` (multiplied with :ref:`color`). +Each particle's color will vary along this :ref:`Gradient` over its lifetime (multiplied with :ref:`color`). .. rst-class:: classref-item-separator @@ -1477,6 +1485,23 @@ Each particle's vertical scale will vary along this :ref:`Curve`. S ---- +.. _class_CPUParticles2D_property_seed: + +.. rst-class:: classref-property + +:ref:`int` **seed** = ``0`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_seed**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_seed**\ (\ ) + +Sets the random seed used by the particle system. Only effective if :ref:`use_fixed_seed` is ``true``. + +.. rst-class:: classref-item-separator + +---- + .. _class_CPUParticles2D_property_speed_scale: .. rst-class:: classref-property @@ -1592,6 +1617,23 @@ Minimum equivalent of :ref:`tangential_accel_max` **use_fixed_seed** = ``false`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_use_fixed_seed**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_use_fixed_seed**\ (\ ) + +If ``true``, particles will use the same seed for every simulation using the seed defined in :ref:`seed`. This is useful for situations where the visual outcome should be consistent across replays, for example when using Movie Maker mode. + .. rst-class:: classref-section-separator ---- @@ -1661,14 +1703,30 @@ Returns the enabled state of the given particle flag (see :ref:`ParticleFlags`\ ) :ref:`πŸ”—` + +Requests the particles to process for extra process time during a single frame. + +Useful for particle playback, if used in combination with :ref:`use_fixed_seed` or by calling :ref:`restart()` with parameter ``keep_seed`` set to ``true``. + +.. rst-class:: classref-item-separator + +---- + .. _class_CPUParticles2D_method_restart: .. rst-class:: classref-method -|void| **restart**\ (\ ) :ref:`πŸ”—` +|void| **restart**\ (\ keep_seed\: :ref:`bool` = false\ ) :ref:`πŸ”—` Restarts the particle emitter. +If ``keep_seed`` is ``true``, the current random seed will be preserved. Useful for seeking and playback. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index 99418a53cb4..7c55495c590 100644 --- a/classes/class_cpuparticles3d.rst +++ b/classes/class_cpuparticles3d.rst @@ -175,6 +175,8 @@ Properties +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ | :ref:`Curve` | :ref:`scale_curve_z` | | +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`int` | :ref:`seed` | ``0`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ | :ref:`float` | :ref:`speed_scale` | ``1.0`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ | :ref:`bool` | :ref:`split_scale` | ``false`` | @@ -187,6 +189,8 @@ Properties +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ | :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ + | :ref:`bool` | :ref:`use_fixed_seed` | ``false`` | + +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ | :ref:`AABB` | :ref:`visibility_aabb` | ``AABB(0, 0, 0, 0, 0, 0)`` | +---------------------------------------------------------+---------------------------------------------------------------------------------------------+----------------------------+ @@ -211,7 +215,9 @@ Methods +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`get_particle_flag`\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`restart`\ (\ ) | + | |void| | :ref:`request_particles_process`\ (\ process_time\: :ref:`float`\ ) | + +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`restart`\ (\ keep_seed\: :ref:`bool` = false\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`set_param_curve`\ (\ param\: :ref:`Parameter`, curve\: :ref:`Curve`\ ) | +---------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -294,7 +300,7 @@ enum **Parameter**: :ref:`πŸ”—` :ref:`Parameter` **PARAM_INITIAL_LINEAR_VELOCITY** = ``0`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set initial velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set initial velocity properties. .. _class_CPUParticles3D_constant_PARAM_ANGULAR_VELOCITY: @@ -302,7 +308,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANGULAR_VELOCITY** = ``1`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angular velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set angular velocity properties. .. _class_CPUParticles3D_constant_PARAM_ORBIT_VELOCITY: @@ -310,7 +316,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ORBIT_VELOCITY** = ``2`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set orbital velocity properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set orbital velocity properties. .. _class_CPUParticles3D_constant_PARAM_LINEAR_ACCEL: @@ -318,7 +324,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_LINEAR_ACCEL** = ``3`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set linear acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set linear acceleration properties. .. _class_CPUParticles3D_constant_PARAM_RADIAL_ACCEL: @@ -326,7 +332,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_RADIAL_ACCEL** = ``4`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set radial acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set radial acceleration properties. .. _class_CPUParticles3D_constant_PARAM_TANGENTIAL_ACCEL: @@ -334,7 +340,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_TANGENTIAL_ACCEL** = ``5`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set tangential acceleration properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set tangential acceleration properties. .. _class_CPUParticles3D_constant_PARAM_DAMPING: @@ -342,7 +348,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_DAMPING** = ``6`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set damping properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set damping properties. .. _class_CPUParticles3D_constant_PARAM_ANGLE: @@ -350,7 +356,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANGLE** = ``7`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set angle properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set angle properties. .. _class_CPUParticles3D_constant_PARAM_SCALE: @@ -358,7 +364,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_SCALE** = ``8`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set scale properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set scale properties. .. _class_CPUParticles3D_constant_PARAM_HUE_VARIATION: @@ -366,7 +372,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_HUE_VARIATION** = ``9`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set hue variation properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set hue variation properties. .. _class_CPUParticles3D_constant_PARAM_ANIM_SPEED: @@ -374,7 +380,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANIM_SPEED** = ``10`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation speed properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set animation speed properties. .. _class_CPUParticles3D_constant_PARAM_ANIM_OFFSET: @@ -382,7 +388,7 @@ Use with :ref:`set_param_min`, :ref:` :ref:`Parameter` **PARAM_ANIM_OFFSET** = ``11`` -Use with :ref:`set_param_min`, :ref:`set_param_max`, and :ref:`set_param_curve` to set animation offset properties. +Use with :ref:`set_param_min()`, :ref:`set_param_max()`, and :ref:`set_param_curve()` to set animation offset properties. .. _class_CPUParticles3D_constant_PARAM_MAX: @@ -408,7 +414,7 @@ enum **ParticleFlags**: :ref:`πŸ”—` :ref:`ParticleFlags` **PARTICLE_FLAG_ALIGN_Y_TO_VELOCITY** = ``0`` -Use with :ref:`set_particle_flag` to set :ref:`particle_flag_align_y`. +Use with :ref:`set_particle_flag()` to set :ref:`particle_flag_align_y`. .. _class_CPUParticles3D_constant_PARTICLE_FLAG_ROTATE_Y: @@ -416,7 +422,7 @@ Use with :ref:`set_particle_flag` :ref:`ParticleFlags` **PARTICLE_FLAG_ROTATE_Y** = ``1`` -Use with :ref:`set_particle_flag` to set :ref:`particle_flag_rotate_y`. +Use with :ref:`set_particle_flag()` to set :ref:`particle_flag_rotate_y`. .. _class_CPUParticles3D_constant_PARTICLE_FLAG_DISABLE_Z: @@ -424,7 +430,7 @@ Use with :ref:`set_particle_flag` :ref:`ParticleFlags` **PARTICLE_FLAG_DISABLE_Z** = ``2`` -Use with :ref:`set_particle_flag` to set :ref:`particle_flag_disable_z`. +Use with :ref:`set_particle_flag()` to set :ref:`particle_flag_disable_z`. .. _class_CPUParticles3D_constant_PARTICLE_FLAG_MAX: @@ -768,7 +774,7 @@ Each particle's initial color. - |void| **set_color_initial_ramp**\ (\ value\: :ref:`Gradient`\ ) - :ref:`Gradient` **get_color_initial_ramp**\ (\ ) -Each particle's initial color will vary along this :ref:`GradientTexture1D` (multiplied with :ref:`color`). +Each particle's initial color will vary along this :ref:`Gradient` (multiplied with :ref:`color`). \ **Note:** :ref:`color_initial_ramp` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`color_initial_ramp` will have no visible effect. @@ -787,7 +793,7 @@ Each particle's initial color will vary along this :ref:`GradientTexture1D`\ ) - :ref:`Gradient` **get_color_ramp**\ (\ ) -Each particle's color will vary along this :ref:`GradientTexture1D` over its lifetime (multiplied with :ref:`color`). +Each particle's color will vary along this :ref:`Gradient` over its lifetime (multiplied with :ref:`color`). \ **Note:** :ref:`color_ramp` multiplies the particle mesh's vertex colors. To have a visible effect on a :ref:`BaseMaterial3D`, :ref:`BaseMaterial3D.vertex_color_use_as_albedo` *must* be ``true``. For a :ref:`ShaderMaterial`, ``ALBEDO *= COLOR.rgb;`` must be inserted in the shader's ``fragment()`` function. Otherwise, :ref:`color_ramp` will have no visible effect. @@ -1689,6 +1695,23 @@ Curve for the scale over life, along the z axis. ---- +.. _class_CPUParticles3D_property_seed: + +.. rst-class:: classref-property + +:ref:`int` **seed** = ``0`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_seed**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_seed**\ (\ ) + +Sets the random seed used by the particle system. Only effective if :ref:`use_fixed_seed` is ``true``. + +.. rst-class:: classref-item-separator + +---- + .. _class_CPUParticles3D_property_speed_scale: .. rst-class:: classref-property @@ -1791,6 +1814,23 @@ Minimum tangent acceleration. ---- +.. _class_CPUParticles3D_property_use_fixed_seed: + +.. rst-class:: classref-property + +:ref:`bool` **use_fixed_seed** = ``false`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_use_fixed_seed**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_use_fixed_seed**\ (\ ) + +If ``true``, particles will use the same seed for every simulation using the seed defined in :ref:`seed`. This is useful for situations where the visual outcome should be consistent across replays, for example when using Movie Maker mode. + +.. rst-class:: classref-item-separator + +---- + .. _class_CPUParticles3D_property_visibility_aabb: .. rst-class:: classref-property @@ -1887,14 +1927,30 @@ Returns the enabled state of the given particle flag (see :ref:`ParticleFlags`\ ) :ref:`πŸ”—` + +Requests the particles to process for extra process time during a single frame. + +Useful for particle playback, if used in combination with :ref:`use_fixed_seed` or by calling :ref:`restart()` with parameter ``keep_seed`` set to ``true``. + +.. rst-class:: classref-item-separator + +---- + .. _class_CPUParticles3D_method_restart: .. rst-class:: classref-method -|void| **restart**\ (\ ) :ref:`πŸ”—` +|void| **restart**\ (\ keep_seed\: :ref:`bool` = false\ ) :ref:`πŸ”—` Restarts the particle emitter. +If ``keep_seed`` is ``true``, the current random seed will be preserved. Useful for seeking and playback. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_crypto.rst b/classes/class_crypto.rst index cb33d1c874b..3f859552aee 100644 --- a/classes/class_crypto.rst +++ b/classes/class_crypto.rst @@ -190,7 +190,7 @@ Generates a :ref:`PackedByteArray` of cryptographically s :ref:`CryptoKey` **generate_rsa**\ (\ size\: :ref:`int`\ ) :ref:`πŸ”—` -Generates an RSA :ref:`CryptoKey` that can be used for creating self-signed certificates and passed to :ref:`StreamPeerTLS.accept_stream`. +Generates an RSA :ref:`CryptoKey` that can be used for creating self-signed certificates and passed to :ref:`StreamPeerTLS.accept_stream()`. .. rst-class:: classref-item-separator diff --git a/classes/class_cryptokey.rst b/classes/class_cryptokey.rst index 6ec058b5633..942dc8153cb 100644 --- a/classes/class_cryptokey.rst +++ b/classes/class_cryptokey.rst @@ -21,7 +21,7 @@ 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:`StreamPeerTLS.accept_stream` along with the appropriate certificate. +They can be used to generate a self-signed :ref:`X509Certificate` via :ref:`Crypto.generate_self_signed_certificate()` and as private key in :ref:`StreamPeerTLS.accept_stream()` along with the appropriate certificate. .. rst-class:: classref-introduction-group diff --git a/classes/class_csgpolygon3d.rst b/classes/class_csgpolygon3d.rst index 40319b8da1a..209e5f35cf2 100644 --- a/classes/class_csgpolygon3d.rst +++ b/classes/class_csgpolygon3d.rst @@ -38,39 +38,41 @@ Properties .. table:: :widths: auto - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`float` | :ref:`depth` | ``1.0`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`Material` | :ref:`material` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`Mode` | :ref:`mode` | ``0`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`bool` | :ref:`path_continuous_u` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`float` | :ref:`path_interval` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`PathIntervalType` | :ref:`path_interval_type` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`bool` | :ref:`path_joined` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`bool` | :ref:`path_local` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`NodePath` | :ref:`path_node` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`PathRotation` | :ref:`path_rotation` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`float` | :ref:`path_simplify_angle` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`float` | :ref:`path_u_distance` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`bool` | :ref:`smooth_faces` | ``false`` | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`float` | :ref:`spin_degrees` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ - | :ref:`int` | :ref:`spin_sides` | | - +-------------------------------------------------------------+-----------------------------------------------------------------------------+------------------------------------------------+ + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`float` | :ref:`depth` | ``1.0`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`Material` | :ref:`material` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`Mode` | :ref:`mode` | ``0`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`bool` | :ref:`path_continuous_u` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`float` | :ref:`path_interval` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`PathIntervalType` | :ref:`path_interval_type` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`bool` | :ref:`path_joined` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`bool` | :ref:`path_local` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`NodePath` | :ref:`path_node` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`PathRotation` | :ref:`path_rotation` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`bool` | :ref:`path_rotation_accurate` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`float` | :ref:`path_simplify_angle` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`float` | :ref:`path_u_distance` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`polygon` | ``PackedVector2Array(0, 0, 0, 1, 1, 1, 1, 0)`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`bool` | :ref:`smooth_faces` | ``false`` | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`float` | :ref:`spin_degrees` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ + | :ref:`int` | :ref:`spin_sides` | | + +-------------------------------------------------------------+-----------------------------------------------------------------------------------+------------------------------------------------+ .. rst-class:: classref-section-separator @@ -354,6 +356,23 @@ When :ref:`mode` is :ref:`MODE_PATH` **path_rotation_accurate** :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_path_rotation_accurate**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_path_rotation_accurate**\ (\ ) + +When :ref:`mode` is :ref:`MODE_PATH`, if ``true`` the polygon will be rotated according to the proper tangent of the path at the sampled points. If ``false`` an approximation is used, which decreases in accuracy as the number of subdivisions decreases. + +.. rst-class:: classref-item-separator + +---- + .. _class_CSGPolygon3D_property_path_simplify_angle: .. rst-class:: classref-property diff --git a/classes/class_csgshape3d.rst b/classes/class_csgshape3d.rst index b0f946e68e1..2a79078e25c 100644 --- a/classes/class_csgshape3d.rst +++ b/classes/class_csgshape3d.rst @@ -23,15 +23,13 @@ Description This is the CSG base class that provides CSG operation support to the various CSG nodes in Redot. -\ **Performance:** CSG nodes are only intended for prototyping as they have a significant CPU performance cost. - -Consider baking final CSG operation results into static geometry that replaces the CSG nodes. +\ **Performance:** CSG nodes are only intended for prototyping as they have a significant CPU performance cost. Consider baking final CSG operation results into static geometry that replaces the CSG nodes. Individual CSG root node results can be baked to nodes with static resources with the editor menu that appears when a CSG root node is selected. -Individual CSG root nodes can also be baked to static resources with scripts by calling :ref:`bake_static_mesh` for the visual mesh or :ref:`bake_collision_shape` for the physics collision. +Individual CSG root nodes can also be baked to static resources with scripts by calling :ref:`bake_static_mesh()` for the visual mesh or :ref:`bake_collision_shape()` for the physics collision. -Entire scenes of CSG nodes can be baked to static geometry and exported with the editor gltf scene exporter. +Entire scenes of CSG nodes can be baked to static geometry and exported with the editor glTF scene exporter: **Scene > Export As... > glTF 2.0 Scene...** .. rst-class:: classref-introduction-group @@ -149,7 +147,7 @@ Property Descriptions - |void| **set_calculate_tangents**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_calculating_tangents**\ (\ ) -Calculate tangents for the CSG shape which allows the use of normal maps. This is only applied on the root shape, this setting is ignored on any child. +Calculate tangents for the CSG shape which allows the use of normal and height maps. This is only applied on the root shape, this setting is ignored on any child. Setting this to ``false`` can speed up shape generation slightly. .. rst-class:: classref-item-separator @@ -278,6 +276,8 @@ Returns a baked physics :ref:`ConcavePolygonShape3D \ **Performance:** If the CSG operation results in a very detailed geometry with many faces physics performance will be very slow. Concave shapes should in general only be used for static level geometry and not with dynamic objects that are moving. +\ **Note:** CSG mesh data updates are deferred, which means they are updated with a delay of one rendered frame. To avoid getting an empty shape or outdated mesh data, make sure to call ``await get_tree().process_frame`` before using :ref:`bake_collision_shape()` in :ref:`Node._ready()` or after changing properties on the **CSGShape3D**. + .. rst-class:: classref-item-separator ---- @@ -290,6 +290,8 @@ Returns a baked physics :ref:`ConcavePolygonShape3D Returns a baked static :ref:`ArrayMesh` of this node's CSG operation result. Materials from involved CSG nodes are added as extra mesh surfaces. Returns an empty mesh if the node is not a CSG root node or has no valid geometry. +\ **Note:** CSG mesh data updates are deferred, which means they are updated with a delay of one rendered frame. To avoid getting an empty mesh or outdated mesh data, make sure to call ``await get_tree().process_frame`` before using :ref:`bake_static_mesh()` in :ref:`Node._ready()` or after changing properties on the **CSGShape3D**. + .. rst-class:: classref-item-separator ---- @@ -326,6 +328,8 @@ Returns whether or not the specified layer of the :ref:`collision_mask` with two elements, the first is the :ref:`Transform3D` of this node and the second is the root :ref:`Mesh` of this node. Only works when this node is the root shape. +\ **Note:** CSG mesh data updates are deferred, which means they are updated with a delay of one rendered frame. To avoid getting an empty shape or outdated mesh data, make sure to call ``await get_tree().process_frame`` before using :ref:`get_meshes()` in :ref:`Node._ready()` or after changing properties on the **CSGShape3D**. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_cubemap.rst b/classes/class_cubemap.rst index 4232255e3af..543cf940f88 100644 --- a/classes/class_cubemap.rst +++ b/classes/class_cubemap.rst @@ -23,15 +23,17 @@ A cubemap is made of 6 textures organized in layers. They are typically used for This resource is typically used as a uniform in custom shaders. Few core Redot methods make use of **Cubemap** resources. -To create such a texture file yourself, reimport your image files using the Redot Editor import presets. The expected image order is X+, X-, Y+, Y-, Z+, Z- (in Redot's coordinate system, so Y+ is "up" and Z- is "forward"). You can use one of the following templates as a base: +To create such a texture file yourself, reimport your image files using the Redot Editor import presets. To create a Cubemap from code, use :ref:`ImageTextureLayered.create_from_images()` on an instance of the Cubemap class. -- `2Γ—3 cubemap template (default layout option) `__\ +The expected image order is X+, X-, Y+, Y-, Z+, Z- (in Redot's coordinate system, so Y+ is "up" and Z- is "forward"). You can use one of the following templates as a base: -- `3Γ—2 cubemap template `__\ +- `2Γ—3 cubemap template (default layout option) `__\ -- `1Γ—6 cubemap template `__\ +- `3Γ—2 cubemap template `__\ -- `6Γ—1 cubemap template `__\ +- `1Γ—6 cubemap template `__\ + +- `6Γ—1 cubemap template `__\ \ **Note:** Redot doesn't support using cubemaps in a :ref:`PanoramaSkyMaterial`. To use a cubemap as a skybox, convert the default :ref:`PanoramaSkyMaterial` to a :ref:`ShaderMaterial` using the **Convert to ShaderMaterial** resource dropdown option, then replace its code with the following: diff --git a/classes/class_cubemaparray.rst b/classes/class_cubemaparray.rst index a9f5aec0550..2eccbf19806 100644 --- a/classes/class_cubemaparray.rst +++ b/classes/class_cubemaparray.rst @@ -23,9 +23,23 @@ Description The primary benefit of **CubemapArray**\ s is that they can be accessed in shader code using a single texture reference. In other words, you can pass multiple :ref:`Cubemap`\ s into a shader using a single **CubemapArray**. :ref:`Cubemap`\ s are allocated in adjacent cache regions on the GPU, which makes **CubemapArray**\ s the most efficient way to store multiple :ref:`Cubemap`\ s. -\ **Note:** Redot uses **CubemapArray**\ s internally for many effects, including the :ref:`Sky` if you set :ref:`ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections` to ``true``. To create such a texture file yourself, reimport your image files using the import presets of the File System dock. +Redot uses **CubemapArray**\ s internally for many effects, including the :ref:`Sky` if you set :ref:`ProjectSettings.rendering/reflections/sky_reflections/texture_array_reflections` to ``true``. -\ **Note:** **CubemapArray** is not supported in the Compatibility renderer. +To create such a texture file yourself, reimport your image files using the Redot Editor import presets. To create a CubemapArray from code, use :ref:`ImageTextureLayered.create_from_images()` on an instance of the CubemapArray class. + +The expected image order is X+, X-, Y+, Y-, Z+, Z- (in Redot's coordinate system, so Y+ is "up" and Z- is "forward"). You can use one of the following templates as a base: + +- `2Γ—3 cubemap template (default layout option) `__\ + +- `3Γ—2 cubemap template `__\ + +- `1Γ—6 cubemap template `__\ + +- `6Γ—1 cubemap template `__\ + +Multiple layers are stacked on top of each other when using the default vertical import option (with the first layer at the top). Alternatively, you can choose an horizontal layout in the import options (with the first layer at the left). + +\ **Note:** **CubemapArray** is not supported in the Compatibility renderer due to graphics API limitations. .. rst-class:: classref-reftable-group diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index 10dff8229f3..87b89f666b0 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -105,7 +105,7 @@ Property Descriptions - |void| **set_bake_interval**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_bake_interval**\ (\ ) -The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points` or :ref:`get_baked_length` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. +The distance in pixels between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points()` or :ref:`get_baked_length()` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. .. rst-class:: classref-item-separator @@ -189,7 +189,7 @@ Returns the cache of points as a :ref:`PackedVector2Array` **get_closest_offset**\ (\ to_point\: :ref:`Vector2`\ ) |const| :ref:`πŸ”—` -Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked`. +Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked()`. \ ``to_point`` must be in this curve's local space. @@ -295,7 +295,7 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and :ref:`Transform2D` **sample_baked_with_rotation**\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Similar to :ref:`sample_baked`, but returns :ref:`Transform2D` that includes a rotation along the curve, with :ref:`Transform2D.origin` as the point position and the :ref:`Transform2D.x` vector pointing in the direction of the path at that point. Returns an empty transform if the length of the curve is ``0``. +Similar to :ref:`sample_baked()`, but returns :ref:`Transform2D` that includes a rotation along the curve, with :ref:`Transform2D.origin` as the point position and the :ref:`Transform2D.x` vector pointing in the direction of the path at that point. Returns an empty transform if the length of the curve is ``0``. :: @@ -316,7 +316,7 @@ Similar to :ref:`sample_baked`, but returns : :ref:`Vector2` **samplef**\ (\ fofs\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns the position at the vertex ``fofs``. It calls :ref:`sample` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. +Returns the position at the vertex ``fofs``. It calls :ref:`sample()` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. .. rst-class:: classref-item-separator diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 48aece00eef..31ec9649f68 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -119,7 +119,7 @@ Property Descriptions - |void| **set_bake_interval**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_bake_interval**\ (\ ) -The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points` or :ref:`get_baked_length` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. +The distance in meters between two adjacent cached points. Changing it forces the cache to be recomputed the next time the :ref:`get_baked_points()` or :ref:`get_baked_length()` function is called. The smaller the distance, the more points in the cache and the more memory it will consume, so use with care. .. rst-class:: classref-item-separator @@ -263,7 +263,7 @@ If :ref:`up_vector_enabled` is ``false :ref:`float` **get_closest_offset**\ (\ to_point\: :ref:`Vector3`\ ) |const| :ref:`πŸ”—` -Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked` or :ref:`sample_baked_up_vector`. +Returns the closest offset to ``to_point``. This offset is meant to be used in :ref:`sample_baked()` or :ref:`sample_baked_up_vector()`. \ ``to_point`` must be in this curve's local space. @@ -393,7 +393,7 @@ If the curve has no up vectors, the function sends an error to the console, and :ref:`Transform3D` **sample_baked_with_rotation**\ (\ offset\: :ref:`float` = 0.0, cubic\: :ref:`bool` = false, apply_tilt\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Returns a :ref:`Transform3D` with ``origin`` as point position, ``basis.x`` as sideway vector, ``basis.y`` as up vector, ``basis.z`` as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. See also :ref:`sample_baked`. +Returns a :ref:`Transform3D` with ``origin`` as point position, ``basis.x`` as sideway vector, ``basis.y`` as up vector, ``basis.z`` as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. See also :ref:`sample_baked()`. .. rst-class:: classref-item-separator @@ -405,7 +405,7 @@ Returns a :ref:`Transform3D` with ``origin`` as point positio :ref:`Vector3` **samplef**\ (\ fofs\: :ref:`float`\ ) |const| :ref:`πŸ”—` -Returns the position at the vertex ``fofs``. It calls :ref:`sample` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. +Returns the position at the vertex ``fofs``. It calls :ref:`sample()` using the integer part of ``fofs`` as ``idx``, and its fractional part as ``t``. .. rst-class:: classref-item-separator diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 414acd34735..3515f508789 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -185,7 +185,7 @@ The keys of a dictionary can be iterated with the ``for`` keyword: -\ **Note:** Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use :ref:`duplicate`. +\ **Note:** Dictionaries are always passed by reference. To get a copy of a dictionary which can be modified independently of the original dictionary, use :ref:`duplicate()`. \ **Note:** Erasing elements while iterating over dictionaries is **not** supported and will result in unpredictable behavior. @@ -347,7 +347,7 @@ Creates a typed dictionary from the ``base`` dictionary. A typed dictionary can :ref:`Dictionary` **Dictionary**\ (\ from\: :ref:`Dictionary`\ ) -Returns the same dictionary as ``from``. If you need a copy of the dictionary, use :ref:`duplicate`. +Returns the same dictionary as ``from``. If you need a copy of the dictionary, use :ref:`duplicate()`. .. rst-class:: classref-section-separator @@ -402,7 +402,7 @@ Creates and returns a new copy of the dictionary. If ``deep`` is ``true``, inner Removes the dictionary entry by key, if it exists. Returns ``true`` if the given ``key`` existed in the dictionary, otherwise ``false``. -\ **Note:** Do not erase entries while iterating over the dictionary. You can iterate over the :ref:`keys` array instead. +\ **Note:** Do not erase entries while iterating over the dictionary. You can iterate over the :ref:`keys()` array instead. .. rst-class:: classref-item-separator @@ -416,7 +416,7 @@ Removes the dictionary entry by key, if it exists. Returns ``true`` if the given Finds and returns the first key whose associated value is equal to ``value``, or ``null`` if it is not found. -\ **Note:** ``null`` is also a valid key. If inside the dictionary, :ref:`find_key` may give misleading results. +\ **Note:** ``null`` is also a valid key. If inside the dictionary, :ref:`find_key()` may give misleading results. .. rst-class:: classref-item-separator @@ -440,7 +440,7 @@ Returns the corresponding value for the given ``key`` in the dictionary. If the :ref:`Variant` **get_or_add**\ (\ key\: :ref:`Variant`, default\: :ref:`Variant` = null\ ) :ref:`πŸ”—` -Gets a value and ensures the key is set. If the ``key`` exists in the dictionary, this behaves like :ref:`get`. Otherwise, the ``default`` value is inserted into the dictionary and returned. +Gets a value and ensures the key is set. If the ``key`` exists in the dictionary, this behaves like :ref:`get()`. Otherwise, the ``default`` value is inserted into the dictionary and returned. .. rst-class:: classref-item-separator @@ -452,7 +452,7 @@ Gets a value and ensures the key is set. If the ``key`` exists in the dictionary :ref:`int` **get_typed_key_builtin**\ (\ ) |const| :ref:`πŸ”—` -Returns the built-in :ref:`Variant` type of the typed dictionary's keys as a :ref:`Variant.Type` constant. If the keys are not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed_key`. +Returns the built-in :ref:`Variant` type of the typed dictionary's keys as a :ref:`Variant.Type` constant. If the keys are not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed_key()`. .. rst-class:: classref-item-separator @@ -464,7 +464,7 @@ Returns the built-in :ref:`Variant` type of the typed dictionary' :ref:`StringName` **get_typed_key_class_name**\ (\ ) |const| :ref:`πŸ”—` -Returns the **built-in** class name of the typed dictionary's keys, if the built-in :ref:`Variant` type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed_key` and :ref:`Object.get_class`. +Returns the **built-in** class name of the typed dictionary's keys, if the built-in :ref:`Variant` type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed_key()` and :ref:`Object.get_class()`. .. rst-class:: classref-item-separator @@ -476,7 +476,7 @@ Returns the **built-in** class name of the typed dictionary's keys, if the built :ref:`Variant` **get_typed_key_script**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`Script` instance associated with this typed dictionary's keys, or ``null`` if it does not exist. See also :ref:`is_typed_key`. +Returns the :ref:`Script` instance associated with this typed dictionary's keys, or ``null`` if it does not exist. See also :ref:`is_typed_key()`. .. rst-class:: classref-item-separator @@ -488,7 +488,7 @@ Returns the :ref:`Script` instance associated with this typed dict :ref:`int` **get_typed_value_builtin**\ (\ ) |const| :ref:`πŸ”—` -Returns the built-in :ref:`Variant` type of the typed dictionary's values as a :ref:`Variant.Type` constant. If the values are not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed_value`. +Returns the built-in :ref:`Variant` type of the typed dictionary's values as a :ref:`Variant.Type` constant. If the values are not typed, returns :ref:`@GlobalScope.TYPE_NIL`. See also :ref:`is_typed_value()`. .. rst-class:: classref-item-separator @@ -500,7 +500,7 @@ Returns the built-in :ref:`Variant` type of the typed dictionary' :ref:`StringName` **get_typed_value_class_name**\ (\ ) |const| :ref:`πŸ”—` -Returns the **built-in** class name of the typed dictionary's values, if the built-in :ref:`Variant` type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed_value` and :ref:`Object.get_class`. +Returns the **built-in** class name of the typed dictionary's values, if the built-in :ref:`Variant` type is :ref:`@GlobalScope.TYPE_OBJECT`. Otherwise, returns an empty :ref:`StringName`. See also :ref:`is_typed_value()` and :ref:`Object.get_class()`. .. rst-class:: classref-item-separator @@ -512,7 +512,7 @@ Returns the **built-in** class name of the typed dictionary's values, if the bui :ref:`Variant` **get_typed_value_script**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`Script` instance associated with this typed dictionary's values, or ``null`` if it does not exist. See also :ref:`is_typed_value`. +Returns the :ref:`Script` instance associated with this typed dictionary's values, or ``null`` if it does not exist. See also :ref:`is_typed_value()`. .. rst-class:: classref-item-separator @@ -626,7 +626,7 @@ Returns a hashed 32-bit integer value representing the dictionary contents. :ref:`bool` **is_empty**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the dictionary is empty (its size is ``0``). See also :ref:`size`. +Returns ``true`` if the dictionary is empty (its size is ``0``). See also :ref:`size()`. .. rst-class:: classref-item-separator @@ -638,7 +638,7 @@ Returns ``true`` if the dictionary is empty (its size is ``0``). See also :ref:` :ref:`bool` **is_read_only**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the dictionary is read-only. See :ref:`make_read_only`. Dictionaries are automatically read-only if declared with ``const`` keyword. +Returns ``true`` if the dictionary is read-only. See :ref:`make_read_only()`. Dictionaries are automatically read-only if declared with ``const`` keyword. .. rst-class:: classref-item-separator @@ -788,7 +788,7 @@ Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys -\ **Note:** :ref:`merge` is *not* recursive. Nested dictionaries are considered as keys that can be overwritten or not depending on the value of ``overwrite``, but they will never be merged together. +\ **Note:** :ref:`merge()` is *not* recursive. Nested dictionaries are considered as keys that can be overwritten or not depending on the value of ``overwrite``, but they will never be merged together. .. rst-class:: classref-item-separator @@ -800,7 +800,7 @@ Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys :ref:`Dictionary` **merged**\ (\ dictionary\: :ref:`Dictionary`, overwrite\: :ref:`bool` = false\ ) |const| :ref:`πŸ”—` -Returns a copy of this dictionary merged with the other ``dictionary``. By default, duplicate keys are not copied over, unless ``overwrite`` is ``true``. See also :ref:`merge`. +Returns a copy of this dictionary merged with the other ``dictionary``. By default, duplicate keys are not copied over, unless ``overwrite`` is ``true``. See also :ref:`merge()`. This method is useful for quickly making dictionaries with default values: @@ -847,7 +847,7 @@ Sets the value of the element at the given ``key`` to the given ``value``. This :ref:`int` **size**\ (\ ) |const| :ref:`πŸ”—` -Returns the number of entries in the dictionary. Empty dictionaries (``{ }``) always return ``0``. See also :ref:`is_empty`. +Returns the number of entries in the dictionary. Empty dictionaries (``{ }``) always return ``0``. See also :ref:`is_empty()`. .. rst-class:: classref-item-separator @@ -859,7 +859,20 @@ Returns the number of entries in the dictionary. Empty dictionaries (``{ }``) al |void| **sort**\ (\ ) :ref:`πŸ”—` -Sorts the dictionary in-place by key. This can be used to ensure dictionaries with the same contents produce equivalent results when getting the :ref:`keys`, getting the :ref:`values`, and converting to a string. This is also useful when wanting a JSON representation consistent with what is in memory, and useful for storing on a database that requires dictionaries to be sorted. +Sorts the dictionary in ascending order, by key. The final order is dependent on the "less than" (``<``) comparison between keys. + + +.. tabs:: + + .. code-tab:: gdscript + + var numbers = { "c": 2, "a": 0, "b": 1 } + numbers.sort() + print(numbers) # Prints { "a": 0, "b": 1, "c": 2 } + + + +This method ensures that the dictionary's entries are ordered consistently when :ref:`keys()` or :ref:`values()` are called, or when the dictionary needs to be converted to a string through :ref:`@GlobalScope.str()` or :ref:`JSON.stringify()`. .. rst-class:: classref-item-separator @@ -914,7 +927,7 @@ Returns ``true`` if the two dictionaries contain the same keys and values. The o :ref:`Variant` **operator []**\ (\ key\: :ref:`Variant`\ ) :ref:`πŸ”—` -Returns the corresponding value for the given ``key`` in the dictionary. If the entry does not exist, fails and returns ``null``. For safe access, use :ref:`get` or :ref:`has`. +Returns the corresponding value for the given ``key`` in the dictionary. If the entry does not exist, fails and returns ``null``. For safe access, use :ref:`get()` or :ref:`has()`. .. |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_diraccess.rst b/classes/class_diraccess.rst index d82b8bc1720..40ff4058cf8 100644 --- a/classes/class_diraccess.rst +++ b/classes/class_diraccess.rst @@ -89,7 +89,7 @@ Here is an example on how to iterate through the files of a directory: -Keep in mind that file names may change or be remapped after export. If you want to see the actual resource file list as it appears in the editor, use :ref:`ResourceLoader.list_directory` instead. +Keep in mind that file names may change or be remapped after export. If you want to see the actual resource file list as it appears in the editor, use :ref:`ResourceLoader.list_directory()` instead. .. rst-class:: classref-introduction-group @@ -165,6 +165,8 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_case_sensitive`\ (\ path\: :ref:`String`\ ) |const| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_equivalent`\ (\ path_a\: :ref:`String`, path_b\: :ref:`String`\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_link`\ (\ path\: :ref:`String`\ ) | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`list_dir_begin`\ (\ ) | @@ -214,7 +216,7 @@ Property Descriptions If ``true``, hidden files are included when navigating the directory. -Affects :ref:`list_dir_begin`, :ref:`get_directories` and :ref:`get_files`. +Affects :ref:`list_dir_begin()`, :ref:`get_directories()` and :ref:`get_files()`. .. rst-class:: classref-item-separator @@ -233,7 +235,7 @@ Affects :ref:`list_dir_begin`, :ref:`get_ If ``true``, ``.`` and ``..`` are included when navigating the directory. -Affects :ref:`list_dir_begin` and :ref:`get_directories`. +Affects :ref:`list_dir_begin()` and :ref:`get_directories()`. .. rst-class:: classref-section-separator @@ -254,7 +256,7 @@ Changes the currently opened directory to the one passed as an argument. The arg Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). -\ **Note:** The new directory must be within the same scope, e.g. when you had opened a directory inside ``res://``, you can't change it to ``user://`` directory. If you need to open a directory in another access scope, use :ref:`open` to create a new instance instead. +\ **Note:** The new directory must be within the same scope, e.g. when you had opened a directory inside ``res://``, you can't change it to ``user://`` directory. If you need to open a directory in another access scope, use :ref:`open()` to create a new instance instead. .. rst-class:: classref-item-separator @@ -282,7 +284,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ :ref:`Error` **copy_absolute**\ (\ from\: :ref:`String`, to\: :ref:`String`, chmod_flags\: :ref:`int` = -1\ ) |static| :ref:`πŸ”—` -Static version of :ref:`copy`. Supports only absolute paths. +Static version of :ref:`copy()`. Supports only absolute paths. .. rst-class:: classref-item-separator @@ -316,7 +318,7 @@ If ``prefix`` is not empty, it will be prefixed to the directory name, separated If ``keep`` is ``true``, the directory is not deleted when the returned **DirAccess** is freed. -Returns ``null`` if opening the directory failed. You can use :ref:`get_open_error` to check the error that occurred. +Returns ``null`` if opening the directory failed. You can use :ref:`get_open_error()` to check the error that occurred. .. rst-class:: classref-item-separator @@ -328,7 +330,7 @@ Returns ``null`` if opening the directory failed. You can use :ref:`get_open_err :ref:`bool` **current_is_dir**\ (\ ) |const| :ref:`πŸ”—` -Returns whether the current item processed with the last :ref:`get_next` call is a directory (``.`` and ``..`` are considered directories). +Returns whether the current item processed with the last :ref:`get_next()` call is a directory (``.`` and ``..`` are considered directories). .. rst-class:: classref-item-separator @@ -354,7 +356,7 @@ Returns whether the target directory exists. The argument can be relative to the :ref:`bool` **dir_exists_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Static version of :ref:`dir_exists`. Supports only absolute paths. +Static version of :ref:`dir_exists()`. Supports only absolute paths. \ **Note:** The returned :ref:`bool` in the editor and after exporting when used on a path in the ``res://`` directory may be different. Some files are converted to engine-specific formats when exported, potentially changing the directory structure. @@ -370,9 +372,9 @@ Static version of :ref:`dir_exists`. Supports Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path. -For a static equivalent, use :ref:`FileAccess.file_exists`. +For a static equivalent, use :ref:`FileAccess.file_exists()`. -\ **Note:** Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See :ref:`ResourceLoader.exists` for an alternative approach that takes resource remapping into account. +\ **Note:** Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See :ref:`ResourceLoader.exists()` for an alternative approach that takes resource remapping into account. .. rst-class:: classref-item-separator @@ -396,7 +398,7 @@ Returns the absolute path to the currently opened directory (e.g. ``res://folder :ref:`int` **get_current_drive**\ (\ ) :ref:`πŸ”—` -Returns the currently opened directory's drive index. See :ref:`get_drive_name` to convert returned index to the name of the drive. +Returns the currently opened directory's drive index. See :ref:`get_drive_name()` to convert returned index to the name of the drive. .. rst-class:: classref-item-separator @@ -426,7 +428,7 @@ Affected by :ref:`include_hidden` and : Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding files, at the given ``path``. The array is sorted alphabetically. -Use :ref:`get_directories` if you want more control of what gets included. +Use :ref:`get_directories()` if you want more control of what gets included. \ **Note:** The returned directories in the editor and after exporting in the ``res://`` directory may differ as some files are converted to engine-specific formats when exported. @@ -494,7 +496,7 @@ Affected by :ref:`include_hidden`. Returns a :ref:`PackedStringArray` containing filenames of the directory contents, excluding directories, at the given ``path``. The array is sorted alphabetically. -Use :ref:`get_files` if you want more control of what gets included. +Use :ref:`get_files()` if you want more control of what gets included. \ **Note:** When used on a ``res://`` path in an exported project, only the files included in the PCK at the given folder level are returned. In practice, this means that since imported resources are stored in a top-level ``.godot/`` folder, only paths to ``.gd`` and ``.import`` files are returned (plus a few other files, such as ``project.godot`` or ``project.binary`` and the project icon). In an exported project, the list of returned files will also vary depending on :ref:`ProjectSettings.editor/export/convert_text_resources_to_binary`. @@ -510,7 +512,7 @@ Use :ref:`get_files` if you want more control Returns the next element (file or directory) in the current directory. -The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty :ref:`String` and closes the stream automatically (i.e. :ref:`list_dir_end` would not be mandatory in such a case). +The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty :ref:`String` and closes the stream automatically (i.e. :ref:`list_dir_end()` would not be mandatory in such a case). .. rst-class:: classref-item-separator @@ -522,7 +524,7 @@ The name of the file or directory is returned (and not its full path). Once the :ref:`Error` **get_open_error**\ (\ ) |static| :ref:`πŸ”—` -Returns the result of the last :ref:`open` call in the current thread. +Returns the result of the last :ref:`open()` call in the current thread. .. rst-class:: classref-item-separator @@ -568,6 +570,18 @@ Returns ``true`` if the file system or directory use case sensitive file names. ---- +.. _class_DirAccess_method_is_equivalent: + +.. rst-class:: classref-method + +:ref:`bool` **is_equivalent**\ (\ path_a\: :ref:`String`, path_b\: :ref:`String`\ ) |const| :ref:`πŸ”—` + +Returns ``true`` if paths ``path_a`` and ``path_b`` resolve to the same file system object. Returns ``false`` otherwise, even if the files are bit-for-bit identical (e.g., identical copies of the file that are not symbolic links). + +.. rst-class:: classref-item-separator + +---- + .. _class_DirAccess_method_is_link: .. rst-class:: classref-method @@ -588,11 +602,11 @@ Returns ``true`` if the file or directory is a symbolic link, directory junction :ref:`Error` **list_dir_begin**\ (\ ) :ref:`πŸ”—` -Initializes the stream used to list all files and directories using the :ref:`get_next` function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with :ref:`list_dir_end`. +Initializes the stream used to list all files and directories using the :ref:`get_next()` function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with :ref:`list_dir_end()`. Affected by :ref:`include_hidden` and :ref:`include_navigational`. -\ **Note:** The order of files and directories returned by this method is not deterministic, and can vary between operating systems. If you want a list of all files or folders sorted alphabetically, use :ref:`get_files` or :ref:`get_directories`. +\ **Note:** The order of files and directories returned by this method is not deterministic, and can vary between operating systems. If you want a list of all files or folders sorted alphabetically, use :ref:`get_files()` or :ref:`get_directories()`. .. rst-class:: classref-item-separator @@ -604,7 +618,7 @@ Affected by :ref:`include_hidden` and : |void| **list_dir_end**\ (\ ) :ref:`πŸ”—` -Closes the current stream opened with :ref:`list_dir_begin` (whether it has been fully processed with :ref:`get_next` does not matter). +Closes the current stream opened with :ref:`list_dir_begin()` (whether it has been fully processed with :ref:`get_next()` does not matter). .. rst-class:: classref-item-separator @@ -616,7 +630,7 @@ Closes the current stream opened with :ref:`list_dir_begin` **make_dir**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see :ref:`make_dir_recursive`). +Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see :ref:`make_dir_recursive()`). Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). @@ -630,7 +644,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ :ref:`Error` **make_dir_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Static version of :ref:`make_dir`. Supports only absolute paths. +Static version of :ref:`make_dir()`. Supports only absolute paths. .. rst-class:: classref-item-separator @@ -642,7 +656,7 @@ Static version of :ref:`make_dir`. Supports onl :ref:`Error` **make_dir_recursive**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Creates a target directory and all necessary intermediate directories in its path, by calling :ref:`make_dir` recursively. The argument can be relative to the current directory, or an absolute path. +Creates a target directory and all necessary intermediate directories in its path, by calling :ref:`make_dir()` recursively. The argument can be relative to the current directory, or an absolute path. Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). @@ -656,7 +670,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ :ref:`Error` **make_dir_recursive_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Static version of :ref:`make_dir_recursive`. Supports only absolute paths. +Static version of :ref:`make_dir_recursive()`. Supports only absolute paths. .. rst-class:: classref-item-separator @@ -670,7 +684,7 @@ Static version of :ref:`make_dir_recursive` to check the error that occurred. +Returns ``null`` if opening the directory failed. You can use :ref:`get_open_error()` to check the error that occurred. .. rst-class:: classref-item-separator @@ -698,7 +712,7 @@ Returns target of the symbolic link. Permanently deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. -If you don't want to delete the file/directory permanently, use :ref:`OS.move_to_trash` instead. +If you don't want to delete the file/directory permanently, use :ref:`OS.move_to_trash()` instead. Returns one of the :ref:`Error` code constants (:ref:`@GlobalScope.OK` on success). @@ -712,7 +726,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ :ref:`Error` **remove_absolute**\ (\ path\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Static version of :ref:`remove`. Supports only absolute paths. +Static version of :ref:`remove()`. Supports only absolute paths. .. rst-class:: classref-item-separator @@ -738,7 +752,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ :ref:`Error` **rename_absolute**\ (\ from\: :ref:`String`, to\: :ref:`String`\ ) |static| :ref:`πŸ”—` -Static version of :ref:`rename`. Supports only absolute paths. +Static version of :ref:`rename()`. Supports only absolute paths. .. |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_displayserver.rst b/classes/class_displayserver.rst index 6611e3d47f9..3cf35d5164b 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -31,383 +31,543 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`beep`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`clipboard_get`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`clipboard_get_image`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`clipboard_get_primary`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`clipboard_has`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`clipboard_has_image`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clipboard_set`\ (\ clipboard\: :ref:`String`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`clipboard_set_primary`\ (\ clipboard_primary\: :ref:`String`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`create_status_indicator`\ (\ icon\: :ref:`Texture2D`, tooltip\: :ref:`String`, callback\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CursorShape` | :ref:`cursor_get_shape`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`cursor_set_custom_image`\ (\ cursor\: :ref:`Resource`, shape\: :ref:`CursorShape` = 0, hotspot\: :ref:`Vector2` = Vector2(0, 0)\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`cursor_set_shape`\ (\ shape\: :ref:`CursorShape`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`delete_status_indicator`\ (\ id\: :ref:`int`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`dialog_input_text`\ (\ title\: :ref:`String`, description\: :ref:`String`, existing_text\: :ref:`String`, callback\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`dialog_show`\ (\ title\: :ref:`String`, description\: :ref:`String`, buttons\: :ref:`PackedStringArray`, callback\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`enable_for_stealing_focus`\ (\ process_id\: :ref:`int`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`file_dialog_show`\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, callback\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`file_dialog_with_options_show`\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, root\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, options\: :ref:`Array`\[:ref:`Dictionary`\], callback\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`force_process_and_drop_events`\ (\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_accent_color`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_base_color`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Rect2`\] | :ref:`get_display_cutouts`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i` | :ref:`get_display_safe_area`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_keyboard_focus_screen`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_name`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_primary_screen`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_screen_count`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_screen_from_rect`\ (\ rect\: :ref:`Rect2`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_swap_cancel_ok`\ (\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_window_at_screen_position`\ (\ position\: :ref:`Vector2i`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedInt32Array` | :ref:`get_window_list`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_check_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_icon_check_item`\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_icon_item`\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_icon_radio_check_item`\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_multistate_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, max_states\: :ref:`int`, default_state\: :ref:`int`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_radio_check_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_separator`\ (\ menu_root\: :ref:`String`, index\: :ref:`int` = -1\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_add_submenu_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, submenu\: :ref:`String`, index\: :ref:`int` = -1\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_clear`\ (\ menu_root\: :ref:`String`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Key` | :ref:`global_menu_get_item_accelerator`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Callable` | :ref:`global_menu_get_item_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_count`\ (\ menu_root\: :ref:`String`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`global_menu_get_item_icon`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_indentation_level`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_index_from_tag`\ (\ menu_root\: :ref:`String`, tag\: :ref:`Variant`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_index_from_text`\ (\ menu_root\: :ref:`String`, text\: :ref:`String`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Callable` | :ref:`global_menu_get_item_key_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_max_states`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`global_menu_get_item_state`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`global_menu_get_item_submenu`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`global_menu_get_item_tag`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`global_menu_get_item_text`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`global_menu_get_item_tooltip`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`global_menu_get_system_menu_roots`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`global_menu_is_item_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`global_menu_is_item_checked`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`global_menu_is_item_disabled`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`global_menu_is_item_hidden`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`global_menu_is_item_radio_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_remove_item`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_accelerator`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, keycode\: :ref:`Key`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, callback\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checkable\: :ref:`bool`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_checked`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checked\: :ref:`bool`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_disabled`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, disabled\: :ref:`bool`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_hidden`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, hidden\: :ref:`bool`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_hover_callbacks`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, callback\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_icon`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, icon\: :ref:`Texture2D`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_indentation_level`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, level\: :ref:`int`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_key_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, key_callback\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_max_states`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, max_states\: :ref:`int`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_radio_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checkable\: :ref:`bool`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_state`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, state\: :ref:`int`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_submenu`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, submenu\: :ref:`String`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_tag`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, tag\: :ref:`Variant`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_text`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, text\: :ref:`String`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_item_tooltip`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, tooltip\: :ref:`String`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`global_menu_set_popup_callbacks`\ (\ menu_root\: :ref:`String`, open_callback\: :ref:`Callable`, close_callback\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_additional_outputs`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_feature`\ (\ feature\: :ref:`Feature`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_hardware_keyboard`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`help_set_search_callbacks`\ (\ search_callback\: :ref:`Callable`, action_callback\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`ime_get_selection`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`ime_get_text`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_dark_mode`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_dark_mode_supported`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_touchscreen_available`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_window_transparency_available`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`keyboard_get_current_layout`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Key` | :ref:`keyboard_get_keycode_from_physical`\ (\ keycode\: :ref:`Key`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Key` | :ref:`keyboard_get_label_from_physical`\ (\ keycode\: :ref:`Key`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`keyboard_get_layout_count`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`keyboard_get_layout_language`\ (\ index\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`keyboard_get_layout_name`\ (\ index\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`keyboard_set_current_layout`\ (\ index\: :ref:`int`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |bitfield|\[:ref:`MouseButtonMask`\] | :ref:`mouse_get_button_state`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`MouseMode` | :ref:`mouse_get_mode`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`mouse_get_position`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`mouse_set_mode`\ (\ mouse_mode\: :ref:`MouseMode`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`process_events`\ (\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`register_additional_output`\ (\ object\: :ref:`Object`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`screen_get_dpi`\ (\ screen\: :ref:`int` = -1\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`screen_get_image`\ (\ screen\: :ref:`int` = -1\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Image` | :ref:`screen_get_image_rect`\ (\ rect\: :ref:`Rect2i`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`screen_get_max_scale`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScreenOrientation` | :ref:`screen_get_orientation`\ (\ screen\: :ref:`int` = -1\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`screen_get_pixel`\ (\ position\: :ref:`Vector2i`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`screen_get_position`\ (\ screen\: :ref:`int` = -1\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`screen_get_refresh_rate`\ (\ screen\: :ref:`int` = -1\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`screen_get_scale`\ (\ screen\: :ref:`int` = -1\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`screen_get_size`\ (\ screen\: :ref:`int` = -1\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i` | :ref:`screen_get_usable_rect`\ (\ screen\: :ref:`int` = -1\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`screen_is_kept_on`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`screen_set_keep_on`\ (\ enable\: :ref:`bool`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`screen_set_orientation`\ (\ orientation\: :ref:`ScreenOrientation`, screen\: :ref:`int` = -1\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_icon`\ (\ image\: :ref:`Image`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_native_icon`\ (\ filename\: :ref:`String`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_system_theme_change_callback`\ (\ callable\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2` | :ref:`status_indicator_get_rect`\ (\ id\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`status_indicator_set_callback`\ (\ id\: :ref:`int`, callback\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`status_indicator_set_icon`\ (\ id\: :ref:`int`, icon\: :ref:`Texture2D`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`status_indicator_set_menu`\ (\ id\: :ref:`int`, menu_rid\: :ref:`RID`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`status_indicator_set_tooltip`\ (\ id\: :ref:`int`, tooltip\: :ref:`String`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`tablet_get_current_driver`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`tablet_get_driver_count`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`tablet_get_driver_name`\ (\ idx\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`tablet_set_current_driver`\ (\ name\: :ref:`String`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`tts_get_voices`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`tts_get_voices_for_language`\ (\ language\: :ref:`String`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`tts_is_paused`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`tts_is_speaking`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`tts_pause`\ (\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`tts_resume`\ (\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`tts_set_utterance_callback`\ (\ event\: :ref:`TTSUtteranceEvent`, callable\: :ref:`Callable`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`tts_speak`\ (\ text\: :ref:`String`, voice\: :ref:`String`, volume\: :ref:`int` = 50, pitch\: :ref:`float` = 1.0, rate\: :ref:`float` = 1.0, utterance_id\: :ref:`int` = 0, interrupt\: :ref:`bool` = false\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`tts_stop`\ (\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`unregister_additional_output`\ (\ object\: :ref:`Object`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`virtual_keyboard_get_height`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`virtual_keyboard_hide`\ (\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`virtual_keyboard_show`\ (\ existing_text\: :ref:`String`, position\: :ref:`Rect2` = Rect2(0, 0, 0, 0), type\: :ref:`VirtualKeyboardType` = 0, max_length\: :ref:`int` = -1, cursor_start\: :ref:`int` = -1, cursor_end\: :ref:`int` = -1\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`warp_mouse`\ (\ position\: :ref:`Vector2i`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_can_draw`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`window_get_active_popup`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`window_get_attached_instance_id`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`window_get_current_screen`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_get_flag`\ (\ flag\: :ref:`WindowFlags`, window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_max_size`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_min_size`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`WindowMode` | :ref:`window_get_mode`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`window_get_native_handle`\ (\ handle_type\: :ref:`HandleType`, window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Rect2i` | :ref:`window_get_popup_safe_rect`\ (\ window\: :ref:`int`\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_position`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_position_with_decorations`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector3i` | :ref:`window_get_safe_title_margins`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_size`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_size_with_decorations`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`window_get_title_size`\ (\ title\: :ref:`String`, window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VSyncMode` | :ref:`window_get_vsync_mode`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_is_focused`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_is_maximize_allowed`\ (\ window_id\: :ref:`int` = 0\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_maximize_on_title_dbl_click`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`window_minimize_on_title_dbl_click`\ (\ ) |const| | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_move_to_foreground`\ (\ window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_request_attention`\ (\ window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_current_screen`\ (\ screen\: :ref:`int`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_drop_files_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_exclusive`\ (\ window_id\: :ref:`int`, exclusive\: :ref:`bool`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_flag`\ (\ flag\: :ref:`WindowFlags`, enabled\: :ref:`bool`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_ime_active`\ (\ active\: :ref:`bool`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_ime_position`\ (\ position\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_input_event_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_input_text_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_max_size`\ (\ max_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_min_size`\ (\ min_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_mode`\ (\ mode\: :ref:`WindowMode`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_mouse_passthrough`\ (\ region\: :ref:`PackedVector2Array`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_popup_safe_rect`\ (\ window\: :ref:`int`, rect\: :ref:`Rect2i`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_position`\ (\ position\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_rect_changed_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_size`\ (\ size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_title`\ (\ title\: :ref:`String`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_transient`\ (\ window_id\: :ref:`int`, parent_window_id\: :ref:`int`\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_vsync_mode`\ (\ vsync_mode\: :ref:`VSyncMode`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_window_buttons_offset`\ (\ offset\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_set_window_event_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`window_start_drag`\ (\ window_id\: :ref:`int` = 0\ ) | - +-------------------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`accessibility_create_element`\ (\ window_id\: :ref:`int`, role\: :ref:`AccessibilityRole`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`accessibility_create_sub_element`\ (\ parent_rid\: :ref:`RID`, role\: :ref:`AccessibilityRole`, insert_pos\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`accessibility_create_sub_text_edit_elements`\ (\ parent_rid\: :ref:`RID`, shaped_text\: :ref:`RID`, min_height\: :ref:`float`, insert_pos\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`accessibility_element_get_meta`\ (\ id\: :ref:`RID`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_element_set_meta`\ (\ id\: :ref:`RID`, meta\: :ref:`Variant`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_free_element`\ (\ id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`accessibility_get_window_root`\ (\ window_id\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`accessibility_has_element`\ (\ id\: :ref:`RID`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`accessibility_screen_reader_active`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_set_window_focused`\ (\ window_id\: :ref:`int`, focused\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_set_window_rect`\ (\ window_id\: :ref:`int`, rect_out\: :ref:`Rect2`, rect_in\: :ref:`Rect2`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`accessibility_should_increase_contrast`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`accessibility_should_reduce_animation`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`accessibility_should_reduce_transparency`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_add_action`\ (\ id\: :ref:`RID`, action\: :ref:`AccessibilityAction`, callable\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_add_child`\ (\ id\: :ref:`RID`, child_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_add_custom_action`\ (\ id\: :ref:`RID`, action_id\: :ref:`int`, action_description\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_add_related_controls`\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_add_related_described_by`\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_add_related_details`\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_add_related_flow_to`\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_add_related_labeled_by`\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_add_related_radio_group`\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_active_descendant`\ (\ id\: :ref:`RID`, other_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_background_color`\ (\ id\: :ref:`RID`, color\: :ref:`Color`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_bounds`\ (\ id\: :ref:`RID`, p_rect\: :ref:`Rect2`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_checked`\ (\ id\: :ref:`RID`, checekd\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_classname`\ (\ id\: :ref:`RID`, classname\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_color_value`\ (\ id\: :ref:`RID`, color\: :ref:`Color`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_description`\ (\ id\: :ref:`RID`, description\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_error_message`\ (\ id\: :ref:`RID`, other_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_extra_info`\ (\ id\: :ref:`RID`, name\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_flag`\ (\ id\: :ref:`RID`, flag\: :ref:`AccessibilityFlags`, value\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_focus`\ (\ id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_foreground_color`\ (\ id\: :ref:`RID`, color\: :ref:`Color`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_in_page_link_target`\ (\ id\: :ref:`RID`, other_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_language`\ (\ id\: :ref:`RID`, language\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_list_item_count`\ (\ id\: :ref:`RID`, size\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_list_item_expanded`\ (\ id\: :ref:`RID`, expanded\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_list_item_index`\ (\ id\: :ref:`RID`, index\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_list_item_level`\ (\ id\: :ref:`RID`, level\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_list_item_selected`\ (\ id\: :ref:`RID`, selected\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_list_orientation`\ (\ id\: :ref:`RID`, vertical\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_live`\ (\ id\: :ref:`RID`, live\: :ref:`AccessibilityLiveMode`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_member_of`\ (\ id\: :ref:`RID`, group_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_name`\ (\ id\: :ref:`RID`, name\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_next_on_line`\ (\ id\: :ref:`RID`, other_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_num_jump`\ (\ id\: :ref:`RID`, jump\: :ref:`float`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_num_range`\ (\ id\: :ref:`RID`, min\: :ref:`float`, max\: :ref:`float`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_num_step`\ (\ id\: :ref:`RID`, step\: :ref:`float`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_num_value`\ (\ id\: :ref:`RID`, position\: :ref:`float`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_placeholder`\ (\ id\: :ref:`RID`, placeholder\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_popup_type`\ (\ id\: :ref:`RID`, popup\: :ref:`AccessibilityPopupType`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_previous_on_line`\ (\ id\: :ref:`RID`, other_id\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_role`\ (\ id\: :ref:`RID`, role\: :ref:`AccessibilityRole`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_role_description`\ (\ id\: :ref:`RID`, description\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_scroll_x`\ (\ id\: :ref:`RID`, position\: :ref:`float`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_scroll_x_range`\ (\ id\: :ref:`RID`, min\: :ref:`float`, max\: :ref:`float`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_scroll_y`\ (\ id\: :ref:`RID`, position\: :ref:`float`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_scroll_y_range`\ (\ id\: :ref:`RID`, min\: :ref:`float`, max\: :ref:`float`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_shortcut`\ (\ id\: :ref:`RID`, shortcut\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_state_description`\ (\ id\: :ref:`RID`, description\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_table_cell_position`\ (\ id\: :ref:`RID`, row_index\: :ref:`int`, column_index\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_table_cell_span`\ (\ id\: :ref:`RID`, row_span\: :ref:`int`, column_span\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_table_column_count`\ (\ id\: :ref:`RID`, count\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_table_column_index`\ (\ id\: :ref:`RID`, index\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_table_row_count`\ (\ id\: :ref:`RID`, count\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_table_row_index`\ (\ id\: :ref:`RID`, index\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_text_align`\ (\ id\: :ref:`RID`, align\: :ref:`HorizontalAlignment`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_text_decorations`\ (\ id\: :ref:`RID`, underline\: :ref:`bool`, strikethrough\: :ref:`bool`, overline\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_text_orientation`\ (\ id\: :ref:`RID`, vertical\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_text_selection`\ (\ id\: :ref:`RID`, text_start_id\: :ref:`RID`, start_char\: :ref:`int`, text_end_id\: :ref:`RID`, end_char\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_tooltip`\ (\ id\: :ref:`RID`, tooltip\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_transform`\ (\ id\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_url`\ (\ id\: :ref:`RID`, url\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`accessibility_update_set_value`\ (\ id\: :ref:`RID`, value\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`beep`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`clipboard_get`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`clipboard_get_image`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`clipboard_get_primary`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`clipboard_has`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`clipboard_has_image`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clipboard_set`\ (\ clipboard\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clipboard_set_primary`\ (\ clipboard_primary\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`color_picker`\ (\ callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`create_status_indicator`\ (\ icon\: :ref:`Texture2D`, tooltip\: :ref:`String`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`CursorShape` | :ref:`cursor_get_shape`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cursor_set_custom_image`\ (\ cursor\: :ref:`Resource`, shape\: :ref:`CursorShape` = 0, hotspot\: :ref:`Vector2` = Vector2(0, 0)\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`cursor_set_shape`\ (\ shape\: :ref:`CursorShape`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`delete_status_indicator`\ (\ id\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`dialog_input_text`\ (\ title\: :ref:`String`, description\: :ref:`String`, existing_text\: :ref:`String`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`dialog_show`\ (\ title\: :ref:`String`, description\: :ref:`String`, buttons\: :ref:`PackedStringArray`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`enable_for_stealing_focus`\ (\ process_id\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`file_dialog_show`\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, callback\: :ref:`Callable`, parent_window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`file_dialog_with_options_show`\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, root\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, options\: :ref:`Array`\[:ref:`Dictionary`\], callback\: :ref:`Callable`, parent_window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`force_process_and_drop_events`\ (\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_accent_color`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_base_color`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Rect2`\] | :ref:`get_display_cutouts`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`get_display_safe_area`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_keyboard_focus_screen`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_name`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_primary_screen`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_screen_count`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_screen_from_rect`\ (\ rect\: :ref:`Rect2`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_swap_cancel_ok`\ (\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_window_at_screen_position`\ (\ position\: :ref:`Vector2i`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedInt32Array` | :ref:`get_window_list`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_check_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_icon_check_item`\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_icon_item`\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_icon_radio_check_item`\ (\ menu_root\: :ref:`String`, icon\: :ref:`Texture2D`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_multistate_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, max_states\: :ref:`int`, default_state\: :ref:`int`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_radio_check_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, callback\: :ref:`Callable` = Callable(), key_callback\: :ref:`Callable` = Callable(), tag\: :ref:`Variant` = null, accelerator\: :ref:`Key` = 0, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_separator`\ (\ menu_root\: :ref:`String`, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_add_submenu_item`\ (\ menu_root\: :ref:`String`, label\: :ref:`String`, submenu\: :ref:`String`, index\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_clear`\ (\ menu_root\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key` | :ref:`global_menu_get_item_accelerator`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`global_menu_get_item_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_count`\ (\ menu_root\: :ref:`String`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`global_menu_get_item_icon`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_indentation_level`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_index_from_tag`\ (\ menu_root\: :ref:`String`, tag\: :ref:`Variant`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_index_from_text`\ (\ menu_root\: :ref:`String`, text\: :ref:`String`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Callable` | :ref:`global_menu_get_item_key_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_max_states`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`global_menu_get_item_state`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`global_menu_get_item_submenu`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`global_menu_get_item_tag`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`global_menu_get_item_text`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`global_menu_get_item_tooltip`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`global_menu_get_system_menu_roots`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global_menu_is_item_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global_menu_is_item_checked`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global_menu_is_item_disabled`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global_menu_is_item_hidden`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`global_menu_is_item_radio_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_remove_item`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_accelerator`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, keycode\: :ref:`Key`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checkable\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_checked`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checked\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_disabled`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, disabled\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_hidden`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, hidden\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_hover_callbacks`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_icon`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, icon\: :ref:`Texture2D`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_indentation_level`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, level\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_key_callback`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, key_callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_max_states`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, max_states\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_radio_checkable`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, checkable\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_state`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, state\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_submenu`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, submenu\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_tag`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, tag\: :ref:`Variant`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_text`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, text\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_item_tooltip`\ (\ menu_root\: :ref:`String`, idx\: :ref:`int`, tooltip\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`global_menu_set_popup_callbacks`\ (\ menu_root\: :ref:`String`, open_callback\: :ref:`Callable`, close_callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_additional_outputs`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_feature`\ (\ feature\: :ref:`Feature`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_hardware_keyboard`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`help_set_search_callbacks`\ (\ search_callback\: :ref:`Callable`, action_callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`ime_get_selection`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`ime_get_text`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dark_mode`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_dark_mode_supported`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_touchscreen_available`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_window_transparency_available`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`keyboard_get_current_layout`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key` | :ref:`keyboard_get_keycode_from_physical`\ (\ keycode\: :ref:`Key`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Key` | :ref:`keyboard_get_label_from_physical`\ (\ keycode\: :ref:`Key`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`keyboard_get_layout_count`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`keyboard_get_layout_language`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`keyboard_get_layout_name`\ (\ index\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`keyboard_set_current_layout`\ (\ index\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`MouseButtonMask`\] | :ref:`mouse_get_button_state`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`MouseMode` | :ref:`mouse_get_mode`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`mouse_get_position`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mouse_set_mode`\ (\ mouse_mode\: :ref:`MouseMode`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`process_events`\ (\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`register_additional_output`\ (\ object\: :ref:`Object`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`screen_get_dpi`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`screen_get_image`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`screen_get_image_rect`\ (\ rect\: :ref:`Rect2i`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`screen_get_max_scale`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScreenOrientation` | :ref:`screen_get_orientation`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`screen_get_pixel`\ (\ position\: :ref:`Vector2i`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`screen_get_position`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`screen_get_refresh_rate`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`screen_get_scale`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`screen_get_size`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`screen_get_usable_rect`\ (\ screen\: :ref:`int` = -1\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`screen_is_kept_on`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`screen_set_keep_on`\ (\ enable\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`screen_set_orientation`\ (\ orientation\: :ref:`ScreenOrientation`, screen\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_hardware_keyboard_connection_change_callback`\ (\ callable\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_icon`\ (\ image\: :ref:`Image`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_native_icon`\ (\ filename\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_system_theme_change_callback`\ (\ callable\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`show_emoji_and_symbol_picker`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2` | :ref:`status_indicator_get_rect`\ (\ id\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`status_indicator_set_callback`\ (\ id\: :ref:`int`, callback\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`status_indicator_set_icon`\ (\ id\: :ref:`int`, icon\: :ref:`Texture2D`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`status_indicator_set_menu`\ (\ id\: :ref:`int`, menu_rid\: :ref:`RID`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`status_indicator_set_tooltip`\ (\ id\: :ref:`int`, tooltip\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tablet_get_current_driver`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`tablet_get_driver_count`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tablet_get_driver_name`\ (\ idx\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tablet_set_current_driver`\ (\ name\: :ref:`String`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`tts_get_voices`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`tts_get_voices_for_language`\ (\ language\: :ref:`String`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`tts_is_paused`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`tts_is_speaking`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tts_pause`\ (\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tts_resume`\ (\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tts_set_utterance_callback`\ (\ event\: :ref:`TTSUtteranceEvent`, callable\: :ref:`Callable`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tts_speak`\ (\ text\: :ref:`String`, voice\: :ref:`String`, volume\: :ref:`int` = 50, pitch\: :ref:`float` = 1.0, rate\: :ref:`float` = 1.0, utterance_id\: :ref:`int` = 0, interrupt\: :ref:`bool` = false\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`tts_stop`\ (\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`unregister_additional_output`\ (\ object\: :ref:`Object`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`virtual_keyboard_get_height`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`virtual_keyboard_hide`\ (\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`virtual_keyboard_show`\ (\ existing_text\: :ref:`String`, position\: :ref:`Rect2` = Rect2(0, 0, 0, 0), type\: :ref:`VirtualKeyboardType` = 0, max_length\: :ref:`int` = -1, cursor_start\: :ref:`int` = -1, cursor_end\: :ref:`int` = -1\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`warp_mouse`\ (\ position\: :ref:`Vector2i`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_can_draw`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`window_get_active_popup`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`window_get_attached_instance_id`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`window_get_current_screen`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_get_flag`\ (\ flag\: :ref:`WindowFlags`, window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_max_size`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_min_size`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`WindowMode` | :ref:`window_get_mode`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`window_get_native_handle`\ (\ handle_type\: :ref:`HandleType`, window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Rect2i` | :ref:`window_get_popup_safe_rect`\ (\ window\: :ref:`int`\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_position`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_position_with_decorations`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector3i` | :ref:`window_get_safe_title_margins`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_size`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_size_with_decorations`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`window_get_title_size`\ (\ title\: :ref:`String`, window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VSyncMode` | :ref:`window_get_vsync_mode`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_is_focused`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_is_maximize_allowed`\ (\ window_id\: :ref:`int` = 0\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_maximize_on_title_dbl_click`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`window_minimize_on_title_dbl_click`\ (\ ) |const| | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_move_to_foreground`\ (\ window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_request_attention`\ (\ window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_current_screen`\ (\ screen\: :ref:`int`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_drop_files_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_exclusive`\ (\ window_id\: :ref:`int`, exclusive\: :ref:`bool`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_flag`\ (\ flag\: :ref:`WindowFlags`, enabled\: :ref:`bool`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_ime_active`\ (\ active\: :ref:`bool`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_ime_position`\ (\ position\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_input_event_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_input_text_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_max_size`\ (\ max_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_min_size`\ (\ min_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_mode`\ (\ mode\: :ref:`WindowMode`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_mouse_passthrough`\ (\ region\: :ref:`PackedVector2Array`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_popup_safe_rect`\ (\ window\: :ref:`int`, rect\: :ref:`Rect2i`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_position`\ (\ position\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_rect_changed_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_size`\ (\ size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_title`\ (\ title\: :ref:`String`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_transient`\ (\ window_id\: :ref:`int`, parent_window_id\: :ref:`int`\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_vsync_mode`\ (\ vsync_mode\: :ref:`VSyncMode`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_window_buttons_offset`\ (\ offset\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_set_window_event_callback`\ (\ callback\: :ref:`Callable`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_start_drag`\ (\ window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`window_start_resize`\ (\ edge\: :ref:`WindowResizeEdge`, window_id\: :ref:`int` = 0\ ) | + +-------------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -504,7 +664,7 @@ Display server supports setting the mouse cursor shape to a custom image. **Wind :ref:`Feature` **FEATURE_NATIVE_DIALOG** = ``9`` -Display server supports spawning text dialogs using the operating system's native look-and-feel. See :ref:`dialog_show`. **Windows, macOS** +Display server supports spawning text dialogs using the operating system's native look-and-feel. See :ref:`dialog_show()`. **Windows, macOS** .. _class_DisplayServer_constant_FEATURE_IME: @@ -528,7 +688,7 @@ Display server supports windows can use per-pixel transparency to make windows b :ref:`Feature` **FEATURE_HIDPI** = ``12`` -Display server supports querying the operating system's display scale factor. This allows for *reliable* automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). **Windows, Linux (Wayland), macOS** +Display server supports querying the operating system's display scale factor. This allows automatically detecting the hiDPI display *reliably*, instead of guessing based on the screen resolution and the display's reported DPI (which might be unreliable due to broken monitor EDID). **Windows, Linux (Wayland), macOS** .. _class_DisplayServer_constant_FEATURE_ICON: @@ -592,7 +752,7 @@ Display server supports expanding window content to the title. See :ref:`WINDOW_ :ref:`Feature` **FEATURE_SCREEN_CAPTURE** = ``21`` -Display server supports reading screen pixels. See :ref:`screen_get_pixel`. +Display server supports reading screen pixels. See :ref:`screen_get_pixel()`. .. _class_DisplayServer_constant_FEATURE_STATUS_INDICATOR: @@ -608,7 +768,7 @@ Display server supports application status indicators. :ref:`Feature` **FEATURE_NATIVE_HELP** = ``23`` -Display server supports native help system search callbacks. See :ref:`help_set_search_callbacks`. +Display server supports native help system search callbacks. See :ref:`help_set_search_callbacks()`. .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_INPUT: @@ -616,7 +776,7 @@ Display server supports native help system search callbacks. See :ref:`help_set_ :ref:`Feature` **FEATURE_NATIVE_DIALOG_INPUT** = ``24`` -Display server supports spawning text input dialogs using the operating system's native look-and-feel. See :ref:`dialog_input_text`. **Windows, macOS** +Display server supports spawning text input dialogs using the operating system's native look-and-feel. See :ref:`dialog_input_text()`. **Windows, macOS** .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE: @@ -624,7 +784,7 @@ Display server supports spawning text input dialogs using the operating system's :ref:`Feature` **FEATURE_NATIVE_DIALOG_FILE** = ``25`` -Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See :ref:`file_dialog_show`. **Windows, macOS, Linux (X11/Wayland), Android** +Display server supports spawning dialogs for selecting files or directories using the operating system's native look-and-feel. See :ref:`file_dialog_show()`. **Windows, macOS, Linux (X11/Wayland), Android** .. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE_EXTRA: @@ -632,7 +792,7 @@ Display server supports spawning dialogs for selecting files or directories usin :ref:`Feature` **FEATURE_NATIVE_DIALOG_FILE_EXTRA** = ``26`` -The display server supports all features of :ref:`FEATURE_NATIVE_DIALOG_FILE`, with the added functionality of Options and native dialog file access to ``res://`` and ``user://`` paths. See :ref:`file_dialog_show` and :ref:`file_dialog_with_options_show`. **Windows, macOS, Linux (X11/Wayland)** +The display server supports all features of :ref:`FEATURE_NATIVE_DIALOG_FILE`, with the added functionality of Options and native dialog file access to ``res://`` and ``user://`` paths. See :ref:`file_dialog_show()` and :ref:`file_dialog_with_options_show()`. **Windows, macOS, Linux (X11/Wayland)** .. _class_DisplayServer_constant_FEATURE_WINDOW_DRAG: @@ -640,7 +800,7 @@ The display server supports all features of :ref:`FEATURE_NATIVE_DIALOG_FILE` **FEATURE_WINDOW_DRAG** = ``27`` -The display server supports initiating window drag operation on demand. See :ref:`window_start_drag`. +The display server supports initiating window drag and resize operations on demand. See :ref:`window_start_drag()` and :ref:`window_start_resize()`. .. _class_DisplayServer_constant_FEATURE_SCREEN_EXCLUDE_FROM_CAPTURE: @@ -658,937 +818,2807 @@ Display server supports :ref:`WINDOW_FLAG_EXCLUDE_FROM_CAPTURE` - -.. _class_DisplayServer_constant_MOUSE_MODE_VISIBLE: +.. _class_DisplayServer_constant_FEATURE_NATIVE_DIALOG_FILE_MIME: .. rst-class:: classref-enumeration-constant -:ref:`MouseMode` **MOUSE_MODE_VISIBLE** = ``0`` +:ref:`Feature` **FEATURE_NATIVE_DIALOG_FILE_MIME** = ``30`` -Makes the mouse cursor visible if it is hidden. +Native file selection dialog supports MIME types as filters. -.. _class_DisplayServer_constant_MOUSE_MODE_HIDDEN: +.. _class_DisplayServer_constant_FEATURE_EMOJI_AND_SYMBOL_PICKER: .. rst-class:: classref-enumeration-constant -:ref:`MouseMode` **MOUSE_MODE_HIDDEN** = ``1`` +:ref:`Feature` **FEATURE_EMOJI_AND_SYMBOL_PICKER** = ``31`` -Makes the mouse cursor hidden if it is visible. +Display server supports system emoji and symbol picker. **Windows, macOS** -.. _class_DisplayServer_constant_MOUSE_MODE_CAPTURED: +.. _class_DisplayServer_constant_FEATURE_NATIVE_COLOR_PICKER: .. rst-class:: classref-enumeration-constant -:ref:`MouseMode` **MOUSE_MODE_CAPTURED** = ``2`` - -Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window. +:ref:`Feature` **FEATURE_NATIVE_COLOR_PICKER** = ``32`` -\ **Note:** If you want to process the mouse's movement in this mode, you need to use :ref:`InputEventMouseMotion.relative`. +Display server supports native color picker. **Linux (X11/Wayland)** -.. _class_DisplayServer_constant_MOUSE_MODE_CONFINED: +.. _class_DisplayServer_constant_FEATURE_SELF_FITTING_WINDOWS: .. rst-class:: classref-enumeration-constant -:ref:`MouseMode` **MOUSE_MODE_CONFINED** = ``3`` +:ref:`Feature` **FEATURE_SELF_FITTING_WINDOWS** = ``33`` -Confines the mouse cursor to the game window, and make it visible. +Display server automatically fits popups according to the screen boundaries. Window nodes should not attempt to do that themselves. -.. _class_DisplayServer_constant_MOUSE_MODE_CONFINED_HIDDEN: +.. _class_DisplayServer_constant_FEATURE_ACCESSIBILITY_SCREEN_READER: .. rst-class:: classref-enumeration-constant -:ref:`MouseMode` **MOUSE_MODE_CONFINED_HIDDEN** = ``4`` +:ref:`Feature` **FEATURE_ACCESSIBILITY_SCREEN_READER** = ``34`` -Confines the mouse cursor to the game window, and make it hidden. +Display server supports interaction with screen reader or Braille display. **Linux (X11/Wayland), macOS, Windows** .. rst-class:: classref-item-separator ---- -.. _enum_DisplayServer_ScreenOrientation: +.. _enum_DisplayServer_AccessibilityRole: .. rst-class:: classref-enumeration -enum **ScreenOrientation**: :ref:`πŸ”—` +enum **AccessibilityRole**: :ref:`πŸ”—` -.. _class_DisplayServer_constant_SCREEN_LANDSCAPE: +.. _class_DisplayServer_constant_ROLE_UNKNOWN: .. rst-class:: classref-enumeration-constant -:ref:`ScreenOrientation` **SCREEN_LANDSCAPE** = ``0`` +:ref:`AccessibilityRole` **ROLE_UNKNOWN** = ``0`` -Default landscape orientation. +Unknown or custom role. -.. _class_DisplayServer_constant_SCREEN_PORTRAIT: +.. _class_DisplayServer_constant_ROLE_DEFAULT_BUTTON: .. rst-class:: classref-enumeration-constant -:ref:`ScreenOrientation` **SCREEN_PORTRAIT** = ``1`` +:ref:`AccessibilityRole` **ROLE_DEFAULT_BUTTON** = ``1`` -Default portrait orientation. +Default dialog button element. -.. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE: +.. _class_DisplayServer_constant_ROLE_AUDIO: .. rst-class:: classref-enumeration-constant -:ref:`ScreenOrientation` **SCREEN_REVERSE_LANDSCAPE** = ``2`` +:ref:`AccessibilityRole` **ROLE_AUDIO** = ``2`` -Reverse landscape orientation (upside down). +Audio player element. -.. _class_DisplayServer_constant_SCREEN_REVERSE_PORTRAIT: +.. _class_DisplayServer_constant_ROLE_VIDEO: .. rst-class:: classref-enumeration-constant -:ref:`ScreenOrientation` **SCREEN_REVERSE_PORTRAIT** = ``3`` +:ref:`AccessibilityRole` **ROLE_VIDEO** = ``3`` -Reverse portrait orientation (upside down). +Video player element. -.. _class_DisplayServer_constant_SCREEN_SENSOR_LANDSCAPE: +.. _class_DisplayServer_constant_ROLE_STATIC_TEXT: .. rst-class:: classref-enumeration-constant -:ref:`ScreenOrientation` **SCREEN_SENSOR_LANDSCAPE** = ``4`` +:ref:`AccessibilityRole` **ROLE_STATIC_TEXT** = ``4`` -Automatic landscape orientation (default or reverse depending on sensor). +Non-editable text label. -.. _class_DisplayServer_constant_SCREEN_SENSOR_PORTRAIT: +.. _class_DisplayServer_constant_ROLE_CONTAINER: .. rst-class:: classref-enumeration-constant -:ref:`ScreenOrientation` **SCREEN_SENSOR_PORTRAIT** = ``5`` +:ref:`AccessibilityRole` **ROLE_CONTAINER** = ``5`` -Automatic portrait orientation (default or reverse depending on sensor). +Container element. Elements with this role are used for internal structure and ignored by screen readers. -.. _class_DisplayServer_constant_SCREEN_SENSOR: +.. _class_DisplayServer_constant_ROLE_PANEL: .. rst-class:: classref-enumeration-constant -:ref:`ScreenOrientation` **SCREEN_SENSOR** = ``6`` - -Automatic landscape or portrait orientation (default or reverse depending on sensor). +:ref:`AccessibilityRole` **ROLE_PANEL** = ``6`` -.. rst-class:: classref-item-separator +Panel container element. ----- +.. _class_DisplayServer_constant_ROLE_BUTTON: -.. _enum_DisplayServer_VirtualKeyboardType: +.. rst-class:: classref-enumeration-constant -.. rst-class:: classref-enumeration +:ref:`AccessibilityRole` **ROLE_BUTTON** = ``7`` -enum **VirtualKeyboardType**: :ref:`πŸ”—` +Button element. -.. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT: +.. _class_DisplayServer_constant_ROLE_LINK: .. rst-class:: classref-enumeration-constant -:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_DEFAULT** = ``0`` +:ref:`AccessibilityRole` **ROLE_LINK** = ``8`` -Default text virtual keyboard. +Link element. -.. _class_DisplayServer_constant_KEYBOARD_TYPE_MULTILINE: +.. _class_DisplayServer_constant_ROLE_CHECK_BOX: .. rst-class:: classref-enumeration-constant -:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_MULTILINE** = ``1`` +:ref:`AccessibilityRole` **ROLE_CHECK_BOX** = ``9`` -Multiline virtual keyboard. +Check box element. -.. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER: +.. _class_DisplayServer_constant_ROLE_RADIO_BUTTON: .. rst-class:: classref-enumeration-constant -:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_NUMBER** = ``2`` +:ref:`AccessibilityRole` **ROLE_RADIO_BUTTON** = ``10`` -Virtual number keypad, useful for PIN entry. +Radio button element. -.. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER_DECIMAL: +.. _class_DisplayServer_constant_ROLE_CHECK_BUTTON: .. rst-class:: classref-enumeration-constant -:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_NUMBER_DECIMAL** = ``3`` +:ref:`AccessibilityRole` **ROLE_CHECK_BUTTON** = ``11`` -Virtual number keypad, useful for entering fractional numbers. +Check button element. -.. _class_DisplayServer_constant_KEYBOARD_TYPE_PHONE: +.. _class_DisplayServer_constant_ROLE_SCROLL_BAR: .. rst-class:: classref-enumeration-constant -:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_PHONE** = ``4`` +:ref:`AccessibilityRole` **ROLE_SCROLL_BAR** = ``12`` -Virtual phone number keypad. +Scroll bar element. -.. _class_DisplayServer_constant_KEYBOARD_TYPE_EMAIL_ADDRESS: +.. _class_DisplayServer_constant_ROLE_SCROLL_VIEW: .. rst-class:: classref-enumeration-constant -:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_EMAIL_ADDRESS** = ``5`` +:ref:`AccessibilityRole` **ROLE_SCROLL_VIEW** = ``13`` -Virtual keyboard with additional keys to assist with typing email addresses. +Scroll container element. -.. _class_DisplayServer_constant_KEYBOARD_TYPE_PASSWORD: +.. _class_DisplayServer_constant_ROLE_SPLITTER: .. rst-class:: classref-enumeration-constant -:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_PASSWORD** = ``6`` - -Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. +:ref:`AccessibilityRole` **ROLE_SPLITTER** = ``14`` -\ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT`. +Container splitter handle element. -.. _class_DisplayServer_constant_KEYBOARD_TYPE_URL: +.. _class_DisplayServer_constant_ROLE_SLIDER: .. rst-class:: classref-enumeration-constant -:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_URL** = ``7`` - -Virtual keyboard with additional keys to assist with typing URLs. +:ref:`AccessibilityRole` **ROLE_SLIDER** = ``15`` -.. rst-class:: classref-item-separator +Slider element. ----- +.. _class_DisplayServer_constant_ROLE_SPIN_BUTTON: -.. _enum_DisplayServer_CursorShape: +.. rst-class:: classref-enumeration-constant -.. rst-class:: classref-enumeration +:ref:`AccessibilityRole` **ROLE_SPIN_BUTTON** = ``16`` -enum **CursorShape**: :ref:`πŸ”—` +Spin box element. -.. _class_DisplayServer_constant_CURSOR_ARROW: +.. _class_DisplayServer_constant_ROLE_PROGRESS_INDICATOR: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_ARROW** = ``0`` +:ref:`AccessibilityRole` **ROLE_PROGRESS_INDICATOR** = ``17`` -Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a :ref:`LineEdit` or :ref:`TextEdit`. +Progress indicator element. -.. _class_DisplayServer_constant_CURSOR_IBEAM: +.. _class_DisplayServer_constant_ROLE_TEXT_FIELD: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_IBEAM** = ``1`` +:ref:`AccessibilityRole` **ROLE_TEXT_FIELD** = ``18`` -I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as :ref:`LineEdit` or :ref:`TextEdit`. +Editable text field element. -.. _class_DisplayServer_constant_CURSOR_POINTING_HAND: +.. _class_DisplayServer_constant_ROLE_MULTILINE_TEXT_FIELD: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_POINTING_HAND** = ``2`` +:ref:`AccessibilityRole` **ROLE_MULTILINE_TEXT_FIELD** = ``19`` -Pointing hand cursor shape. This is used by default when hovering a :ref:`LinkButton` or a URL tag in a :ref:`RichTextLabel`. +Multiline editable text field element. -.. _class_DisplayServer_constant_CURSOR_CROSS: +.. _class_DisplayServer_constant_ROLE_COLOR_PICKER: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_CROSS** = ``3`` +:ref:`AccessibilityRole` **ROLE_COLOR_PICKER** = ``20`` -Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker. +Color picker element. -.. _class_DisplayServer_constant_CURSOR_WAIT: +.. _class_DisplayServer_constant_ROLE_TABLE: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_WAIT** = ``4`` +:ref:`AccessibilityRole` **ROLE_TABLE** = ``21`` -Wait cursor. On most cursor themes, this displays a spinning icon *besides* the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also :ref:`CURSOR_BUSY`. +Table element. -.. _class_DisplayServer_constant_CURSOR_BUSY: +.. _class_DisplayServer_constant_ROLE_CELL: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_BUSY** = ``5`` +:ref:`AccessibilityRole` **ROLE_CELL** = ``22`` -Wait cursor. On most cursor themes, this *replaces* the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also :ref:`CURSOR_WAIT`. +Table/tree cell element. -.. _class_DisplayServer_constant_CURSOR_DRAG: +.. _class_DisplayServer_constant_ROLE_ROW: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_DRAG** = ``6`` +:ref:`AccessibilityRole` **ROLE_ROW** = ``23`` -Dragging hand cursor. This is displayed during drag-and-drop operations. See also :ref:`CURSOR_CAN_DROP`. +Table/tree row element. -.. _class_DisplayServer_constant_CURSOR_CAN_DROP: +.. _class_DisplayServer_constant_ROLE_ROW_GROUP: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_CAN_DROP** = ``7`` +:ref:`AccessibilityRole` **ROLE_ROW_GROUP** = ``24`` -"Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a :ref:`Control` that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also :ref:`CURSOR_DRAG`. +Table/tree row group element. -.. _class_DisplayServer_constant_CURSOR_FORBIDDEN: +.. _class_DisplayServer_constant_ROLE_ROW_HEADER: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_FORBIDDEN** = ``8`` +:ref:`AccessibilityRole` **ROLE_ROW_HEADER** = ``25`` -Forbidden cursor. This is displayed during drag-and-drop operations if the hovered :ref:`Control` can't accept the drag-and-drop event. +Table/tree row header element. -.. _class_DisplayServer_constant_CURSOR_VSIZE: +.. _class_DisplayServer_constant_ROLE_COLUMN_HEADER: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_VSIZE** = ``9`` +:ref:`AccessibilityRole` **ROLE_COLUMN_HEADER** = ``26`` -Vertical resize cursor. Intended to be displayed when the hovered :ref:`Control` can be vertically resized using the mouse. See also :ref:`CURSOR_VSPLIT`. +Table/tree column header element. -.. _class_DisplayServer_constant_CURSOR_HSIZE: +.. _class_DisplayServer_constant_ROLE_TREE: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_HSIZE** = ``10`` +:ref:`AccessibilityRole` **ROLE_TREE** = ``27`` -Horizontal resize cursor. Intended to be displayed when the hovered :ref:`Control` can be horizontally resized using the mouse. See also :ref:`CURSOR_HSPLIT`. +Tree view element. -.. _class_DisplayServer_constant_CURSOR_BDIAGSIZE: +.. _class_DisplayServer_constant_ROLE_TREE_ITEM: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_BDIAGSIZE** = ``11`` +:ref:`AccessibilityRole` **ROLE_TREE_ITEM** = ``28`` -Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered :ref:`Control` can be resized on both axes at once using the mouse. +Tree view item element. -.. _class_DisplayServer_constant_CURSOR_FDIAGSIZE: +.. _class_DisplayServer_constant_ROLE_LIST: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_FDIAGSIZE** = ``12`` +:ref:`AccessibilityRole` **ROLE_LIST** = ``29`` -Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered :ref:`Control` can be resized on both axes at once using the mouse. +List element. -.. _class_DisplayServer_constant_CURSOR_MOVE: +.. _class_DisplayServer_constant_ROLE_LIST_ITEM: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_MOVE** = ``13`` +:ref:`AccessibilityRole` **ROLE_LIST_ITEM** = ``30`` -Move cursor. Intended to be displayed when the hovered :ref:`Control` can be moved using the mouse. +List item element. -.. _class_DisplayServer_constant_CURSOR_VSPLIT: +.. _class_DisplayServer_constant_ROLE_LIST_BOX: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_VSPLIT** = ``14`` +:ref:`AccessibilityRole` **ROLE_LIST_BOX** = ``31`` -Vertical split cursor. This is displayed when hovering a :ref:`Control` with splits that can be vertically resized using the mouse, such as :ref:`VSplitContainer`. On some cursor themes, this cursor may have the same appearance as :ref:`CURSOR_VSIZE`. +List view element. -.. _class_DisplayServer_constant_CURSOR_HSPLIT: +.. _class_DisplayServer_constant_ROLE_LIST_BOX_OPTION: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_HSPLIT** = ``15`` +:ref:`AccessibilityRole` **ROLE_LIST_BOX_OPTION** = ``32`` -Horizontal split cursor. This is displayed when hovering a :ref:`Control` with splits that can be horizontally resized using the mouse, such as :ref:`HSplitContainer`. On some cursor themes, this cursor may have the same appearance as :ref:`CURSOR_HSIZE`. +List view item element. -.. _class_DisplayServer_constant_CURSOR_HELP: +.. _class_DisplayServer_constant_ROLE_TAB_BAR: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_HELP** = ``16`` +:ref:`AccessibilityRole` **ROLE_TAB_BAR** = ``33`` -Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked. +Tab bar element. -.. _class_DisplayServer_constant_CURSOR_MAX: +.. _class_DisplayServer_constant_ROLE_TAB: .. rst-class:: classref-enumeration-constant -:ref:`CursorShape` **CURSOR_MAX** = ``17`` - -Represents the size of the :ref:`CursorShape` enum. +:ref:`AccessibilityRole` **ROLE_TAB** = ``34`` -.. rst-class:: classref-item-separator +Tab bar item element. ----- +.. _class_DisplayServer_constant_ROLE_TAB_PANEL: -.. _enum_DisplayServer_FileDialogMode: +.. rst-class:: classref-enumeration-constant -.. rst-class:: classref-enumeration +:ref:`AccessibilityRole` **ROLE_TAB_PANEL** = ``35`` -enum **FileDialogMode**: :ref:`πŸ”—` +Tab panel element. -.. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILE: +.. _class_DisplayServer_constant_ROLE_MENU_BAR: .. rst-class:: classref-enumeration-constant -:ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_FILE** = ``0`` +:ref:`AccessibilityRole` **ROLE_MENU_BAR** = ``36`` -The native file dialog allows selecting one, and only one file. +Menu bar element. -.. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILES: +.. _class_DisplayServer_constant_ROLE_MENU: .. rst-class:: classref-enumeration-constant -:ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_FILES** = ``1`` +:ref:`AccessibilityRole` **ROLE_MENU** = ``37`` -The native file dialog allows selecting multiple files. +Popup menu element. -.. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_DIR: +.. _class_DisplayServer_constant_ROLE_MENU_ITEM: .. rst-class:: classref-enumeration-constant -:ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_DIR** = ``2`` +:ref:`AccessibilityRole` **ROLE_MENU_ITEM** = ``38`` -The native file dialog only allows selecting a directory, disallowing the selection of any file. +Popup menu item element. -.. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_ANY: +.. _class_DisplayServer_constant_ROLE_MENU_ITEM_CHECK_BOX: .. rst-class:: classref-enumeration-constant -:ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_ANY** = ``3`` +:ref:`AccessibilityRole` **ROLE_MENU_ITEM_CHECK_BOX** = ``39`` -The native file dialog allows selecting one file or directory. +Popup menu check button item element. -.. _class_DisplayServer_constant_FILE_DIALOG_MODE_SAVE_FILE: +.. _class_DisplayServer_constant_ROLE_MENU_ITEM_RADIO: .. rst-class:: classref-enumeration-constant -:ref:`FileDialogMode` **FILE_DIALOG_MODE_SAVE_FILE** = ``4`` - -The native file dialog will warn when a file exists. +:ref:`AccessibilityRole` **ROLE_MENU_ITEM_RADIO** = ``40`` -.. rst-class:: classref-item-separator +Popup menu radio button item element. ----- +.. _class_DisplayServer_constant_ROLE_IMAGE: -.. _enum_DisplayServer_WindowMode: +.. rst-class:: classref-enumeration-constant -.. rst-class:: classref-enumeration +:ref:`AccessibilityRole` **ROLE_IMAGE** = ``41`` -enum **WindowMode**: :ref:`πŸ”—` +Image element. -.. _class_DisplayServer_constant_WINDOW_MODE_WINDOWED: +.. _class_DisplayServer_constant_ROLE_WINDOW: .. rst-class:: classref-enumeration-constant -:ref:`WindowMode` **WINDOW_MODE_WINDOWED** = ``0`` +:ref:`AccessibilityRole` **ROLE_WINDOW** = ``42`` -Windowed mode, i.e. :ref:`Window` doesn't occupy the whole screen (unless set to the size of the screen). +Window element. -.. _class_DisplayServer_constant_WINDOW_MODE_MINIMIZED: +.. _class_DisplayServer_constant_ROLE_TITLE_BAR: .. rst-class:: classref-enumeration-constant -:ref:`WindowMode` **WINDOW_MODE_MINIMIZED** = ``1`` +:ref:`AccessibilityRole` **ROLE_TITLE_BAR** = ``43`` -Minimized window mode, i.e. :ref:`Window` is not visible and available on window manager's window list. Normally happens when the minimize button is pressed. +Embedded window title bar element. -.. _class_DisplayServer_constant_WINDOW_MODE_MAXIMIZED: +.. _class_DisplayServer_constant_ROLE_DIALOG: .. rst-class:: classref-enumeration-constant -:ref:`WindowMode` **WINDOW_MODE_MAXIMIZED** = ``2`` +:ref:`AccessibilityRole` **ROLE_DIALOG** = ``44`` -Maximized window mode, i.e. :ref:`Window` will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed. +Dialog window element. -.. _class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN: +.. _class_DisplayServer_constant_ROLE_TOOLTIP: .. rst-class:: classref-enumeration-constant -:ref:`WindowMode` **WINDOW_MODE_FULLSCREEN** = ``3`` +:ref:`AccessibilityRole` **ROLE_TOOLTIP** = ``45`` -Full screen mode with full multi-window support. +Tooltip element. -Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed. +.. rst-class:: classref-item-separator -\ **On Android:** This enables immersive mode. +---- -\ **On Windows:** Multi-window full-screen mode has a 1px border of the :ref:`ProjectSettings.rendering/environment/defaults/default_clear_color` color. +.. _enum_DisplayServer_AccessibilityPopupType: -\ **On macOS:** A new desktop is used to display the running project. +.. rst-class:: classref-enumeration -\ **Note:** Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling full screen mode. +enum **AccessibilityPopupType**: :ref:`πŸ”—` -.. _class_DisplayServer_constant_WINDOW_MODE_EXCLUSIVE_FULLSCREEN: +.. _class_DisplayServer_constant_POPUP_UNKNOWN: .. rst-class:: classref-enumeration-constant -:ref:`WindowMode` **WINDOW_MODE_EXCLUSIVE_FULLSCREEN** = ``4`` +:ref:`AccessibilityPopupType` **POPUP_UNKNOWN** = ``0`` -A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition). +Other/unknown popup type. -Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed. +.. _class_DisplayServer_constant_POPUP_MENU: -\ **On Android:** This enables immersive mode. +.. rst-class:: classref-enumeration-constant -\ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment. +:ref:`AccessibilityPopupType` **POPUP_MENU** = ``1`` -\ **On macOS:** A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. +Popup menu. -\ **On Linux (X11):** Exclusive full screen mode bypasses compositor. +.. _class_DisplayServer_constant_POPUP_LIST: -\ **Note:** Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling full screen mode. +.. rst-class:: classref-enumeration-constant -.. rst-class:: classref-item-separator +:ref:`AccessibilityPopupType` **POPUP_LIST** = ``2`` ----- +Popup list. -.. _enum_DisplayServer_WindowFlags: +.. _class_DisplayServer_constant_POPUP_TREE: -.. rst-class:: classref-enumeration +.. rst-class:: classref-enumeration-constant -enum **WindowFlags**: :ref:`πŸ”—` +:ref:`AccessibilityPopupType` **POPUP_TREE** = ``3`` -.. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED: +Popup tree view. + +.. _class_DisplayServer_constant_POPUP_DIALOG: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_RESIZE_DISABLED** = ``0`` +:ref:`AccessibilityPopupType` **POPUP_DIALOG** = ``4`` -The window can't be resized by dragging its resize grip. It's still possible to resize the window using :ref:`window_set_size`. This flag is ignored for full screen windows. +Popup dialog. -.. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS: +.. rst-class:: classref-item-separator -.. rst-class:: classref-enumeration-constant +---- -:ref:`WindowFlags` **WINDOW_FLAG_BORDERLESS** = ``1`` +.. _enum_DisplayServer_AccessibilityFlags: -The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. +.. rst-class:: classref-enumeration -.. _class_DisplayServer_constant_WINDOW_FLAG_ALWAYS_ON_TOP: +enum **AccessibilityFlags**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_FLAG_HIDDEN: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_ALWAYS_ON_TOP** = ``2`` +:ref:`AccessibilityFlags` **FLAG_HIDDEN** = ``0`` -The window is floating on top of all other windows. This flag is ignored for full-screen windows. +Element is hidden for accessibility tools. -.. _class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT: +.. _class_DisplayServer_constant_FLAG_LINKED: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_TRANSPARENT** = ``3`` +:ref:`AccessibilityFlags` **FLAG_LINKED** = ``1`` -The window background can be transparent. +.. container:: contribute -\ **Note:** This flag has no effect if :ref:`is_window_transparency_available` returns ``false``. + There is currently no description for this enum. Please help us by :ref:`contributing one `! -\ **Note:** Transparency support is implemented on Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. -.. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS: + +.. _class_DisplayServer_constant_FLAG_MULTISELECTABLE: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_NO_FOCUS** = ``4`` +:ref:`AccessibilityFlags` **FLAG_MULTISELECTABLE** = ``2`` -The window can't be focused. No-focus window will ignore all input, except mouse clicks. +Element is support multiple item selection. -.. _class_DisplayServer_constant_WINDOW_FLAG_POPUP: +.. _class_DisplayServer_constant_FLAG_REQUIRED: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_POPUP** = ``5`` +:ref:`AccessibilityFlags` **FLAG_REQUIRED** = ``3`` -Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see :ref:`window_set_transient`). +Element require user input. -.. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE: +.. _class_DisplayServer_constant_FLAG_VISITED: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_EXTEND_TO_TITLE** = ``6`` +:ref:`AccessibilityFlags` **FLAG_VISITED** = ``4`` -Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. +Element is a visited link. -Use :ref:`window_set_window_buttons_offset` to adjust minimize/maximize/close buttons offset. +.. _class_DisplayServer_constant_FLAG_BUSY: -Use :ref:`window_get_safe_title_margins` to determine area under the title bar that is not covered by decorations. +.. rst-class:: classref-enumeration-constant -\ **Note:** This flag is implemented only on macOS. +:ref:`AccessibilityFlags` **FLAG_BUSY** = ``5`` -.. _class_DisplayServer_constant_WINDOW_FLAG_MOUSE_PASSTHROUGH: +Element content is not ready (e.g. loading). + +.. _class_DisplayServer_constant_FLAG_MODAL: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_MOUSE_PASSTHROUGH** = ``7`` +:ref:`AccessibilityFlags` **FLAG_MODAL** = ``6`` -All mouse events are passed to the underlying window of the same application. +Element is modal window. -.. _class_DisplayServer_constant_WINDOW_FLAG_SHARP_CORNERS: +.. _class_DisplayServer_constant_FLAG_TOUCH_PASSTHROUGH: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_SHARP_CORNERS** = ``8`` - -Window style is overridden, forcing sharp corners. +:ref:`AccessibilityFlags` **FLAG_TOUCH_PASSTHROUGH** = ``7`` -\ **Note:** This flag is implemented only on Windows (11). +Element allows touches to be passed through when a screen reader is in touch exploration mode. -.. _class_DisplayServer_constant_WINDOW_FLAG_EXCLUDE_FROM_CAPTURE: +.. _class_DisplayServer_constant_FLAG_READONLY: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_EXCLUDE_FROM_CAPTURE** = ``9`` +:ref:`AccessibilityFlags` **FLAG_READONLY** = ``8`` -Windows is excluded from screenshots taken by :ref:`screen_get_image`, :ref:`screen_get_image_rect`, and :ref:`screen_get_pixel`. +Element is text field with selectable but read-only text. -\ **Note:** This flag is implemented on macOS and Windows. +.. _class_DisplayServer_constant_FLAG_DISABLED: -\ **Note:** Setting this flag will **NOT** prevent other apps from capturing an image, it should not be used as a security measure. +.. rst-class:: classref-enumeration-constant -.. _class_DisplayServer_constant_WINDOW_FLAG_MAX: +:ref:`AccessibilityFlags` **FLAG_DISABLED** = ``9`` + +Element is disabled. + +.. _class_DisplayServer_constant_FLAG_CLIPS_CHILDREN: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_MAX** = ``10`` +:ref:`AccessibilityFlags` **FLAG_CLIPS_CHILDREN** = ``10`` -Max value of the :ref:`WindowFlags`. +Element clips children. .. rst-class:: classref-item-separator ---- -.. _enum_DisplayServer_WindowEvent: +.. _enum_DisplayServer_AccessibilityAction: .. rst-class:: classref-enumeration -enum **WindowEvent**: :ref:`πŸ”—` +enum **AccessibilityAction**: :ref:`πŸ”—` -.. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER: +.. _class_DisplayServer_constant_ACTION_CLICK: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_MOUSE_ENTER** = ``0`` +:ref:`AccessibilityAction` **ACTION_CLICK** = ``0`` -Sent when the mouse pointer enters the window. +Single click action, callback argument is not set. -.. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT: +.. _class_DisplayServer_constant_ACTION_FOCUS: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_MOUSE_EXIT** = ``1`` +:ref:`AccessibilityAction` **ACTION_FOCUS** = ``1`` -Sent when the mouse pointer exits the window. +Focus action, callback argument is not set. -.. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN: +.. _class_DisplayServer_constant_ACTION_BLUR: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_FOCUS_IN** = ``2`` +:ref:`AccessibilityAction` **ACTION_BLUR** = ``2`` -Sent when the window grabs focus. +Blur action, callback argument is not set. -.. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT: +.. _class_DisplayServer_constant_ACTION_COLLAPSE: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_FOCUS_OUT** = ``3`` +:ref:`AccessibilityAction` **ACTION_COLLAPSE** = ``3`` -Sent when the window loses focus. +Collapse action, callback argument is not set. -.. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST: +.. _class_DisplayServer_constant_ACTION_EXPAND: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_CLOSE_REQUEST** = ``4`` +:ref:`AccessibilityAction` **ACTION_EXPAND** = ``4`` -Sent when the user has attempted to close the window (e.g. close button is pressed). +Expand action, callback argument is not set. -.. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST: +.. _class_DisplayServer_constant_ACTION_DECREMENT: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_GO_BACK_REQUEST** = ``5`` +:ref:`AccessibilityAction` **ACTION_DECREMENT** = ``5`` -Sent when the device "Back" button is pressed. +Decrement action, callback argument is not set. -\ **Note:** This event is implemented only on Android. +.. _class_DisplayServer_constant_ACTION_INCREMENT: -.. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE: +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_INCREMENT** = ``6`` + +Increment action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_HIDE_TOOLTIP: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_DPI_CHANGE** = ``6`` +:ref:`AccessibilityAction` **ACTION_HIDE_TOOLTIP** = ``7`` -Sent when the window is moved to the display with different DPI, or display DPI is changed. +Hide tooltip action, callback argument is not set. -\ **Note:** This flag is implemented only on macOS. +.. _class_DisplayServer_constant_ACTION_SHOW_TOOLTIP: -.. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE: +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SHOW_TOOLTIP** = ``8`` + +Show tooltip action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_SET_TEXT_SELECTION: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_TITLEBAR_CHANGE** = ``7`` +:ref:`AccessibilityAction` **ACTION_SET_TEXT_SELECTION** = ``9`` -Sent when the window title bar decoration is changed (e.g. :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` is set or window entered/exited full screen mode). +Set text selection action, callback argument is set to :ref:`Dictionary` with the following keys: -\ **Note:** This flag is implemented only on macOS. +- ``"start_element"`` accessibility element of the selection start. + +- ``"start_char"`` character offset relative to the accessibility element of the selection start. + +- ``"end_element"`` accessibility element of the selection end. + +- ``"end_char"`` character offset relative to the accessibility element of the selection end. + +.. _class_DisplayServer_constant_ACTION_REPLACE_SELECTED_TEXT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_REPLACE_SELECTED_TEXT** = ``10`` + +Replace text action, callback argument is set to :ref:`String` with the replacement text. + +.. _class_DisplayServer_constant_ACTION_SCROLL_BACKWARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SCROLL_BACKWARD** = ``11`` + +Scroll backward action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_SCROLL_DOWN: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SCROLL_DOWN** = ``12`` + +Scroll down action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_SCROLL_FORWARD: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SCROLL_FORWARD** = ``13`` + +Scroll forward action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_SCROLL_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SCROLL_LEFT** = ``14`` + +Scroll left action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_SCROLL_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SCROLL_RIGHT** = ``15`` + +Scroll right action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_SCROLL_UP: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SCROLL_UP** = ``16`` + +Scroll up action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_SCROLL_INTO_VIEW: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SCROLL_INTO_VIEW** = ``17`` + +Scroll into view action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_SCROLL_TO_POINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SCROLL_TO_POINT** = ``18`` + +Scroll to point action, callback argument is set to :ref:`Vector2` with the relative point coordinates. + +.. _class_DisplayServer_constant_ACTION_SET_SCROLL_OFFSET: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SET_SCROLL_OFFSET** = ``19`` + +Set scroll offset action, callback argument is set to :ref:`Vector2` with the scroll offset. + +.. _class_DisplayServer_constant_ACTION_SET_VALUE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SET_VALUE** = ``20`` + +Set value action action, callback argument is set to :ref:`String` or number with the new value. + +.. _class_DisplayServer_constant_ACTION_SHOW_CONTEXT_MENU: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_SHOW_CONTEXT_MENU** = ``21`` + +Show context menu action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_CUSTOM** = ``22`` + +Custom action, callback argument is set to the integer action id. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_AccessibilityLiveMode: + +.. rst-class:: classref-enumeration + +enum **AccessibilityLiveMode**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_LIVE_OFF: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityLiveMode` **LIVE_OFF** = ``0`` + +Indicates that updates to the live region should not be presented. + +.. _class_DisplayServer_constant_LIVE_POLITE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityLiveMode` **LIVE_POLITE** = ``1`` + +Indicates that updates to the live region should be presented at the next opportunity (for example at the end of speaking the current sentence). + +.. _class_DisplayServer_constant_LIVE_ASSERTIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityLiveMode` **LIVE_ASSERTIVE** = ``2`` + +Indicates that updates to the live region have the highest priority and should be presented immediately. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_MouseMode: + +.. rst-class:: classref-enumeration + +enum **MouseMode**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_MOUSE_MODE_VISIBLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_VISIBLE** = ``0`` + +Makes the mouse cursor visible if it is hidden. + +.. _class_DisplayServer_constant_MOUSE_MODE_HIDDEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_HIDDEN** = ``1`` + +Makes the mouse cursor hidden if it is visible. + +.. _class_DisplayServer_constant_MOUSE_MODE_CAPTURED: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_CAPTURED** = ``2`` + +Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window. + +\ **Note:** If you want to process the mouse's movement in this mode, you need to use :ref:`InputEventMouseMotion.relative`. + +.. _class_DisplayServer_constant_MOUSE_MODE_CONFINED: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_CONFINED** = ``3`` + +Confines the mouse cursor to the game window, and make it visible. + +.. _class_DisplayServer_constant_MOUSE_MODE_CONFINED_HIDDEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_CONFINED_HIDDEN** = ``4`` + +Confines the mouse cursor to the game window, and make it hidden. + +.. _class_DisplayServer_constant_MOUSE_MODE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`MouseMode` **MOUSE_MODE_MAX** = ``5`` + +Max value of the :ref:`MouseMode`. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_ScreenOrientation: + +.. rst-class:: classref-enumeration + +enum **ScreenOrientation**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_SCREEN_LANDSCAPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_LANDSCAPE** = ``0`` + +Default landscape orientation. + +.. _class_DisplayServer_constant_SCREEN_PORTRAIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_PORTRAIT** = ``1`` + +Default portrait orientation. + +.. _class_DisplayServer_constant_SCREEN_REVERSE_LANDSCAPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_REVERSE_LANDSCAPE** = ``2`` + +Reverse landscape orientation (upside down). + +.. _class_DisplayServer_constant_SCREEN_REVERSE_PORTRAIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_REVERSE_PORTRAIT** = ``3`` + +Reverse portrait orientation (upside down). + +.. _class_DisplayServer_constant_SCREEN_SENSOR_LANDSCAPE: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_SENSOR_LANDSCAPE** = ``4`` + +Automatic landscape orientation (default or reverse depending on sensor). + +.. _class_DisplayServer_constant_SCREEN_SENSOR_PORTRAIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_SENSOR_PORTRAIT** = ``5`` + +Automatic portrait orientation (default or reverse depending on sensor). + +.. _class_DisplayServer_constant_SCREEN_SENSOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ScreenOrientation` **SCREEN_SENSOR** = ``6`` + +Automatic landscape or portrait orientation (default or reverse depending on sensor). + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_VirtualKeyboardType: + +.. rst-class:: classref-enumeration + +enum **VirtualKeyboardType**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_DEFAULT** = ``0`` + +Default text virtual keyboard. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_MULTILINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_MULTILINE** = ``1`` + +Multiline virtual keyboard. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_NUMBER** = ``2`` + +Virtual number keypad, useful for PIN entry. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_NUMBER_DECIMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_NUMBER_DECIMAL** = ``3`` + +Virtual number keypad, useful for entering fractional numbers. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_PHONE: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_PHONE** = ``4`` + +Virtual phone number keypad. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_EMAIL_ADDRESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_EMAIL_ADDRESS** = ``5`` + +Virtual keyboard with additional keys to assist with typing email addresses. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_PASSWORD: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_PASSWORD** = ``6`` + +Virtual keyboard for entering a password. On most platforms, this should disable autocomplete and autocapitalization. + +\ **Note:** This is not supported on Web. Instead, this behaves identically to :ref:`KEYBOARD_TYPE_DEFAULT`. + +.. _class_DisplayServer_constant_KEYBOARD_TYPE_URL: + +.. rst-class:: classref-enumeration-constant + +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_URL** = ``7`` + +Virtual keyboard with additional keys to assist with typing URLs. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_CursorShape: + +.. rst-class:: classref-enumeration + +enum **CursorShape**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_CURSOR_ARROW: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_ARROW** = ``0`` + +Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a :ref:`LineEdit` or :ref:`TextEdit`. + +.. _class_DisplayServer_constant_CURSOR_IBEAM: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_IBEAM** = ``1`` + +I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as :ref:`LineEdit` or :ref:`TextEdit`. + +.. _class_DisplayServer_constant_CURSOR_POINTING_HAND: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_POINTING_HAND** = ``2`` + +Pointing hand cursor shape. This is used by default when hovering a :ref:`LinkButton` or a URL tag in a :ref:`RichTextLabel`. + +.. _class_DisplayServer_constant_CURSOR_CROSS: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_CROSS** = ``3`` + +Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker. + +.. _class_DisplayServer_constant_CURSOR_WAIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_WAIT** = ``4`` + +Wait cursor. On most cursor themes, this displays a spinning icon *besides* the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also :ref:`CURSOR_BUSY`. + +.. _class_DisplayServer_constant_CURSOR_BUSY: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_BUSY** = ``5`` + +Wait cursor. On most cursor themes, this *replaces* the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also :ref:`CURSOR_WAIT`. + +.. _class_DisplayServer_constant_CURSOR_DRAG: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_DRAG** = ``6`` + +Dragging hand cursor. This is displayed during drag-and-drop operations. See also :ref:`CURSOR_CAN_DROP`. + +.. _class_DisplayServer_constant_CURSOR_CAN_DROP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_CAN_DROP** = ``7`` + +"Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a :ref:`Control` that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also :ref:`CURSOR_DRAG`. + +.. _class_DisplayServer_constant_CURSOR_FORBIDDEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_FORBIDDEN** = ``8`` + +Forbidden cursor. This is displayed during drag-and-drop operations if the hovered :ref:`Control` can't accept the drag-and-drop event. + +.. _class_DisplayServer_constant_CURSOR_VSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_VSIZE** = ``9`` + +Vertical resize cursor. Intended to be displayed when the hovered :ref:`Control` can be vertically resized using the mouse. See also :ref:`CURSOR_VSPLIT`. + +.. _class_DisplayServer_constant_CURSOR_HSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HSIZE** = ``10`` + +Horizontal resize cursor. Intended to be displayed when the hovered :ref:`Control` can be horizontally resized using the mouse. See also :ref:`CURSOR_HSPLIT`. + +.. _class_DisplayServer_constant_CURSOR_BDIAGSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_BDIAGSIZE** = ``11`` + +Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered :ref:`Control` can be resized on both axes at once using the mouse. + +.. _class_DisplayServer_constant_CURSOR_FDIAGSIZE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_FDIAGSIZE** = ``12`` + +Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered :ref:`Control` can be resized on both axes at once using the mouse. + +.. _class_DisplayServer_constant_CURSOR_MOVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_MOVE** = ``13`` + +Move cursor. Intended to be displayed when the hovered :ref:`Control` can be moved using the mouse. + +.. _class_DisplayServer_constant_CURSOR_VSPLIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_VSPLIT** = ``14`` + +Vertical split cursor. This is displayed when hovering a :ref:`Control` with splits that can be vertically resized using the mouse, such as :ref:`VSplitContainer`. On some cursor themes, this cursor may have the same appearance as :ref:`CURSOR_VSIZE`. + +.. _class_DisplayServer_constant_CURSOR_HSPLIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HSPLIT** = ``15`` + +Horizontal split cursor. This is displayed when hovering a :ref:`Control` with splits that can be horizontally resized using the mouse, such as :ref:`HSplitContainer`. On some cursor themes, this cursor may have the same appearance as :ref:`CURSOR_HSIZE`. + +.. _class_DisplayServer_constant_CURSOR_HELP: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_HELP** = ``16`` + +Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked. + +.. _class_DisplayServer_constant_CURSOR_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`CursorShape` **CURSOR_MAX** = ``17`` + +Represents the size of the :ref:`CursorShape` enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_FileDialogMode: + +.. rst-class:: classref-enumeration + +enum **FileDialogMode**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_FILE** = ``0`` + +The native file dialog allows selecting one, and only one file. + +.. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_FILES: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_FILES** = ``1`` + +The native file dialog allows selecting multiple files. + +.. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_DIR: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_DIR** = ``2`` + +The native file dialog only allows selecting a directory, disallowing the selection of any file. + +.. _class_DisplayServer_constant_FILE_DIALOG_MODE_OPEN_ANY: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileDialogMode` **FILE_DIALOG_MODE_OPEN_ANY** = ``3`` + +The native file dialog allows selecting one file or directory. + +.. _class_DisplayServer_constant_FILE_DIALOG_MODE_SAVE_FILE: + +.. rst-class:: classref-enumeration-constant + +:ref:`FileDialogMode` **FILE_DIALOG_MODE_SAVE_FILE** = ``4`` + +The native file dialog will warn when a file exists. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_WindowMode: + +.. rst-class:: classref-enumeration + +enum **WindowMode**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_WINDOW_MODE_WINDOWED: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowMode` **WINDOW_MODE_WINDOWED** = ``0`` + +Windowed mode, i.e. :ref:`Window` doesn't occupy the whole screen (unless set to the size of the screen). + +.. _class_DisplayServer_constant_WINDOW_MODE_MINIMIZED: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowMode` **WINDOW_MODE_MINIMIZED** = ``1`` + +Minimized window mode, i.e. :ref:`Window` is not visible and available on window manager's window list. Normally happens when the minimize button is pressed. + +.. _class_DisplayServer_constant_WINDOW_MODE_MAXIMIZED: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowMode` **WINDOW_MODE_MAXIMIZED** = ``2`` + +Maximized window mode, i.e. :ref:`Window` will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed. + +.. _class_DisplayServer_constant_WINDOW_MODE_FULLSCREEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowMode` **WINDOW_MODE_FULLSCREEN** = ``3`` + +Full screen mode with full multi-window support. + +Full screen window covers the entire display area of a screen and has no decorations. The display's video mode is not changed. + +\ **On Android:** This enables immersive mode. + +\ **On macOS:** A new desktop is used to display the running project. + +\ **Note:** Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling full screen mode. + +.. _class_DisplayServer_constant_WINDOW_MODE_EXCLUSIVE_FULLSCREEN: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowMode` **WINDOW_MODE_EXCLUSIVE_FULLSCREEN** = ``4`` + +A single window full screen mode. This mode has less overhead, but only one window can be open on a given screen at a time (opening a child window or application switching will trigger a full screen transition). + +Full screen window covers the entire display area of a screen and has no border or decorations. The display's video mode is not changed. + +\ **On Android:** This enables immersive mode. + +\ **On Windows:** Depending on video driver, full screen transition might cause screens to go black for a moment. + +\ **On macOS:** A new desktop is used to display the running project. Exclusive full screen mode prevents Dock and Menu from showing up when the mouse pointer is hovering the edge of the screen. + +\ **On Linux (X11):** Exclusive full screen mode bypasses compositor. + +\ **On Linux (Wayland):** Equivalent to :ref:`WINDOW_MODE_FULLSCREEN`. + +\ **Note:** Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports :doc:`multiple resolutions <../tutorials/rendering/multiple_resolutions>` when enabling full screen mode. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_WindowFlags: + +.. rst-class:: classref-enumeration + +enum **WindowFlags**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_RESIZE_DISABLED** = ``0`` + +The window can't be resized by dragging its resize grip. It's still possible to resize the window using :ref:`window_set_size()`. This flag is ignored for full screen windows. + +.. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_BORDERLESS** = ``1`` + +The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. + +.. _class_DisplayServer_constant_WINDOW_FLAG_ALWAYS_ON_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_ALWAYS_ON_TOP** = ``2`` + +The window is floating on top of all other windows. This flag is ignored for full-screen windows. + +.. _class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_TRANSPARENT** = ``3`` + +The window background can be transparent. + +\ **Note:** This flag has no effect if :ref:`is_window_transparency_available()` returns ``false``. + +\ **Note:** Transparency support is implemented on Linux (X11/Wayland), macOS, and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. + +.. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_NO_FOCUS** = ``4`` + +The window can't be focused. No-focus window will ignore all input, except mouse clicks. + +.. _class_DisplayServer_constant_WINDOW_FLAG_POPUP: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_POPUP** = ``5`` + +Window is part of menu or :ref:`OptionButton` dropdown. This flag can't be changed when the window is visible. An active popup window will exclusively receive all input, without stealing focus from its parent. Popup windows are automatically closed when uses click outside it, or when an application is switched. Popup window must have transient parent set (see :ref:`window_set_transient()`). + +.. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_EXTEND_TO_TITLE** = ``6`` + +Window content is expanded to the full size of the window. Unlike borderless window, the frame is left intact and can be used to resize the window, title bar is transparent, but have minimize/maximize/close buttons. + +Use :ref:`window_set_window_buttons_offset()` to adjust minimize/maximize/close buttons offset. + +Use :ref:`window_get_safe_title_margins()` to determine area under the title bar that is not covered by decorations. + +\ **Note:** This flag is implemented only on macOS. + +.. _class_DisplayServer_constant_WINDOW_FLAG_MOUSE_PASSTHROUGH: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_MOUSE_PASSTHROUGH** = ``7`` + +All mouse events are passed to the underlying window of the same application. + +.. _class_DisplayServer_constant_WINDOW_FLAG_SHARP_CORNERS: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_SHARP_CORNERS** = ``8`` + +Window style is overridden, forcing sharp corners. + +\ **Note:** This flag is implemented only on Windows (11). + +.. _class_DisplayServer_constant_WINDOW_FLAG_EXCLUDE_FROM_CAPTURE: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_EXCLUDE_FROM_CAPTURE** = ``9`` + +Window is excluded from screenshots taken by :ref:`screen_get_image()`, :ref:`screen_get_image_rect()`, and :ref:`screen_get_pixel()`. + +\ **Note:** This flag is implemented on macOS and Windows. + +\ **Note:** Setting this flag will **NOT** prevent other apps from capturing an image. It should not be used as a security measure. + +.. _class_DisplayServer_constant_WINDOW_FLAG_POPUP_WM_HINT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_POPUP_WM_HINT** = ``10`` + +Signals the window manager that this window is supposed to be an implementation-defined "popup" (usually a floating, borderless, untileable and immovable child window). + +.. _class_DisplayServer_constant_WINDOW_FLAG_MINIMIZE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_MINIMIZE_DISABLED** = ``11`` + +Window minimize button is disabled. + +\ **Note:** This flag is implemented on macOS and Windows. + +.. _class_DisplayServer_constant_WINDOW_FLAG_MAXIMIZE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_MAXIMIZE_DISABLED** = ``12`` + +Window maximize button is disabled. + +\ **Note:** This flag is implemented on macOS and Windows. + +.. _class_DisplayServer_constant_WINDOW_FLAG_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowFlags` **WINDOW_FLAG_MAX** = ``13`` + +Max value of the :ref:`WindowFlags`. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_WindowEvent: + +.. rst-class:: classref-enumeration + +enum **WindowEvent**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_MOUSE_ENTER** = ``0`` + +Sent when the mouse pointer enters the window. + +.. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_MOUSE_EXIT** = ``1`` + +Sent when the mouse pointer exits the window. + +.. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_IN: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_FOCUS_IN** = ``2`` + +Sent when the window grabs focus. + +.. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_FOCUS_OUT** = ``3`` + +Sent when the window loses focus. + +.. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_CLOSE_REQUEST** = ``4`` + +Sent when the user has attempted to close the window (e.g. close button is pressed). + +.. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_GO_BACK_REQUEST** = ``5`` + +Sent when the device "Back" button is pressed. + +\ **Note:** This event is implemented only on Android. + +.. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_DPI_CHANGE** = ``6`` + +Sent when the window is moved to the display with different DPI, or display DPI is changed. + +\ **Note:** This flag is implemented only on macOS and Linux (Wayland). + +.. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_TITLEBAR_CHANGE** = ``7`` + +Sent when the window title bar decoration is changed (e.g. :ref:`WINDOW_FLAG_EXTEND_TO_TITLE` is set or window entered/exited full screen mode). + +\ **Note:** This flag is implemented only on macOS. + +.. _class_DisplayServer_constant_WINDOW_EVENT_FORCE_CLOSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowEvent` **WINDOW_EVENT_FORCE_CLOSE** = ``8`` + +Sent when the window has been forcibly closed by the Display Server. The window shall immediately hide and clean any internal rendering references. + +\ **Note:** This flag is implemented only on Linux (Wayland). + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_WindowResizeEdge: + +.. rst-class:: classref-enumeration + +enum **WindowResizeEdge**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_WINDOW_EDGE_TOP_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowResizeEdge` **WINDOW_EDGE_TOP_LEFT** = ``0`` + +Top-left edge of a window. + +.. _class_DisplayServer_constant_WINDOW_EDGE_TOP: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowResizeEdge` **WINDOW_EDGE_TOP** = ``1`` + +Top edge of a window. + +.. _class_DisplayServer_constant_WINDOW_EDGE_TOP_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowResizeEdge` **WINDOW_EDGE_TOP_RIGHT** = ``2`` + +Top-right edge of a window. + +.. _class_DisplayServer_constant_WINDOW_EDGE_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowResizeEdge` **WINDOW_EDGE_LEFT** = ``3`` + +Left edge of a window. + +.. _class_DisplayServer_constant_WINDOW_EDGE_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowResizeEdge` **WINDOW_EDGE_RIGHT** = ``4`` + +Right edge of a window. + +.. _class_DisplayServer_constant_WINDOW_EDGE_BOTTOM_LEFT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowResizeEdge` **WINDOW_EDGE_BOTTOM_LEFT** = ``5`` + +Bottom-left edge of a window. + +.. _class_DisplayServer_constant_WINDOW_EDGE_BOTTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowResizeEdge` **WINDOW_EDGE_BOTTOM** = ``6`` + +Bottom edge of a window. + +.. _class_DisplayServer_constant_WINDOW_EDGE_BOTTOM_RIGHT: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowResizeEdge` **WINDOW_EDGE_BOTTOM_RIGHT** = ``7`` + +Bottom-right edge of a window. + +.. _class_DisplayServer_constant_WINDOW_EDGE_MAX: + +.. rst-class:: classref-enumeration-constant + +:ref:`WindowResizeEdge` **WINDOW_EDGE_MAX** = ``8`` + +Represents the size of the :ref:`WindowResizeEdge` enum. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_VSyncMode: + +.. rst-class:: classref-enumeration + +enum **VSyncMode**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_VSYNC_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`VSyncMode` **VSYNC_DISABLED** = ``0`` + +No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (regardless of :ref:`Engine.max_fps`). + +.. _class_DisplayServer_constant_VSYNC_ENABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`VSyncMode` **VSYNC_ENABLED** = ``1`` + +Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (regardless of :ref:`Engine.max_fps`). + +.. _class_DisplayServer_constant_VSYNC_ADAPTIVE: + +.. rst-class:: classref-enumeration-constant + +:ref:`VSyncMode` **VSYNC_ADAPTIVE** = ``2`` + +Behaves like :ref:`VSYNC_DISABLED` when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (regardless of :ref:`Engine.max_fps`). Behaves like :ref:`VSYNC_ENABLED` when using the Compatibility rendering method. + +.. _class_DisplayServer_constant_VSYNC_MAILBOX: + +.. rst-class:: classref-enumeration-constant + +:ref:`VSyncMode` **VSYNC_MAILBOX** = ``3`` + +Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (regardless of :ref:`Engine.max_fps`). + +Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). :ref:`VSYNC_MAILBOX` works best when at least twice as many frames as the display refresh rate are rendered. Behaves like :ref:`VSYNC_ENABLED` when using the Compatibility rendering method. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_HandleType: + +.. rst-class:: classref-enumeration + +enum **HandleType**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_DISPLAY_HANDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandleType` **DISPLAY_HANDLE** = ``0`` + +Display handle: + +- Linux (X11): ``X11::Display*`` for the display. + +- Linux (Wayland): ``wl_display`` for the display. + +- Android: ``EGLDisplay`` for the display. + +.. _class_DisplayServer_constant_WINDOW_HANDLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandleType` **WINDOW_HANDLE** = ``1`` + +Window handle: + +- Windows: ``HWND`` for the window. + +- Linux (X11): ``X11::Window*`` for the window. + +- Linux (Wayland): ``wl_surface`` for the window. + +- macOS: ``NSWindow*`` for the window. + +- iOS: ``UIViewController*`` for the view controller. + +- Android: ``jObject`` for the activity. + +.. _class_DisplayServer_constant_WINDOW_VIEW: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandleType` **WINDOW_VIEW** = ``2`` + +Window view: + +- Windows: ``HDC`` for the window (only with the Compatibility renderer). + +- macOS: ``NSView*`` for the window main view. + +- iOS: ``UIView*`` for the window main view. + +.. _class_DisplayServer_constant_OPENGL_CONTEXT: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandleType` **OPENGL_CONTEXT** = ``3`` + +OpenGL context (only with the Compatibility renderer): + +- Windows: ``HGLRC`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). + +- Linux (X11): ``GLXContext*`` for the window. + +- Linux (Wayland): ``EGLContext`` for the window. + +- macOS: ``NSOpenGLContext*`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). + +- Android: ``EGLContext`` for the window. + +.. _class_DisplayServer_constant_EGL_DISPLAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandleType` **EGL_DISPLAY** = ``4`` + +- Windows: ``EGLDisplay`` for the window (ANGLE). + +- macOS: ``EGLDisplay`` for the window (ANGLE). + +- Linux (Wayland): ``EGLDisplay`` for the window. + +.. _class_DisplayServer_constant_EGL_CONFIG: + +.. rst-class:: classref-enumeration-constant + +:ref:`HandleType` **EGL_CONFIG** = ``5`` + +- Windows: ``EGLConfig`` for the window (ANGLE). + +- macOS: ``EGLConfig`` for the window (ANGLE). + +- Linux (Wayland): ``EGLConfig`` for the window. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_DisplayServer_TTSUtteranceEvent: + +.. rst-class:: classref-enumeration + +enum **TTSUtteranceEvent**: :ref:`πŸ”—` + +.. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_STARTED** = ``0`` + +Utterance has begun to be spoken. + +.. _class_DisplayServer_constant_TTS_UTTERANCE_ENDED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_ENDED** = ``1`` + +Utterance was successfully finished. + +.. _class_DisplayServer_constant_TTS_UTTERANCE_CANCELED: + +.. rst-class:: classref-enumeration-constant + +:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_CANCELED** = ``2`` + +Utterance was canceled, or TTS service was unable to process it. + +.. _class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY: + +.. rst-class:: classref-enumeration-constant + +:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_BOUNDARY** = ``3`` + +Utterance reached a word or sentence boundary. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Constants +--------- + +.. _class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS: + +.. rst-class:: classref-constant + +**SCREEN_WITH_MOUSE_FOCUS** = ``-4`` :ref:`πŸ”—` + +Represents the screen containing the mouse pointer. + +\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. + +.. _class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS: + +.. rst-class:: classref-constant + +**SCREEN_WITH_KEYBOARD_FOCUS** = ``-3`` :ref:`πŸ”—` + +Represents the screen containing the window with the keyboard focus. + +\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. + +.. _class_DisplayServer_constant_SCREEN_PRIMARY: + +.. rst-class:: classref-constant + +**SCREEN_PRIMARY** = ``-2`` :ref:`πŸ”—` + +Represents the primary screen. + +\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. + +.. _class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW: + +.. rst-class:: classref-constant + +**SCREEN_OF_MAIN_WINDOW** = ``-1`` :ref:`πŸ”—` + +Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. + +\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. + +.. _class_DisplayServer_constant_MAIN_WINDOW_ID: + +.. rst-class:: classref-constant + +**MAIN_WINDOW_ID** = ``0`` :ref:`πŸ”—` + +The ID of the main window spawned by the engine, which can be passed to methods expecting a ``window_id``. + +.. _class_DisplayServer_constant_INVALID_WINDOW_ID: + +.. rst-class:: classref-constant + +**INVALID_WINDOW_ID** = ``-1`` :ref:`πŸ”—` + +The ID that refers to a nonexistent window. This is returned by some **DisplayServer** methods if no window matches the requested result. + +.. _class_DisplayServer_constant_INVALID_INDICATOR_ID: + +.. rst-class:: classref-constant + +**INVALID_INDICATOR_ID** = ``-1`` :ref:`πŸ”—` + +The ID that refers to a nonexistent application status indicator. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_DisplayServer_method_accessibility_create_element: + +.. rst-class:: classref-method + +:ref:`RID` **accessibility_create_element**\ (\ window_id\: :ref:`int`, role\: :ref:`AccessibilityRole`\ ) :ref:`πŸ”—` + +Creates a new, empty accessibility element resource. + +\ **Note:** An accessibility element is created and freed automatically for each :ref:`Node`. In general, this function should not be called manually. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_create_sub_element: + +.. rst-class:: classref-method + +:ref:`RID` **accessibility_create_sub_element**\ (\ parent_rid\: :ref:`RID`, role\: :ref:`AccessibilityRole`, insert_pos\: :ref:`int` = -1\ ) :ref:`πŸ”—` + +Creates a new, empty accessibility sub-element resource. Sub-elements can be used to provide accessibility information for objects which are not :ref:`Node`\ s, such as list items, table cells, or menu items. Sub-elements are freed automatically when the parent element is freed, or can be freed early using the :ref:`accessibility_free_element()` method. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_create_sub_text_edit_elements: + +.. rst-class:: classref-method + +:ref:`RID` **accessibility_create_sub_text_edit_elements**\ (\ parent_rid\: :ref:`RID`, shaped_text\: :ref:`RID`, min_height\: :ref:`float`, insert_pos\: :ref:`int` = -1\ ) :ref:`πŸ”—` + +Creates a new, empty accessibility sub-element from the shaped text buffer. Sub-elements are freed automatically when the parent element is freed, or can be freed early using the :ref:`accessibility_free_element()` method. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_element_get_meta: + +.. rst-class:: classref-method + +:ref:`Variant` **accessibility_element_get_meta**\ (\ id\: :ref:`RID`\ ) |const| :ref:`πŸ”—` + +Returns the metadata of the accessibility element. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_element_set_meta: + +.. rst-class:: classref-method + +|void| **accessibility_element_set_meta**\ (\ id\: :ref:`RID`, meta\: :ref:`Variant`\ ) :ref:`πŸ”—` + +Sets the metadata of the accessibility element. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_free_element: + +.. rst-class:: classref-method + +|void| **accessibility_free_element**\ (\ id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Frees an object created by :ref:`accessibility_create_element()`, :ref:`accessibility_create_sub_element()`, or :ref:`accessibility_create_sub_text_edit_elements()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_get_window_root: + +.. rst-class:: classref-method + +:ref:`RID` **accessibility_get_window_root**\ (\ window_id\: :ref:`int`\ ) |const| :ref:`πŸ”—` + +Returns the main accessibility element of the OS native window. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_has_element: + +.. rst-class:: classref-method + +:ref:`bool` **accessibility_has_element**\ (\ id\: :ref:`RID`\ ) |const| :ref:`πŸ”—` + +Returns ``true`` if ``id`` is a valid accessibility element. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_screen_reader_active: + +.. rst-class:: classref-method + +:ref:`int` **accessibility_screen_reader_active**\ (\ ) |const| :ref:`πŸ”—` + +Returns ``1`` if a screen reader, Braille display or other assistive app is active, ``0`` otherwise. Returns ``-1`` if status is unknown. + +\ **Note:** This method is implemented on Linux, macOS, and Windows. + +\ **Note:** Accessibility debugging tools, such as Accessibility Insights for Windows, macOS Accessibility Inspector, or AT-SPI Browser do not count as assistive apps and will not affect this value. To test your app with these tools, set :ref:`ProjectSettings.accessibility/general/accessibility_support` to ``1``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_set_window_focused: + +.. rst-class:: classref-method + +|void| **accessibility_set_window_focused**\ (\ window_id\: :ref:`int`, focused\: :ref:`bool`\ ) :ref:`πŸ”—` + +Sets the window focused state for assistive apps. + +\ **Note:** This method is implemented on Linux, macOS, and Windows. + +\ **Note:** Advanced users only! :ref:`Window` objects call this method automatically. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_set_window_rect: + +.. rst-class:: classref-method + +|void| **accessibility_set_window_rect**\ (\ window_id\: :ref:`int`, rect_out\: :ref:`Rect2`, rect_in\: :ref:`Rect2`\ ) :ref:`πŸ”—` + +Sets window outer (with decorations) and inner (without decorations) bounds for assistive apps. + +\ **Note:** This method is implemented on Linux, macOS, and Windows. + +\ **Note:** Advanced users only! :ref:`Window` objects call this method automatically. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_should_increase_contrast: + +.. rst-class:: classref-method + +:ref:`int` **accessibility_should_increase_contrast**\ (\ ) |const| :ref:`πŸ”—` + +Returns ``1`` if a high-contrast user interface theme should be used, ``0`` otherwise. Returns ``-1`` if status is unknown. + +\ **Note:** This method is implemented on Linux (X11/Wayland, GNOME), macOS, and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_should_reduce_animation: + +.. rst-class:: classref-method + +:ref:`int` **accessibility_should_reduce_animation**\ (\ ) |const| :ref:`πŸ”—` + +Returns ``1`` if flashing, blinking, and other moving content that can cause seizures in users with photosensitive epilepsy should be disabled, ``0`` otherwise. Returns ``-1`` if status is unknown. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_should_reduce_transparency: + +.. rst-class:: classref-method + +:ref:`int` **accessibility_should_reduce_transparency**\ (\ ) |const| :ref:`πŸ”—` + +Returns ``1`` if background images, transparency, and other features that can reduce the contrast between the foreground and background should be disabled, ``0`` otherwise. Returns ``-1`` if status is unknown. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_add_action: + +.. rst-class:: classref-method + +|void| **accessibility_update_add_action**\ (\ id\: :ref:`RID`, action\: :ref:`AccessibilityAction`, callable\: :ref:`Callable`\ ) :ref:`πŸ”—` + +Adds a callback for the accessibility action (action which can be performed by using a special screen reader command or buttons on the Braille display), and marks this action as supported. The action callback receives one :ref:`Variant` argument, which value depends on action type. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_add_child: + +.. rst-class:: classref-method + +|void| **accessibility_update_add_child**\ (\ id\: :ref:`RID`, child_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Adds a child accessibility element. + +\ **Note:** :ref:`Node` children and sub-elements are added to the child list automatically. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_add_custom_action: + +.. rst-class:: classref-method + +|void| **accessibility_update_add_custom_action**\ (\ id\: :ref:`RID`, action_id\: :ref:`int`, action_description\: :ref:`String`\ ) :ref:`πŸ”—` + +Adds support for a custom accessibility action. ``action_id`` is passed as an argument to the callback of :ref:`ACTION_CUSTOM` action. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_add_related_controls: + +.. rst-class:: classref-method + +|void| **accessibility_update_add_related_controls**\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Adds an element that is controlled by this element. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_add_related_described_by: + +.. rst-class:: classref-method + +|void| **accessibility_update_add_related_described_by**\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Adds an element that describes this element. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_add_related_details: + +.. rst-class:: classref-method + +|void| **accessibility_update_add_related_details**\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Adds an element that details this element. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_add_related_flow_to: + +.. rst-class:: classref-method + +|void| **accessibility_update_add_related_flow_to**\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Adds an element that this element flow into. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_add_related_labeled_by: + +.. rst-class:: classref-method + +|void| **accessibility_update_add_related_labeled_by**\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Adds an element that labels this element. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_add_related_radio_group: + +.. rst-class:: classref-method + +|void| **accessibility_update_add_related_radio_group**\ (\ id\: :ref:`RID`, related_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Adds an element that is part of the same radio group. + +\ **Note:** This method should be called on each element of the group, using all other elements as ``related_id``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_active_descendant: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_active_descendant**\ (\ id\: :ref:`RID`, other_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Adds an element that is an active descendant of this element. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_background_color: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_background_color**\ (\ id\: :ref:`RID`, color\: :ref:`Color`\ ) :ref:`πŸ”—` + +Sets element background color. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_bounds: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_bounds**\ (\ id\: :ref:`RID`, p_rect\: :ref:`Rect2`\ ) :ref:`πŸ”—` + +Sets element bounding box, relative to the node position. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_checked: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_checked**\ (\ id\: :ref:`RID`, checekd\: :ref:`bool`\ ) :ref:`πŸ”—` + +Sets element checked state. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_classname: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_classname**\ (\ id\: :ref:`RID`, classname\: :ref:`String`\ ) :ref:`πŸ”—` + +Sets element class name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_color_value: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_color_value**\ (\ id\: :ref:`RID`, color\: :ref:`Color`\ ) :ref:`πŸ”—` + +Sets element color value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_description: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_description**\ (\ id\: :ref:`RID`, description\: :ref:`String`\ ) :ref:`πŸ”—` + +Sets element accessibility description. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_error_message: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_error_message**\ (\ id\: :ref:`RID`, other_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Sets an element which contains an error message for this element. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_extra_info: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_extra_info**\ (\ id\: :ref:`RID`, name\: :ref:`String`\ ) :ref:`πŸ”—` + +Sets element accessibility extra information added to the element name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_flag: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_flag**\ (\ id\: :ref:`RID`, flag\: :ref:`AccessibilityFlags`, value\: :ref:`bool`\ ) :ref:`πŸ”—` + +Sets element flag, see :ref:`AccessibilityFlags`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_focus: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_focus**\ (\ id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Sets currently focused element. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_foreground_color: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_foreground_color**\ (\ id\: :ref:`RID`, color\: :ref:`Color`\ ) :ref:`πŸ”—` + +Sets element foreground color. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_in_page_link_target: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_in_page_link_target**\ (\ id\: :ref:`RID`, other_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Sets target element for the link. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_language: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_language**\ (\ id\: :ref:`RID`, language\: :ref:`String`\ ) :ref:`πŸ”—` + +Sets element text language. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_list_item_count: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_list_item_count**\ (\ id\: :ref:`RID`, size\: :ref:`int`\ ) :ref:`πŸ”—` + +Sets number of items in the list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_list_item_expanded: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_list_item_expanded**\ (\ id\: :ref:`RID`, expanded\: :ref:`bool`\ ) :ref:`πŸ”—` + +Sets list/tree item expanded status. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_list_item_index: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_list_item_index**\ (\ id\: :ref:`RID`, index\: :ref:`int`\ ) :ref:`πŸ”—` + +Sets the position of the element in the list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_list_item_level: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_list_item_level**\ (\ id\: :ref:`RID`, level\: :ref:`int`\ ) :ref:`πŸ”—` + +Sets the hierarchical level of the element in the list. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_list_item_selected: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_list_item_selected**\ (\ id\: :ref:`RID`, selected\: :ref:`bool`\ ) :ref:`πŸ”—` + +Sets list/tree item selected status. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_list_orientation: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_list_orientation**\ (\ id\: :ref:`RID`, vertical\: :ref:`bool`\ ) :ref:`πŸ”—` + +Sets the orientation of the list elements. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_live: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_live**\ (\ id\: :ref:`RID`, live\: :ref:`AccessibilityLiveMode`\ ) :ref:`πŸ”—` + +Sets the priority of the live region updates. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_member_of: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_member_of**\ (\ id\: :ref:`RID`, group_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Sets the element to be a member of the group. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_name: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_name**\ (\ id\: :ref:`RID`, name\: :ref:`String`\ ) :ref:`πŸ”—` + +Sets element accessibility name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_next_on_line: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_next_on_line**\ (\ id\: :ref:`RID`, other_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Sets next element on the line. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_num_jump: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_num_jump**\ (\ id\: :ref:`RID`, jump\: :ref:`float`\ ) :ref:`πŸ”—` + +Sets numeric value jump. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_num_range: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_num_range**\ (\ id\: :ref:`RID`, min\: :ref:`float`, max\: :ref:`float`\ ) :ref:`πŸ”—` + +Sets numeric value range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_num_step: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_num_step**\ (\ id\: :ref:`RID`, step\: :ref:`float`\ ) :ref:`πŸ”—` + +Sets numeric value step. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_num_value: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_num_value**\ (\ id\: :ref:`RID`, position\: :ref:`float`\ ) :ref:`πŸ”—` + +Sets numeric value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_placeholder: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_placeholder**\ (\ id\: :ref:`RID`, placeholder\: :ref:`String`\ ) :ref:`πŸ”—` + +Sets placeholder text. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_popup_type: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_popup_type**\ (\ id\: :ref:`RID`, popup\: :ref:`AccessibilityPopupType`\ ) :ref:`πŸ”—` + +Sets popup type for popup buttons. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_previous_on_line: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_previous_on_line**\ (\ id\: :ref:`RID`, other_id\: :ref:`RID`\ ) :ref:`πŸ”—` + +Sets previous element on the line. .. rst-class:: classref-item-separator ---- -.. _enum_DisplayServer_VSyncMode: +.. _class_DisplayServer_method_accessibility_update_set_role: -.. rst-class:: classref-enumeration +.. rst-class:: classref-method -enum **VSyncMode**: :ref:`πŸ”—` +|void| **accessibility_update_set_role**\ (\ id\: :ref:`RID`, role\: :ref:`AccessibilityRole`\ ) :ref:`πŸ”—` -.. _class_DisplayServer_constant_VSYNC_DISABLED: +Sets element accessibility role. -.. rst-class:: classref-enumeration-constant +.. rst-class:: classref-item-separator -:ref:`VSyncMode` **VSYNC_DISABLED** = ``0`` +---- -No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (regardless of :ref:`Engine.max_fps`). +.. _class_DisplayServer_method_accessibility_update_set_role_description: -.. _class_DisplayServer_constant_VSYNC_ENABLED: +.. rst-class:: classref-method -.. rst-class:: classref-enumeration-constant +|void| **accessibility_update_set_role_description**\ (\ id\: :ref:`RID`, description\: :ref:`String`\ ) :ref:`πŸ”—` -:ref:`VSyncMode` **VSYNC_ENABLED** = ``1`` +Sets element accessibility role description text. -Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (regardless of :ref:`Engine.max_fps`). +.. rst-class:: classref-item-separator -.. _class_DisplayServer_constant_VSYNC_ADAPTIVE: +---- -.. rst-class:: classref-enumeration-constant +.. _class_DisplayServer_method_accessibility_update_set_scroll_x: -:ref:`VSyncMode` **VSYNC_ADAPTIVE** = ``2`` +.. rst-class:: classref-method -Behaves like :ref:`VSYNC_DISABLED` when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (regardless of :ref:`Engine.max_fps`). Behaves like :ref:`VSYNC_ENABLED` when using the Compatibility rendering method. +|void| **accessibility_update_set_scroll_x**\ (\ id\: :ref:`RID`, position\: :ref:`float`\ ) :ref:`πŸ”—` -.. _class_DisplayServer_constant_VSYNC_MAILBOX: +Sets scroll bar x position. -.. rst-class:: classref-enumeration-constant +.. rst-class:: classref-item-separator -:ref:`VSyncMode` **VSYNC_MAILBOX** = ``3`` +---- -Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (regardless of :ref:`Engine.max_fps`). +.. _class_DisplayServer_method_accessibility_update_set_scroll_x_range: -Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). :ref:`VSYNC_MAILBOX` works best when at least twice as many frames as the display refresh rate are rendered. Behaves like :ref:`VSYNC_ENABLED` when using the Compatibility rendering method. +.. rst-class:: classref-method -.. rst-class:: classref-item-separator +|void| **accessibility_update_set_scroll_x_range**\ (\ id\: :ref:`RID`, min\: :ref:`float`, max\: :ref:`float`\ ) :ref:`πŸ”—` ----- +Sets scroll bar x range. -.. _enum_DisplayServer_HandleType: +.. rst-class:: classref-item-separator -.. rst-class:: classref-enumeration +---- -enum **HandleType**: :ref:`πŸ”—` +.. _class_DisplayServer_method_accessibility_update_set_scroll_y: -.. _class_DisplayServer_constant_DISPLAY_HANDLE: +.. rst-class:: classref-method -.. rst-class:: classref-enumeration-constant +|void| **accessibility_update_set_scroll_y**\ (\ id\: :ref:`RID`, position\: :ref:`float`\ ) :ref:`πŸ”—` -:ref:`HandleType` **DISPLAY_HANDLE** = ``0`` +Sets scroll bar y position. -Display handle: +.. rst-class:: classref-item-separator -- Linux (X11): ``X11::Display*`` for the display. +---- -- Linux (Wayland): ``wl_display`` for the display. +.. _class_DisplayServer_method_accessibility_update_set_scroll_y_range: -- Android: ``EGLDisplay`` for the display. +.. rst-class:: classref-method -.. _class_DisplayServer_constant_WINDOW_HANDLE: +|void| **accessibility_update_set_scroll_y_range**\ (\ id\: :ref:`RID`, min\: :ref:`float`, max\: :ref:`float`\ ) :ref:`πŸ”—` -.. rst-class:: classref-enumeration-constant +Sets scroll bar y range. -:ref:`HandleType` **WINDOW_HANDLE** = ``1`` +.. rst-class:: classref-item-separator -Window handle: +---- -- Windows: ``HWND`` for the window. +.. _class_DisplayServer_method_accessibility_update_set_shortcut: -- Linux (X11): ``X11::Window*`` for the window. +.. rst-class:: classref-method -- Linux (Wayland): ``wl_surface`` for the window. +|void| **accessibility_update_set_shortcut**\ (\ id\: :ref:`RID`, shortcut\: :ref:`String`\ ) :ref:`πŸ”—` -- macOS: ``NSWindow*`` for the window. +Sets the list of keyboard shortcuts used by element. -- iOS: ``UIViewController*`` for the view controller. +.. rst-class:: classref-item-separator -- Android: ``jObject`` for the activity. +---- -.. _class_DisplayServer_constant_WINDOW_VIEW: +.. _class_DisplayServer_method_accessibility_update_set_state_description: -.. rst-class:: classref-enumeration-constant +.. rst-class:: classref-method -:ref:`HandleType` **WINDOW_VIEW** = ``2`` +|void| **accessibility_update_set_state_description**\ (\ id\: :ref:`RID`, description\: :ref:`String`\ ) :ref:`πŸ”—` -Window view: +Sets human-readable description of the current checked state. -- Windows: ``HDC`` for the window (only with the Compatibility renderer). +.. rst-class:: classref-item-separator -- macOS: ``NSView*`` for the window main view. +---- -- iOS: ``UIView*`` for the window main view. +.. _class_DisplayServer_method_accessibility_update_set_table_cell_position: -.. _class_DisplayServer_constant_OPENGL_CONTEXT: +.. rst-class:: classref-method -.. rst-class:: classref-enumeration-constant +|void| **accessibility_update_set_table_cell_position**\ (\ id\: :ref:`RID`, row_index\: :ref:`int`, column_index\: :ref:`int`\ ) :ref:`πŸ”—` -:ref:`HandleType` **OPENGL_CONTEXT** = ``3`` +Sets cell position in the table. -OpenGL context (only with the Compatibility renderer): +.. rst-class:: classref-item-separator -- Windows: ``HGLRC`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). +---- -- Linux (X11): ``GLXContext*`` for the window. +.. _class_DisplayServer_method_accessibility_update_set_table_cell_span: -- Linux (Wayland): ``EGLContext`` for the window. +.. rst-class:: classref-method -- macOS: ``NSOpenGLContext*`` for the window (native GL), or ``EGLContext`` for the window (ANGLE). +|void| **accessibility_update_set_table_cell_span**\ (\ id\: :ref:`RID`, row_span\: :ref:`int`, column_span\: :ref:`int`\ ) :ref:`πŸ”—` -- Android: ``EGLContext`` for the window. +Sets cell row/column span. -.. _class_DisplayServer_constant_EGL_DISPLAY: +.. rst-class:: classref-item-separator -.. rst-class:: classref-enumeration-constant +---- -:ref:`HandleType` **EGL_DISPLAY** = ``4`` +.. _class_DisplayServer_method_accessibility_update_set_table_column_count: -- Windows: ``EGLDisplay`` for the window (ANGLE). +.. rst-class:: classref-method -- macOS: ``EGLDisplay`` for the window (ANGLE). +|void| **accessibility_update_set_table_column_count**\ (\ id\: :ref:`RID`, count\: :ref:`int`\ ) :ref:`πŸ”—` -- Linux (Wayland): ``EGLDisplay`` for the window. +Sets number of columns in the table. -.. _class_DisplayServer_constant_EGL_CONFIG: +.. rst-class:: classref-item-separator -.. rst-class:: classref-enumeration-constant +---- -:ref:`HandleType` **EGL_CONFIG** = ``5`` +.. _class_DisplayServer_method_accessibility_update_set_table_column_index: -- Windows: ``EGLConfig`` for the window (ANGLE). +.. rst-class:: classref-method -- macOS: ``EGLConfig`` for the window (ANGLE). +|void| **accessibility_update_set_table_column_index**\ (\ id\: :ref:`RID`, index\: :ref:`int`\ ) :ref:`πŸ”—` -- Linux (Wayland): ``EGLConfig`` for the window. +Sets position of the column. .. rst-class:: classref-item-separator ---- -.. _enum_DisplayServer_TTSUtteranceEvent: +.. _class_DisplayServer_method_accessibility_update_set_table_row_count: -.. rst-class:: classref-enumeration +.. rst-class:: classref-method -enum **TTSUtteranceEvent**: :ref:`πŸ”—` +|void| **accessibility_update_set_table_row_count**\ (\ id\: :ref:`RID`, count\: :ref:`int`\ ) :ref:`πŸ”—` -.. _class_DisplayServer_constant_TTS_UTTERANCE_STARTED: +Sets number of rows in the table. -.. rst-class:: classref-enumeration-constant +.. rst-class:: classref-item-separator -:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_STARTED** = ``0`` +---- -Utterance has begun to be spoken. +.. _class_DisplayServer_method_accessibility_update_set_table_row_index: -.. _class_DisplayServer_constant_TTS_UTTERANCE_ENDED: +.. rst-class:: classref-method -.. rst-class:: classref-enumeration-constant +|void| **accessibility_update_set_table_row_index**\ (\ id\: :ref:`RID`, index\: :ref:`int`\ ) :ref:`πŸ”—` -:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_ENDED** = ``1`` +Sets position of the row in the table. -Utterance was successfully finished. +.. rst-class:: classref-item-separator -.. _class_DisplayServer_constant_TTS_UTTERANCE_CANCELED: +---- -.. rst-class:: classref-enumeration-constant +.. _class_DisplayServer_method_accessibility_update_set_text_align: -:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_CANCELED** = ``2`` +.. rst-class:: classref-method -Utterance was canceled, or TTS service was unable to process it. +|void| **accessibility_update_set_text_align**\ (\ id\: :ref:`RID`, align\: :ref:`HorizontalAlignment`\ ) :ref:`πŸ”—` -.. _class_DisplayServer_constant_TTS_UTTERANCE_BOUNDARY: +Sets element text alignment. -.. rst-class:: classref-enumeration-constant +.. rst-class:: classref-item-separator -:ref:`TTSUtteranceEvent` **TTS_UTTERANCE_BOUNDARY** = ``3`` +---- -Utterance reached a word or sentence boundary. +.. _class_DisplayServer_method_accessibility_update_set_text_decorations: -.. rst-class:: classref-section-separator +.. rst-class:: classref-method ----- +|void| **accessibility_update_set_text_decorations**\ (\ id\: :ref:`RID`, underline\: :ref:`bool`, strikethrough\: :ref:`bool`, overline\: :ref:`bool`\ ) :ref:`πŸ”—` -.. rst-class:: classref-descriptions-group +Sets text underline/overline/strikethrough. -Constants ---------- +.. rst-class:: classref-item-separator -.. _class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS: +---- -.. rst-class:: classref-constant +.. _class_DisplayServer_method_accessibility_update_set_text_orientation: -**SCREEN_WITH_MOUSE_FOCUS** = ``-4`` :ref:`πŸ”—` +.. rst-class:: classref-method -Represents the screen containing the mouse pointer. +|void| **accessibility_update_set_text_orientation**\ (\ id\: :ref:`RID`, vertical\: :ref:`bool`\ ) :ref:`πŸ”—` -\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. +Sets text orientation. -.. _class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS: +.. rst-class:: classref-item-separator -.. rst-class:: classref-constant +---- -**SCREEN_WITH_KEYBOARD_FOCUS** = ``-3`` :ref:`πŸ”—` +.. _class_DisplayServer_method_accessibility_update_set_text_selection: -Represents the screen containing the window with the keyboard focus. +.. rst-class:: classref-method -\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. +|void| **accessibility_update_set_text_selection**\ (\ id\: :ref:`RID`, text_start_id\: :ref:`RID`, start_char\: :ref:`int`, text_end_id\: :ref:`RID`, end_char\: :ref:`int`\ ) :ref:`πŸ”—` -.. _class_DisplayServer_constant_SCREEN_PRIMARY: +Sets text selection to the text field. ``text_start_id`` and ``text_end_id`` should be elements created by :ref:`accessibility_create_sub_text_edit_elements()`. Character offsets are relative to the corresponding element. -.. rst-class:: classref-constant +.. rst-class:: classref-item-separator -**SCREEN_PRIMARY** = ``-2`` :ref:`πŸ”—` +---- -Represents the primary screen. +.. _class_DisplayServer_method_accessibility_update_set_tooltip: -\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. +.. rst-class:: classref-method -.. _class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW: +|void| **accessibility_update_set_tooltip**\ (\ id\: :ref:`RID`, tooltip\: :ref:`String`\ ) :ref:`πŸ”—` -.. rst-class:: classref-constant +Sets tooltip text. -**SCREEN_OF_MAIN_WINDOW** = ``-1`` :ref:`πŸ”—` +.. rst-class:: classref-item-separator -Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. +---- -\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. +.. _class_DisplayServer_method_accessibility_update_set_transform: -.. _class_DisplayServer_constant_MAIN_WINDOW_ID: +.. rst-class:: classref-method -.. rst-class:: classref-constant +|void| **accessibility_update_set_transform**\ (\ id\: :ref:`RID`, transform\: :ref:`Transform2D`\ ) :ref:`πŸ”—` -**MAIN_WINDOW_ID** = ``0`` :ref:`πŸ”—` +Sets element 2D transform. -The ID of the main window spawned by the engine, which can be passed to methods expecting a ``window_id``. +.. rst-class:: classref-item-separator -.. _class_DisplayServer_constant_INVALID_WINDOW_ID: +---- -.. rst-class:: classref-constant +.. _class_DisplayServer_method_accessibility_update_set_url: -**INVALID_WINDOW_ID** = ``-1`` :ref:`πŸ”—` +.. rst-class:: classref-method -The ID that refers to a nonexistent window. This is returned by some **DisplayServer** methods if no window matches the requested result. +|void| **accessibility_update_set_url**\ (\ id\: :ref:`RID`, url\: :ref:`String`\ ) :ref:`πŸ”—` -.. _class_DisplayServer_constant_INVALID_INDICATOR_ID: +Sets link URL. -.. rst-class:: classref-constant +.. rst-class:: classref-item-separator -**INVALID_INDICATOR_ID** = ``-1`` :ref:`πŸ”—` +---- -The ID that refers to a nonexistent application status indicator. +.. _class_DisplayServer_method_accessibility_update_set_value: -.. rst-class:: classref-section-separator +.. rst-class:: classref-method ----- +|void| **accessibility_update_set_value**\ (\ id\: :ref:`RID`, value\: :ref:`String`\ ) :ref:`πŸ”—` -.. rst-class:: classref-descriptions-group +Sets element text value. -Method Descriptions -------------------- +.. rst-class:: classref-item-separator + +---- .. _class_DisplayServer_method_beep: @@ -1694,6 +3724,24 @@ Sets the user's `primary ` **color_picker**\ (\ callback\: :ref:`Callable`\ ) :ref:`πŸ”—` + +Displays OS native color picker. + +Callbacks have the following arguments: ``status: bool, color: Color``. + +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_COLOR_PICKER` feature. + +\ **Note:** This method is only implemented on Linux (X11/Wayland). + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_create_status_indicator: .. rst-class:: classref-method @@ -1714,7 +3762,7 @@ Creates a new application status indicator with the specified icon, tooltip, and :ref:`CursorShape` **cursor_get_shape**\ (\ ) |const| :ref:`πŸ”—` -Returns the default mouse cursor shape set by :ref:`cursor_set_shape`. +Returns the default mouse cursor shape set by :ref:`cursor_set_shape()`. .. rst-class:: classref-item-separator @@ -1728,7 +3776,7 @@ Returns the default mouse cursor shape set by :ref:`cursor_set_shape` or an :ref:`Image`, and it should not be larger than 256Γ—256 to display correctly. Optionally, ``hotspot`` can be set to offset the image's position relative to the click point. By default, ``hotspot`` is set to the top-left corner of the image. See also :ref:`cursor_set_shape`. +\ ``cursor`` can be either a :ref:`Texture2D` or an :ref:`Image`, and it should not be larger than 256Γ—256 to display correctly. Optionally, ``hotspot`` can be set to offset the image's position relative to the click point. By default, ``hotspot`` is set to the top-left corner of the image. See also :ref:`cursor_set_shape()`. .. rst-class:: classref-item-separator @@ -1740,7 +3788,7 @@ Sets a custom mouse cursor image for the given ``shape``. This means the user's |void| **cursor_set_shape**\ (\ shape\: :ref:`CursorShape`\ ) :ref:`πŸ”—` -Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also :ref:`cursor_get_shape` and :ref:`cursor_set_custom_image`. +Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also :ref:`cursor_get_shape()` and :ref:`cursor_set_custom_image()`. .. rst-class:: classref-item-separator @@ -1780,7 +3828,7 @@ Shows a text input dialog which uses the operating system's native look-and-feel Shows a text dialog which uses the operating system's native look-and-feel. ``callback`` should accept a single :ref:`int` parameter which corresponds to the index of the pressed button. -\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG` feature. Supported platforms include macOS and Windows. +\ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG` feature. Supported platforms include macOS, Windows, and Android. .. rst-class:: classref-item-separator @@ -1804,25 +3852,25 @@ Allows the ``process_id`` PID to steal focus from this window. In other words, t .. rst-class:: classref-method -:ref:`Error` **file_dialog_show**\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, callback\: :ref:`Callable`\ ) :ref:`πŸ”—` +:ref:`Error` **file_dialog_show**\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, callback\: :ref:`Callable`, parent_window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` Displays OS native dialog for selecting files or directories in the file system. -Each filter string in the ``filters`` array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. See also :ref:`FileDialog.filters`. +Each filter string in the ``filters`` array should be formatted like this: ``*.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg``. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also :ref:`FileDialog.filters`. -Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int``. **On Android,** callback argument ``selected_filter_index`` is always zero. +Callbacks have the following arguments: ``status: bool, selected_paths: PackedStringArray, selected_filter_index: int``. **On Android,** the third callback argument (``selected_filter_index``) is always ``0``. \ **Note:** This method is implemented if the display server has the :ref:`FEATURE_NATIVE_DIALOG_FILE` feature. Supported platforms include Linux (X11/Wayland), Windows, macOS, and Android. \ **Note:** ``current_directory`` might be ignored. -\ **Note:** On Android, the filter strings in the ``filters`` array should be specified using MIME types, for example:``image/png, image/jpeg"``. Additionally, the ``mode`` :ref:`FILE_DIALOG_MODE_OPEN_ANY` is not supported on Android. +\ **Note:** Embedded file dialog and Windows file dialog support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types. \ **Note:** On Android and Linux, ``show_hidden`` is ignored. \ **Note:** On Android and macOS, native file dialogs have no title. -\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions` to get a list of saved bookmarks. +\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions()` to get a list of saved bookmarks. .. rst-class:: classref-item-separator @@ -1832,11 +3880,11 @@ Callbacks have the following arguments: ``status: bool, selected_paths: PackedSt .. rst-class:: classref-method -:ref:`Error` **file_dialog_with_options_show**\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, root\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, options\: :ref:`Array`\[:ref:`Dictionary`\], callback\: :ref:`Callable`\ ) :ref:`πŸ”—` +:ref:`Error` **file_dialog_with_options_show**\ (\ title\: :ref:`String`, current_directory\: :ref:`String`, root\: :ref:`String`, filename\: :ref:`String`, show_hidden\: :ref:`bool`, mode\: :ref:`FileDialogMode`, filters\: :ref:`PackedStringArray`, options\: :ref:`Array`\[:ref:`Dictionary`\], callback\: :ref:`Callable`, parent_window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` Displays OS native dialog for selecting files or directories in the file system with additional user selectable options. -Each filter string in the ``filters`` array should be formatted like this: ``*.txt,*.doc;Text Files``. The description text of the filter is optional and can be omitted. See also :ref:`FileDialog.filters`. +Each filter string in the ``filters`` array should be formatted like this: ``*.png,*.jpg,*.jpeg;Image Files;image/png,image/jpeg``. The description text of the filter is optional and can be omitted. It is recommended to set both file extension and MIME type. See also :ref:`FileDialog.filters`. \ ``options`` is array of :ref:`Dictionary`\ s with the following keys: @@ -1852,11 +3900,13 @@ Callbacks have the following arguments: ``status: bool, selected_paths: PackedSt \ **Note:** ``current_directory`` might be ignored. +\ **Note:** Embedded file dialog and Windows file dialog support only file extensions, while Android, Linux, and macOS file dialogs also support MIME types. + \ **Note:** On Linux (X11), ``show_hidden`` is ignored. \ **Note:** On macOS, native file dialogs have no title. -\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions` to get a list of saved bookmarks. +\ **Note:** On macOS, sandboxed apps will save security-scoped bookmarks to retain access to the opened folders across multiple sessions. Use :ref:`OS.get_granted_permissions()` to get a list of saved bookmarks. .. rst-class:: classref-item-separator @@ -1868,7 +3918,7 @@ Callbacks have the following arguments: ``status: bool, selected_paths: PackedSt |void| **force_process_and_drop_events**\ (\ ) :ref:`πŸ”—` -Forces window manager processing while ignoring all :ref:`InputEvent`\ s. See also :ref:`process_events`. +Forces window manager processing while ignoring all :ref:`InputEvent`\ s. See also :ref:`process_events()`. \ **Note:** This method is implemented on Windows and macOS. @@ -1884,7 +3934,7 @@ Forces window manager processing while ignoring all :ref:`InputEvent`\[:ref:`Rect2`\] **get_display_cutouts**\ (\ ) |const| :ref:`πŸ”—` -Returns an :ref:`Array` of :ref:`Rect2`, each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also :ref:`get_display_safe_area`. +Returns an :ref:`Array` of :ref:`Rect2`, each of which is the bounding rectangle for a display cutout or notch. These are non-functional areas on edge-to-edge screens used by cameras and sensors. Returns an empty array if the device does not have cutouts. See also :ref:`get_display_safe_area()`. \ **Note:** Currently only implemented on Android. Other platforms will return an empty array even if they do have display cutouts or notches. @@ -1924,7 +3974,9 @@ Returns an :ref:`Array` of :ref:`Rect2`, each of which :ref:`Rect2i` **get_display_safe_area**\ (\ ) |const| :ref:`πŸ”—` -Returns the unobscured area of the display where interactive controls should be rendered. See also :ref:`get_display_cutouts`. +Returns the unobscured area of the display where interactive controls should be rendered. See also :ref:`get_display_cutouts()`. + +\ **Note:** Currently only implemented on Android and iOS. On other platforms, ``screen_get_usable_rect(SCREEN_OF_MAIN_WINDOW)`` will be returned as a fallback. See also :ref:`screen_get_usable_rect()`. .. rst-class:: classref-item-separator @@ -2000,7 +4052,7 @@ Returns the index of the screen that overlaps the most with the given rectangle. Returns ``true`` if positions of **OK** and **Cancel** buttons are swapped in dialogs. This is enabled by default on Windows to follow interface conventions, and be toggled by changing :ref:`ProjectSettings.gui/common/swap_cancel_ok`. -\ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show`. +\ **Note:** This doesn't affect native dialogs such as the ones spawned by :ref:`dialog_show()`. .. rst-class:: classref-item-separator @@ -2151,7 +4203,7 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). -\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked` for more info on how to control it. +\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked()` for more info on how to control it. \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. @@ -2253,7 +4305,7 @@ Returns index of the inserted item, it's not guaranteed to be the same as ``inde An ``accelerator`` can optionally be defined, which is a keyboard shortcut that can be pressed to trigger the menu button even if it's not currently open. The ``accelerator`` is generally a combination of :ref:`KeyModifierMask`\ s and :ref:`Key`\ s using bitwise OR such as ``KEY_MASK_CTRL | KEY_A`` (:kbd:`Ctrl + A`). -\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked` for more info on how to control it. +\ **Note:** Radio-checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. See :ref:`global_menu_set_item_checked()` for more info on how to control it. \ **Note:** The ``callback`` and ``key_callback`` Callables need to accept exactly one Variant parameter, the parameter passed to the Callables will be the value passed to ``tag``. @@ -2491,7 +4543,7 @@ Returns the callback of the item accelerator at index ``idx``. **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Returns number of states of a multistate item. See :ref:`global_menu_add_multistate_item` for details. +Returns number of states of a multistate item. See :ref:`global_menu_add_multistate_item()` for details. \ **Note:** This method is implemented only on macOS. @@ -2507,7 +4559,7 @@ Returns number of states of a multistate item. See :ref:`global_menu_add_multist **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item` for details. +Returns the state of a multistate item. See :ref:`global_menu_add_multistate_item()` for details. \ **Note:** This method is implemented only on macOS. @@ -2523,7 +4575,7 @@ Returns the state of a multistate item. See :ref:`global_menu_add_multistate_ite **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_submenu_item` for more info on how to add a submenu. +Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_submenu_item()` for more info on how to add a submenu. \ **Note:** This method is implemented only on macOS. @@ -2539,7 +4591,7 @@ Returns the submenu ID of the item at index ``idx``. See :ref:`global_menu_add_s **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`global_menu_set_item_tag`, which provides a simple way of assigning context data to items. +Returns the metadata of the specified item, which might be of any type. You can set it with :ref:`global_menu_set_item_tag()`, which provides a simple way of assigning context data to items. \ **Note:** This method is implemented only on macOS. @@ -2637,7 +4689,7 @@ Returns ``true`` if the item at index ``idx`` is checked. Returns ``true`` if the item at index ``idx`` is disabled. When it is disabled it can't be selected, or its action invoked. -See :ref:`global_menu_set_item_disabled` for more info on how to disable an item. +See :ref:`global_menu_set_item_disabled()` for more info on how to disable an item. \ **Note:** This method is implemented only on macOS. @@ -2655,7 +4707,7 @@ See :ref:`global_menu_set_item_disabled` for more info on how to hide an item. +See :ref:`global_menu_set_item_hidden()` for more info on how to hide an item. \ **Note:** This method is implemented only on macOS. @@ -2875,7 +4927,7 @@ Sets the callback of the item at index ``idx``. Callback is emitted when its acc **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Sets number of state of a multistate item. See :ref:`global_menu_add_multistate_item` for details. +Sets number of state of a multistate item. See :ref:`global_menu_add_multistate_item()` for details. \ **Note:** This method is implemented only on macOS. @@ -2909,7 +4961,7 @@ Sets the type of the item at the specified index ``idx`` to radio button. If ``f **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item` for details. +Sets the state of a multistate item. See :ref:`global_menu_add_multistate_item()` for details. \ **Note:** This method is implemented only on macOS. @@ -2941,7 +4993,7 @@ Sets the submenu of the item at index ``idx``. The submenu is the ID of a global **Deprecated:** Use :ref:`NativeMenu` or :ref:`PopupMenu` instead. -Sets the metadata of an item, which may be of any type. You can later get it with :ref:`global_menu_get_item_tag`, which provides a simple way of assigning context data to items. +Sets the metadata of an item, which may be of any type. You can later get it with :ref:`global_menu_get_item_tag()`, which provides a simple way of assigning context data to items. \ **Note:** This method is implemented only on macOS. @@ -3001,7 +5053,7 @@ Registers callables to emit when the menu is respectively about to show or close :ref:`bool` **has_additional_outputs**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if any additional outputs have been registered via :ref:`register_additional_output`. +Returns ``true`` if any additional outputs have been registered via :ref:`register_additional_output()`. .. rst-class:: classref-item-separator @@ -3025,9 +5077,9 @@ Returns ``true`` if the specified ``feature`` is supported by the current **Disp :ref:`bool` **has_hardware_keyboard**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if hardware keyboard is connected. +Returns ``true`` if a hardware keyboard is connected. -\ **Note:** This method is implemented on Android and iOS, on other platforms this method always returns ``true``. +\ **Note:** This method is implemented on Android and iOS. On other platforms, this method always returns ``true``. .. rst-class:: classref-item-separator @@ -3235,7 +5287,7 @@ Sets the active keyboard layout. |bitfield|\[:ref:`MouseButtonMask`\] **mouse_get_button_state**\ (\ ) |const| :ref:`πŸ”—` -Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to :ref:`Input.get_mouse_button_mask`. +Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to :ref:`Input.get_mouse_button_mask()`. .. rst-class:: classref-item-separator @@ -3247,7 +5299,7 @@ Returns the current state of mouse buttons (whether each button is pressed) as a :ref:`MouseMode` **mouse_get_mode**\ (\ ) |const| :ref:`πŸ”—` -Returns the current mouse mode. See also :ref:`mouse_set_mode`. +Returns the current mouse mode. See also :ref:`mouse_set_mode()`. .. rst-class:: classref-item-separator @@ -3271,7 +5323,7 @@ Returns the mouse cursor's current position in screen coordinates. |void| **mouse_set_mode**\ (\ mouse_mode\: :ref:`MouseMode`\ ) :ref:`πŸ”—` -Sets the current mouse mode. See also :ref:`mouse_get_mode`. +Sets the current mouse mode. See also :ref:`mouse_get_mode()`. .. rst-class:: classref-item-separator @@ -3283,7 +5335,7 @@ Sets the current mouse mode. See also :ref:`mouse_get_mode` -Perform window manager processing, including input flushing. See also :ref:`force_process_and_drop_events`, :ref:`Input.flush_buffered_events` and :ref:`Input.use_accumulated_input`. +Perform window manager processing, including input flushing. See also :ref:`force_process_and_drop_events()`, :ref:`Input.flush_buffered_events()` and :ref:`Input.use_accumulated_input`. .. rst-class:: classref-item-separator @@ -3295,7 +5347,7 @@ Perform window manager processing, including input flushing. See also :ref:`forc |void| **register_additional_output**\ (\ object\: :ref:`Object`\ ) :ref:`πŸ”—` -Registers an :ref:`Object` which represents an additional output that will be rendered too, beyond normal windows. The :ref:`Object` is only used as an identifier, which can be later passed to :ref:`unregister_additional_output`. +Registers an :ref:`Object` which represents an additional output that will be rendered too, beyond normal windows. The :ref:`Object` is only used as an identifier, which can be later passed to :ref:`unregister_additional_output()`. This can be used to prevent Redot from skipping rendering when no normal windows are visible. @@ -3336,11 +5388,11 @@ Returns the dots per inch density of the specified screen. If ``screen`` is :ref :ref:`Image` **screen_get_image**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns screenshot of the ``screen``. +Returns a screenshot of the ``screen``. \ **Note:** This method is implemented on Linux (X11), macOS, and Windows. -\ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color. +\ **Note:** On macOS, this method requires the "Screen Recording" permission. If permission is not granted, this method returns a screenshot that will not include other application windows or OS elements not related to the application. .. rst-class:: classref-item-separator @@ -3352,11 +5404,11 @@ Returns screenshot of the ``screen``. :ref:`Image` **screen_get_image_rect**\ (\ rect\: :ref:`Rect2i`\ ) |const| :ref:`πŸ”—` -Returns screenshot of the screen ``rect``. +Returns a screenshot of the screen region defined by ``rect``. \ **Note:** This method is implemented on macOS and Windows. -\ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color. +\ **Note:** On macOS, this method requires the "Screen Recording" permission. If permission is not granted, this method returns a screenshot that will not include other application windows or OS elements not related to the application. .. rst-class:: classref-item-separator @@ -3384,7 +5436,7 @@ Returns the greatest scale factor of all screens. :ref:`ScreenOrientation` **screen_get_orientation**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation`. +Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation()`. \ **Note:** This method is implemented on Android and iOS. @@ -3425,7 +5477,7 @@ Returns the screen's top-left corner position in pixels. On multi-monitor setups | | | | +-------------+ +-------+ -See also :ref:`screen_get_size`. +See also :ref:`screen_get_size()`. \ **Note:** On Linux (Wayland) this method always returns ``(0, 0)``. @@ -3441,7 +5493,7 @@ See also :ref:`screen_get_size`. Returns the current refresh rate of the specified screen. If ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW` (the default value), a screen with the main window will be used. -\ **Note:** Returns ``-1.0`` if the DisplayServer fails to find the refresh rate for the specified screen. On Web, :ref:`screen_get_refresh_rate` will always return ``-1.0`` as there is no way to retrieve the refresh rate on that platform. +\ **Note:** Returns ``-1.0`` if the DisplayServer fails to find the refresh rate for the specified screen. On Web, :ref:`screen_get_refresh_rate()` will always return ``-1.0`` as there is no way to retrieve the refresh rate on that platform. To fallback to a default refresh rate if the method fails, try: @@ -3479,7 +5531,7 @@ Returns the scale factor of the specified screen by index. :ref:`Vector2i` **screen_get_size**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the screen's size in pixels. See also :ref:`screen_get_position` and :ref:`screen_get_usable_rect`. +Returns the screen's size in pixels. See also :ref:`screen_get_position()` and :ref:`screen_get_usable_rect()`. .. rst-class:: classref-item-separator @@ -3491,7 +5543,7 @@ Returns the screen's size in pixels. See also :ref:`screen_get_position` **screen_get_usable_rect**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`πŸ”—` -Returns the portion of the screen that is not obstructed by a status bar in pixels. See also :ref:`screen_get_size`. +Returns the portion of the screen that is not obstructed by a status bar in pixels. See also :ref:`screen_get_size()`. .. rst-class:: classref-item-separator @@ -3503,7 +5555,7 @@ Returns the portion of the screen that is not obstructed by a status bar in pixe :ref:`bool` **screen_is_kept_on**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_set_keep_on`. +Returns ``true`` if the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_set_keep_on()`. .. rst-class:: classref-item-separator @@ -3515,7 +5567,7 @@ Returns ``true`` if the screen should never be turned off by the operating syste |void| **screen_set_keep_on**\ (\ enable\: :ref:`bool`\ ) :ref:`πŸ”—` -Sets whether the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_is_kept_on`. +Sets whether the screen should never be turned off by the operating system's power-saving measures. See also :ref:`screen_is_kept_on()`. .. rst-class:: classref-item-separator @@ -3527,7 +5579,7 @@ Sets whether the screen should never be turned off by the operating system's pow |void| **screen_set_orientation**\ (\ orientation\: :ref:`ScreenOrientation`, screen\: :ref:`int` = -1\ ) :ref:`πŸ”—` -Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation`. +Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation()`. \ **Note:** On iOS, this method has no effect if :ref:`ProjectSettings.display/window/handheld/orientation` is not set to :ref:`SCREEN_SENSOR`. @@ -3535,13 +5587,27 @@ Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation`\ ) :ref:`πŸ”—` + +Sets the ``callable`` that should be called when hardware keyboard is connected/disconnected. ``callable`` should accept a single :ref:`bool` parameter indicating whether the keyboard is connected (true) or disconnected (false). + +\ **Note:** This method is only implemented on Android. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_set_icon: .. rst-class:: classref-method |void| **set_icon**\ (\ image\: :ref:`Image`\ ) :ref:`πŸ”—` -Sets the window icon (usually displayed in the top-left corner) with an :ref:`Image`. To use icons in the operating system's native format, use :ref:`set_native_icon` instead. +Sets the window icon (usually displayed in the top-left corner) with an :ref:`Image`. To use icons in the operating system's native format, use :ref:`set_native_icon()` instead. \ **Note:** Requires support for :ref:`FEATURE_ICON`. @@ -3555,7 +5621,7 @@ Sets the window icon (usually displayed in the top-left corner) with an :ref:`Im |void| **set_native_icon**\ (\ filename\: :ref:`String`\ ) :ref:`πŸ”—` -Sets the window icon (usually displayed in the top-left corner) in the operating system's *native* format. The file at ``filename`` must be in ``.ico`` format on Windows or ``.icns`` on macOS. By using specially crafted ``.ico`` or ``.icns`` icons, :ref:`set_native_icon` allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use :ref:`set_icon` instead. +Sets the window icon (usually displayed in the top-left corner) in the operating system's *native* format. The file at ``filename`` must be in ``.ico`` format on Windows or ``.icns`` on macOS. By using specially crafted ``.ico`` or ``.icns`` icons, :ref:`set_native_icon()` allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use :ref:`set_icon()` instead. \ **Note:** Requires support for :ref:`FEATURE_NATIVE_ICON`. @@ -3577,6 +5643,20 @@ Sets the ``callable`` that should be called when system theme settings are chang ---- +.. _class_DisplayServer_method_show_emoji_and_symbol_picker: + +.. rst-class:: classref-method + +|void| **show_emoji_and_symbol_picker**\ (\ ) |const| :ref:`πŸ”—` + +Opens system emoji and symbol picker. + +\ **Note:** This method is implemented on macOS and Windows. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_status_indicator_get_rect: .. rst-class:: classref-method @@ -3735,8 +5815,6 @@ Note that Redot depends on system libraries for text-to-speech functionality. Th \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. -\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. - .. rst-class:: classref-item-separator ---- @@ -3751,8 +5829,6 @@ Returns an :ref:`PackedStringArray` of voice identifier \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. -\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. - .. rst-class:: classref-item-separator ---- @@ -3767,8 +5843,6 @@ Returns ``true`` if the synthesizer is in a paused state. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. -\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. - .. rst-class:: classref-item-separator ---- @@ -3783,8 +5857,6 @@ Returns ``true`` if the synthesizer is generating speech, or have utterance wait \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. -\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. - .. rst-class:: classref-item-separator ---- @@ -3799,8 +5871,6 @@ Puts the synthesizer into a paused state. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. -\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. - .. rst-class:: classref-item-separator ---- @@ -3815,8 +5885,6 @@ Resumes the synthesizer if it was paused. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. -\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. - .. rst-class:: classref-item-separator ---- @@ -3837,8 +5905,6 @@ Adds a callback, which is called when the utterance has started, finished, cance \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. -\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. - .. rst-class:: classref-item-separator ---- @@ -3851,7 +5917,7 @@ Adds a callback, which is called when the utterance has started, finished, cance Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is cleared first. -- ``voice`` identifier is one of the ``"id"`` values returned by :ref:`tts_get_voices` or one of the values returned by :ref:`tts_get_voices_for_language`. +- ``voice`` identifier is one of the ``"id"`` values returned by :ref:`tts_get_voices()` or one of the values returned by :ref:`tts_get_voices_for_language()`. - ``volume`` ranges from ``0`` (lowest) to ``100`` (highest). @@ -3861,14 +5927,12 @@ Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is clear - ``utterance_id`` is passed as a parameter to the callback functions. -\ **Note:** On Windows and Linux (X11/Wayland), utterance ``text`` can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling :ref:`tts_speak`. +\ **Note:** On Windows and Linux (X11/Wayland), utterance ``text`` can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling :ref:`tts_speak()`. \ **Note:** The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. -\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. - .. rst-class:: classref-item-separator ---- @@ -3883,8 +5947,6 @@ Stops synthesis in progress and removes all utterances from the queue. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Linux), macOS, and Windows. -\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. - .. rst-class:: classref-item-separator ---- @@ -3895,7 +5957,7 @@ Stops synthesis in progress and removes all utterances from the queue. |void| **unregister_additional_output**\ (\ object\: :ref:`Object`\ ) :ref:`πŸ”—` -Unregisters an :ref:`Object` representing an additional output, that was registered via :ref:`register_additional_output`. +Unregisters an :ref:`Object` representing an additional output, that was registered via :ref:`register_additional_output()`. .. rst-class:: classref-item-separator @@ -3959,7 +6021,7 @@ Shows the virtual keyboard if the platform has one. Sets the mouse cursor position to the given ``position`` relative to an origin at the upper left corner of the currently focused game Window Manager window. -\ **Note:** :ref:`warp_mouse` is only supported on Windows, macOS, and Linux (X11/Wayland). It has no effect on Android, iOS, and Web. +\ **Note:** :ref:`warp_mouse()` is only supported on Windows, macOS, and Linux (X11/Wayland). It has no effect on Android, iOS, and Web. .. rst-class:: classref-item-separator @@ -3995,7 +6057,7 @@ Returns ID of the active popup window, or :ref:`INVALID_WINDOW_ID` **window_get_attached_instance_id**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the :ref:`Object.get_instance_id` of the :ref:`Window` the ``window_id`` is attached to. +Returns the :ref:`Object.get_instance_id()` of the :ref:`Window` the ``window_id`` is attached to. .. rst-class:: classref-item-separator @@ -4007,7 +6069,7 @@ Returns the :ref:`Object.get_instance_id` o :ref:`int` **window_get_current_screen**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the screen the window specified by ``window_id`` is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also :ref:`window_set_current_screen`. +Returns the screen the window specified by ``window_id`` is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also :ref:`window_set_current_screen()`. .. rst-class:: classref-item-separator @@ -4031,7 +6093,7 @@ Returns the current value of the given window's ``flag``. :ref:`Vector2i` **window_get_max_size**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the window's maximum size (in pixels). See also :ref:`window_set_max_size`. +Returns the window's maximum size (in pixels). See also :ref:`window_set_max_size()`. .. rst-class:: classref-item-separator @@ -4043,7 +6105,7 @@ Returns the window's maximum size (in pixels). See also :ref:`window_set_max_siz :ref:`Vector2i` **window_get_min_size**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the window's minimum size (in pixels). See also :ref:`window_set_min_size`. +Returns the window's minimum size (in pixels). See also :ref:`window_set_min_size()`. .. rst-class:: classref-item-separator @@ -4105,7 +6167,7 @@ Returns the position of the client area of the given window on the screen. :ref:`Vector2i` **window_get_position_with_decorations**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the position of the given window on the screen including the borders drawn by the operating system. See also :ref:`window_get_position`. +Returns the position of the given window on the screen including the borders drawn by the operating system. See also :ref:`window_get_position()`. .. rst-class:: classref-item-separator @@ -4129,7 +6191,7 @@ Returns left margins (``x``), right margins (``y``) and height (``z``) of the ti :ref:`Vector2i` **window_get_size**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the size of the window specified by ``window_id`` (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also :ref:`window_get_size_with_decorations`, :ref:`window_set_size` and :ref:`window_get_position`. +Returns the size of the window specified by ``window_id`` (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also :ref:`window_get_size_with_decorations()`, :ref:`window_set_size()` and :ref:`window_get_position()`. .. rst-class:: classref-item-separator @@ -4141,7 +6203,7 @@ Returns the size of the window specified by ``window_id`` (in pixels), excluding :ref:`Vector2i` **window_get_size_with_decorations**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the size of the window specified by ``window_id`` (in pixels), including the borders drawn by the operating system. See also :ref:`window_get_size`. +Returns the size of the window specified by ``window_id`` (in pixels), including the borders drawn by the operating system. See also :ref:`window_get_size()`. .. rst-class:: classref-item-separator @@ -4255,7 +6317,7 @@ Makes the window specified by ``window_id`` request attention, which is material |void| **window_set_current_screen**\ (\ screen\: :ref:`int`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Moves the window specified by ``window_id`` to the specified ``screen``. See also :ref:`window_get_current_screen`. +Moves the window specified by ``window_id`` to the specified ``screen``. See also :ref:`window_get_current_screen()`. .. rst-class:: classref-item-separator @@ -4311,7 +6373,7 @@ Enables or disables the given window's given ``flag``. See :ref:`WindowFlags`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets whether `Input Method Editor `__ should be enabled for the window specified by ``window_id``. See also :ref:`window_set_ime_position`. +Sets whether `Input Method Editor `__ should be enabled for the window specified by ``window_id``. See also :ref:`window_set_ime_position()`. .. rst-class:: classref-item-separator @@ -4323,7 +6385,7 @@ Sets whether `Input Method Editor `_ |void| **window_set_ime_position**\ (\ position\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets the position of the `Input Method Editor `__ popup for the specified ``window_id``. Only effective if :ref:`window_set_ime_active` was set to ``true`` for the specified ``window_id``. +Sets the position of the `Input Method Editor `__ popup for the specified ``window_id``. Only effective if :ref:`window_set_ime_active()` was set to ``true`` for the specified ``window_id``. .. rst-class:: classref-item-separator @@ -4363,7 +6425,7 @@ Sets the ``callback`` that should be called when text is entered using the virtu |void| **window_set_max_size**\ (\ max_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets the maximum size of the window specified by ``window_id`` in pixels. Normally, the user will not be able to drag the window to make it larger than the specified size. See also :ref:`window_get_max_size`. +Sets the maximum size of the window specified by ``window_id`` in pixels. Normally, the user will not be able to drag the window to make it larger than the specified size. See also :ref:`window_get_max_size()`. \ **Note:** It's recommended to change this value using :ref:`Window.max_size` instead. @@ -4379,7 +6441,7 @@ Sets the maximum size of the window specified by ``window_id`` in pixels. Normal |void| **window_set_min_size**\ (\ min_size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets the minimum size for the given window to ``min_size`` in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also :ref:`window_get_min_size`. +Sets the minimum size for the given window to ``min_size`` in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also :ref:`window_get_min_size()`. \ **Note:** It's recommended to change this value using :ref:`Window.min_size` instead. @@ -4440,7 +6502,7 @@ Passing an empty array will disable passthrough support (all mouse events will b DisplayServer.WindowSetMousePassthrough(GetNode("Polygon2D").Polygon); // Reset region to default. - DisplayServer.WindowSetMousePassthrough(new Vector2[] {}); + DisplayServer.WindowSetMousePassthrough([]); @@ -4481,7 +6543,7 @@ Sets the position of the given window to ``position``. On multi-monitor setups, | | | | +-------------+ +-------+ -See also :ref:`window_get_position` and :ref:`window_set_size`. +See also :ref:`window_get_position()` and :ref:`window_set_size()`. \ **Note:** It's recommended to change this value using :ref:`Window.position` instead. @@ -4511,7 +6573,7 @@ Sets the ``callback`` that will be called when the window specified by ``window_ |void| **window_set_size**\ (\ size\: :ref:`Vector2i`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Sets the size of the given window to ``size`` (in pixels). See also :ref:`window_get_size` and :ref:`window_get_position`. +Sets the size of the given window to ``size`` (in pixels). See also :ref:`window_get_size()` and :ref:`window_get_position()`. \ **Note:** It's recommended to change this value using :ref:`Window.size` instead. @@ -4603,9 +6665,23 @@ Sets the ``callback`` that will be called when an event occurs in the window spe |void| **window_start_drag**\ (\ window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -Starts a drag operation on the window with the given ``window_id``, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's title bar. Using this method allows the window to participate in space switching, tiling, and other system features. +Starts an interactive drag operation on the window with the given ``window_id``, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's title bar. Using this method allows the window to participate in space switching, tiling, and other system features. + +\ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_window_start_resize: + +.. rst-class:: classref-method + +|void| **window_start_resize**\ (\ edge\: :ref:`WindowResizeEdge`, window_id\: :ref:`int` = 0\ ) :ref:`πŸ”—` -\ **Note:** This method is implemented on Linux(X11/Wayland), macOS, and Windows. +Starts an interactive resize operation on the window with the given ``window_id``, using the current mouse position. Call this method when handling a mouse button being pressed to simulate a pressed event on the window's edge. + +\ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows. .. |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_dtlsserver.rst b/classes/class_dtlsserver.rst index 2d87b3242d0..eeb0e0afef4 100644 --- a/classes/class_dtlsserver.rst +++ b/classes/class_dtlsserver.rst @@ -19,7 +19,7 @@ Helper class to implement a DTLS server. Description ----------- -This class is used to store the state of a DTLS server. Upon :ref:`setup` it converts connected :ref:`PacketPeerUDP` to :ref:`PacketPeerDTLS` accepting them via :ref:`take_connection` as DTLS clients. Under the hood, this class is used to store the DTLS state and cookies of the server. The reason of why the state and cookies are needed is outside of the scope of this documentation. +This class is used to store the state of a DTLS server. Upon :ref:`setup()` it converts connected :ref:`PacketPeerUDP` to :ref:`PacketPeerDTLS` accepting them via :ref:`take_connection()` as DTLS clients. Under the hood, this class is used to store the DTLS state and cookies of the server. The reason of why the state and cookies are needed is outside of the scope of this documentation. Below a small example of how to use it: @@ -39,7 +39,7 @@ Below a small example of how to use it: server.listen(4242) var key = load("key.key") # Your private key. var cert = load("cert.crt") # Your X509 certificate. - dtls.setup(key, cert) + dtls.setup(TlsOptions.server(key, cert)) func _process(delta): while server.is_connection_available(): @@ -66,19 +66,19 @@ Below a small example of how to use it: { private DtlsServer _dtls = new DtlsServer(); private UdpServer _server = new UdpServer(); - private Godot.Collections.Array _peers = new Godot.Collections.Array(); + private Godot.Collections.Array _peers = []; public override void _Ready() { _server.Listen(4242); var key = GD.Load("key.key"); // Your private key. var cert = GD.Load("cert.crt"); // Your X509 certificate. - _dtls.Setup(key, cert); + _dtls.Setup(TlsOptions.Server(key, cert)); } public override void _Process(double delta) { - while (Server.IsConnectionAvailable()) + while (_server.IsConnectionAvailable()) { PacketPeerUdp peer = _server.TakeConnection(); PacketPeerDtls dtlsPeer = _dtls.TakeConnection(peer); @@ -201,7 +201,7 @@ Method Descriptions :ref:`Error` **setup**\ (\ server_options\: :ref:`TLSOptions`\ ) :ref:`πŸ”—` -Setup the DTLS server to use the given ``server_options``. See :ref:`TLSOptions.server`. +Setup the DTLS server to use the given ``server_options``. See :ref:`TLSOptions.server()`. .. rst-class:: classref-item-separator @@ -213,7 +213,7 @@ Setup the DTLS server to use the given ``server_options``. See :ref:`TLSOptions. :ref:`PacketPeerDTLS` **take_connection**\ (\ udp_peer\: :ref:`PacketPeerUDP`\ ) :ref:`πŸ”—` -Try to initiate the DTLS handshake with the given ``udp_peer`` which must be already connected (see :ref:`PacketPeerUDP.connect_to_host`). +Try to initiate the DTLS handshake with the given ``udp_peer`` which must be already connected (see :ref:`PacketPeerUDP.connect_to_host()`). \ **Note:** You must check that the state of the return PacketPeerUDP is :ref:`PacketPeerDTLS.STATUS_HANDSHAKING`, as it is normal that 50% of the new connections will be invalid due to cookie exchange. diff --git a/classes/class_editorcommandpalette.rst b/classes/class_editorcommandpalette.rst index 6cd27c9d278..f8f335daada 100644 --- a/classes/class_editorcommandpalette.rst +++ b/classes/class_editorcommandpalette.rst @@ -42,7 +42,7 @@ Command key names use slash delimiters to distinguish sections, for example: ``" -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_command_palette`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_command_palette()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_editorcontextmenuplugin.rst b/classes/class_editorcontextmenuplugin.rst index f5156d6e190..f46422bf2bf 100644 --- a/classes/class_editorcontextmenuplugin.rst +++ b/classes/class_editorcontextmenuplugin.rst @@ -64,7 +64,7 @@ enum **ContextMenuSlot**: :ref:`πŸ”—` **CONTEXT_SLOT_SCENE_TREE** = ``0`` -Context menu of Scene dock. :ref:`_popup_menu` will be called with a list of paths to currently selected nodes, while option callback will receive the list of currently selected nodes. +Context menu of Scene dock. :ref:`_popup_menu()` will be called with a list of paths to currently selected nodes, while option callback will receive the list of currently selected nodes. .. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_FILESYSTEM: @@ -72,7 +72,15 @@ Context menu of Scene dock. :ref:`_popup_menu` **CONTEXT_SLOT_FILESYSTEM** = ``1`` -Context menu of FileSystem dock. :ref:`_popup_menu` and option callback will be called with list of paths of the currently selected files. +Context menu of FileSystem dock. :ref:`_popup_menu()` and option callback will be called with list of paths of the currently selected files. + +.. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_SCRIPT_EDITOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContextMenuSlot` **CONTEXT_SLOT_SCRIPT_EDITOR** = ``2`` + +Context menu of Script editor's script tabs. :ref:`_popup_menu()` will be called with the path to the currently edited script, while option callback will receive reference to that script. .. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_FILESYSTEM_CREATE: @@ -80,15 +88,45 @@ Context menu of FileSystem dock. :ref:`_popup_menu` **CONTEXT_SLOT_FILESYSTEM_CREATE** = ``3`` -The "Create..." submenu of FileSystem dock's context menu. :ref:`_popup_menu` and option callback will be called with list of paths of the currently selected files. +The "Create..." submenu of FileSystem dock's context menu. :ref:`_popup_menu()` and option callback will be called with list of paths of the currently selected files. -.. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_SCRIPT_EDITOR: +.. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_SCRIPT_EDITOR_CODE: .. rst-class:: classref-enumeration-constant -:ref:`ContextMenuSlot` **CONTEXT_SLOT_SCRIPT_EDITOR** = ``2`` +:ref:`ContextMenuSlot` **CONTEXT_SLOT_SCRIPT_EDITOR_CODE** = ``4`` + +Context menu of Script editor's code editor. :ref:`_popup_menu()` will be called with the path to the :ref:`CodeEdit` node. You can fetch it using this code: + +:: + + func _popup_menu(paths): + var code_edit = Engine.get_main_loop().root.get_node(paths[0]); + +The option callback will receive reference to that node. You can use :ref:`CodeEdit` methods to perform symbol lookups etc. + +.. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_SCENE_TABS: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContextMenuSlot` **CONTEXT_SLOT_SCENE_TABS** = ``5`` + +Context menu of scene tabs. :ref:`_popup_menu()` will be called with the path of the clicked scene, or empty :ref:`PackedStringArray` if the menu was opened on empty space. The option callback will receive the path of the clicked scene, or empty :ref:`String` if none was clicked. + +.. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_2D_EDITOR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ContextMenuSlot` **CONTEXT_SLOT_2D_EDITOR** = ``6`` + +Context menu of 2D editor's basic right-click menu. :ref:`_popup_menu()` will be called with paths to all :ref:`CanvasItem` nodes under the cursor. You can fetch them using this code: + +:: + + func _popup_menu(paths): + var canvas_item = Engine.get_main_loop().root.get_node(paths[0]); # Replace 0 with the desired index. -Context menu of Scene dock. :ref:`_popup_menu` will be called with the path to the currently edited script, while option callback will receive reference to that script. +The paths array is empty if there weren't any nodes under cursor. The option callback will receive a typed array of :ref:`CanvasItem` nodes. .. rst-class:: classref-section-separator @@ -105,7 +143,7 @@ Method Descriptions |void| **_popup_menu**\ (\ paths\: :ref:`PackedStringArray`\ ) |virtual| :ref:`πŸ”—` -Called when creating a context menu, custom options can be added by using the :ref:`add_context_menu_item` or :ref:`add_context_menu_item_from_shortcut` functions. ``paths`` contains currently selected paths (depending on menu), which can be used to conditionally add options. +Called when creating a context menu, custom options can be added by using the :ref:`add_context_menu_item()` or :ref:`add_context_menu_item_from_shortcut()` functions. ``paths`` contains currently selected paths (depending on menu), which can be used to conditionally add options. .. rst-class:: classref-item-separator @@ -124,7 +162,7 @@ Add custom option to the context menu of the plugin's specified slot. When the o func _popup_menu(paths): add_context_menu_item("File Custom options", handle, ICON) -If you want to assign shortcut to the menu item, use :ref:`add_context_menu_item_from_shortcut` instead. +If you want to assign shortcut to the menu item, use :ref:`add_context_menu_item_from_shortcut()` instead. .. rst-class:: classref-item-separator @@ -136,7 +174,7 @@ If you want to assign shortcut to the menu item, use :ref:`add_context_menu_item |void| **add_context_menu_item_from_shortcut**\ (\ name\: :ref:`String`, shortcut\: :ref:`Shortcut`, icon\: :ref:`Texture2D` = null\ ) :ref:`πŸ”—` -Add custom option to the context menu of the plugin's specified slot. The option will have the ``shortcut`` assigned and reuse its callback. The shortcut has to be registered beforehand with :ref:`add_menu_shortcut`. +Add custom option to the context menu of the plugin's specified slot. The option will have the ``shortcut`` assigned and reuse its callback. The shortcut has to be registered beforehand with :ref:`add_menu_shortcut()`. :: @@ -166,7 +204,7 @@ Add a submenu to the context menu of the plugin's specified slot. The submenu is popup_menu.add_item("White") popup_menu.id_pressed.connect(_on_color_submenu_option) - add_context_menu_item("Set Node Color", popup_menu) + add_context_submenu_item("Set Node Color", popup_menu) .. rst-class:: classref-item-separator @@ -178,7 +216,7 @@ Add a submenu to the context menu of the plugin's specified slot. The submenu is |void| **add_menu_shortcut**\ (\ shortcut\: :ref:`Shortcut`, callback\: :ref:`Callable`\ ) :ref:`πŸ”—` -Registers a shortcut associated with the plugin's context menu. This method should be called once (e.g. in plugin's :ref:`Object._init`). ``callback`` will be called when user presses the specified ``shortcut`` while the menu's context is in effect (e.g. FileSystem dock is focused). Callback should take single :ref:`Array` argument; array contents depend on context menu slot. +Registers a shortcut associated with the plugin's context menu. This method should be called once (e.g. in plugin's :ref:`Object._init()`). ``callback`` will be called when user presses the specified ``shortcut`` while the menu's context is in effect (e.g. FileSystem dock is focused). Callback should take single :ref:`Array` argument; array contents depend on context menu slot. :: diff --git a/classes/class_editordebuggerplugin.rst b/classes/class_editordebuggerplugin.rst index 61fae088b64..29f172a7a4a 100644 --- a/classes/class_editordebuggerplugin.rst +++ b/classes/class_editordebuggerplugin.rst @@ -21,11 +21,11 @@ Description **EditorDebuggerPlugin** provides functions related to the editor side of the debugger. -To interact with the debugger, an instance of this class must be added to the editor via :ref:`EditorPlugin.add_debugger_plugin`. +To interact with the debugger, an instance of this class must be added to the editor via :ref:`EditorPlugin.add_debugger_plugin()`. -Once added, the :ref:`_setup_session` callback will be called for every :ref:`EditorDebuggerSession` available to the plugin, and when new ones are created (the sessions may be inactive during this stage). +Once added, the :ref:`_setup_session()` callback will be called for every :ref:`EditorDebuggerSession` available to the plugin, and when new ones are created (the sessions may be inactive during this stage). -You can retrieve the available :ref:`EditorDebuggerSession`\ s via :ref:`get_sessions` or get a specific one via :ref:`get_session`. +You can retrieve the available :ref:`EditorDebuggerSession`\ s via :ref:`get_sessions()` or get a specific one via :ref:`get_session()`. .. tabs:: @@ -90,7 +90,7 @@ To connect on the running game side, use the :ref:`EngineDebugger` and similar functions *called in the editor* do not print anything, the Output Log prints only game messages. +\ **Note:** While the game is running, :ref:`@GlobalScope.print()` and similar functions *called in the editor* do not print anything, the Output Log prints only game messages. .. rst-class:: classref-reftable-group @@ -157,7 +157,7 @@ Override this method to be notified when all breakpoints are cleared in the edit :ref:`bool` **_capture**\ (\ message\: :ref:`String`, data\: :ref:`Array`, session_id\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Override this method to process incoming messages. The ``session_id`` is the ID of the :ref:`EditorDebuggerSession` that received the ``message``. Use :ref:`get_session` to retrieve the session. This method should return ``true`` if the message is recognized. +Override this method to process incoming messages. The ``session_id`` is the ID of the :ref:`EditorDebuggerSession` that received the ``message``. Use :ref:`get_session()` to retrieve the session. This method should return ``true`` if the message is recognized. .. rst-class:: classref-item-separator @@ -181,7 +181,7 @@ Override this method to be notified when a breakpoint line has been clicked in t :ref:`bool` **_has_capture**\ (\ capture\: :ref:`String`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to enable receiving messages from the debugger. If ``capture`` is "my_message" then messages starting with "my_message:" will be passes to the :ref:`_capture` method. +Override this method to enable receiving messages from the debugger. If ``capture`` is "my_message" then messages starting with "my_message:" will be passed to the :ref:`_capture()` method. .. rst-class:: classref-item-separator @@ -219,7 +219,7 @@ Returns the :ref:`EditorDebuggerSession` with the g Returns an array of :ref:`EditorDebuggerSession` currently available to this debugger plugin. -\ **Note:** Sessions in the array may be inactive, check their state via :ref:`EditorDebuggerSession.is_active`. +\ **Note:** Sessions in the array may be inactive, check their state via :ref:`EditorDebuggerSession.is_active()`. .. |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_editordebuggersession.rst b/classes/class_editordebuggersession.rst index 35e3bb47328..3ab3c4d4acf 100644 --- a/classes/class_editordebuggersession.rst +++ b/classes/class_editordebuggersession.rst @@ -21,7 +21,7 @@ Description This class cannot be directly instantiated and must be retrieved via a :ref:`EditorDebuggerPlugin`. -You can add tabs to the session UI via :ref:`add_session_tab`, send messages via :ref:`send_message`, and toggle :ref:`EngineProfiler`\ s via :ref:`toggle_profiler`. +You can add tabs to the session UI via :ref:`add_session_tab()`, send messages via :ref:`send_message()`, and toggle :ref:`EngineProfiler`\ s via :ref:`toggle_profiler()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_editorexportplatform.rst b/classes/class_editorexportplatform.rst index 39f545d3e02..e3ff96f7f5f 100644 --- a/classes/class_editorexportplatform.rst +++ b/classes/class_editorexportplatform.rst @@ -23,7 +23,7 @@ Description Base resource that provides the functionality of exporting a release build of a project to a platform, from the editor. Stores platform-specific metadata such as the name and supported features of the platform, and performs the exporting of projects, PCK files, and ZIP files. Uses an export template for the platform provided at the time of project exporting. -Used in scripting by :ref:`EditorExportPlugin` to configure platform-specific customization of scenes and resources. See :ref:`EditorExportPlugin._begin_customize_scenes` and :ref:`EditorExportPlugin._begin_customize_resources` for more details. +Used in scripting by :ref:`EditorExportPlugin` to configure platform-specific customization of scenes and resources. See :ref:`EditorExportPlugin._begin_customize_scenes()` and :ref:`EditorExportPlugin._begin_customize_resources()` for more details. .. rst-class:: classref-introduction-group @@ -65,9 +65,9 @@ Methods +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`get_current_presets`\ (\ ) |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_forced_export_files`\ (\ ) |static| | + | :ref:`PackedStringArray` | :ref:`get_forced_export_files`\ (\ preset\: :ref:`EditorExportPreset`\ ) |static| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_internal_export_files`\ (\ ) |static| | + | :ref:`Dictionary` | :ref:`get_internal_export_files`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_message_category`\ (\ index\: :ref:`int`\ ) |const| | +-----------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -159,7 +159,7 @@ flags **DebugFlags**: :ref:`πŸ”—` :ref:`DebugFlags` **DEBUG_FLAG_DUMB_CLIENT** = ``1`` -Flag is set if remotely debugged project is expected to use remote file system. If set, :ref:`gen_export_flags` will add ``--remove-fs`` and ``--remote-fs-password`` (if password is set in the editor settings) command line arguments to the list. +Flag is set if remotely debugged project is expected to use remote file system. If set, :ref:`gen_export_flags()` will add ``--remote-fs`` and ``--remote-fs-password`` (if password is set in the editor settings) command line arguments to the list. .. _class_EditorExportPlatform_constant_DEBUG_FLAG_REMOTE_DEBUG: @@ -167,7 +167,7 @@ Flag is set if remotely debugged project is expected to use remote file system. :ref:`DebugFlags` **DEBUG_FLAG_REMOTE_DEBUG** = ``2`` -Flag is set if remote debug is enabled. If set, :ref:`gen_export_flags` will add ``--remote-debug`` and ``--breakpoints`` (if breakpoints are selected in the script editor or added by the plugin) command line arguments to the list. +Flag is set if remote debug is enabled. If set, :ref:`gen_export_flags()` will add ``--remote-debug`` and ``--breakpoints`` (if breakpoints are selected in the script editor or added by the plugin) command line arguments to the list. .. _class_EditorExportPlatform_constant_DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST: @@ -175,7 +175,7 @@ Flag is set if remote debug is enabled. If set, :ref:`gen_export_flags` **DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST** = ``4`` -Flag is set if remotely debugged project is running on the localhost. If set, :ref:`gen_export_flags` will use ``localhost`` instead of :ref:`EditorSettings.network/debug/remote_host` as remote debugger host. +Flag is set if remotely debugged project is running on the localhost. If set, :ref:`gen_export_flags()` will use ``localhost`` instead of :ref:`EditorSettings.network/debug/remote_host` as remote debugger host. .. _class_EditorExportPlatform_constant_DEBUG_FLAG_VIEW_COLLISIONS: @@ -183,7 +183,7 @@ Flag is set if remotely debugged project is running on the localhost. If set, :r :ref:`DebugFlags` **DEBUG_FLAG_VIEW_COLLISIONS** = ``8`` -Flag is set if "Visible Collision Shapes" remote debug option is enabled. If set, :ref:`gen_export_flags` will add ``--debug-collisions`` command line arguments to the list. +Flag is set if "Visible Collision Shapes" remote debug option is enabled. If set, :ref:`gen_export_flags()` will add ``--debug-collisions`` command line arguments to the list. .. _class_EditorExportPlatform_constant_DEBUG_FLAG_VIEW_NAVIGATION: @@ -191,7 +191,7 @@ Flag is set if "Visible Collision Shapes" remote debug option is enabled. If set :ref:`DebugFlags` **DEBUG_FLAG_VIEW_NAVIGATION** = ``16`` -Flag is set if Visible Navigation" remote debug option is enabled. If set, :ref:`gen_export_flags` will add ``--debug-navigation`` command line arguments to the list. +Flag is set if Visible Navigation" remote debug option is enabled. If set, :ref:`gen_export_flags()` will add ``--debug-navigation`` command line arguments to the list. .. rst-class:: classref-section-separator @@ -288,7 +288,7 @@ Exports project files for the specified preset. This method can be used to imple \ ``shared_cb`` is called for exported native shared/static libraries and have the following arguments: ``file_path: String``, ``tags: PackedStringArray``, ``target_folder: String``. -\ **Note:** ``file_index`` and ``file_count`` are intended for progress tracking only and aren't necesserely unique and precise. +\ **Note:** ``file_index`` and ``file_count`` are intended for progress tracking only and aren't necessarily unique and precise. .. rst-class:: classref-item-separator @@ -360,7 +360,7 @@ Returns array of :ref:`EditorExportPreset`\ s for this .. rst-class:: classref-method -:ref:`PackedStringArray` **get_forced_export_files**\ (\ ) |static| :ref:`πŸ”—` +:ref:`PackedStringArray` **get_forced_export_files**\ (\ preset\: :ref:`EditorExportPreset`\ ) |static| :ref:`πŸ”—` Returns array of core file names that always should be exported regardless of preset config. @@ -372,7 +372,7 @@ Returns array of core file names that always should be exported regardless of pr .. rst-class:: classref-method -:ref:`Dictionary` **get_internal_export_files**\ (\ ) |static| :ref:`πŸ”—` +:ref:`Dictionary` **get_internal_export_files**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) :ref:`πŸ”—` Returns additional files that should always be exported regardless of preset configuration, and are not part of the project source. The returned :ref:`Dictionary` contains filename keys (:ref:`String`) and their corresponding raw data (:ref:`PackedByteArray`). diff --git a/classes/class_editorexportplatformandroid.rst b/classes/class_editorexportplatformandroid.rst index a9761943dde..f1e774982cd 100644 --- a/classes/class_editorexportplatformandroid.rst +++ b/classes/class_editorexportplatformandroid.rst @@ -54,6 +54,8 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`custom_template/release` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`gesture/swipe_to_dismiss` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`gradle_build/android_source_template` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`gradle_build/compress_native_libraries` | @@ -430,8 +432,6 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`version/name` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`wear_os/swipe_to_dismiss` | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr_features/xr_mode` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -570,6 +570,22 @@ Path to an APK file to use as a custom export template for release exports. If l ---- +.. _class_EditorExportPlatformAndroid_property_gesture/swipe_to_dismiss: + +.. rst-class:: classref-property + +:ref:`bool` **gesture/swipe_to_dismiss** :ref:`πŸ”—` + +If ``true``, `Swipe to dismiss `__ will be enabled. + +This functionality is intended for smartwatches and is generally ignored on standard Android devices. However, some devices may not ignore it. Therefore, it is recommended to keep this feature disabled for standard Android apps to avoid unexpected behavior. + +\ **Note:** This is ``false`` by default. To enable this behavior, :ref:`gradle_build/use_gradle_build` is required. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformAndroid_property_gradle_build/android_source_template: .. rst-class:: classref-property @@ -2772,7 +2788,7 @@ Allows an application to write to the user dictionary. :ref:`bool` **screen/immersive_mode** :ref:`πŸ”—` -If ``true``, hides navigation and status bar. See :ref:`DisplayServer.window_set_mode` to toggle it at runtime. +If ``true``, hides the navigation and status bar. Set :ref:`DisplayServer.window_set_mode()` to change this at runtime. .. rst-class:: classref-item-separator @@ -2862,20 +2878,6 @@ Application version visible to the user. Falls back to :ref:`ProjectSettings.app ---- -.. _class_EditorExportPlatformAndroid_property_wear_os/swipe_to_dismiss: - -.. rst-class:: classref-property - -:ref:`bool` **wear_os/swipe_to_dismiss** :ref:`πŸ”—` - -If ``true``, `Swipe to dismiss `__ will be enabled on Wear OS. - -\ **Note:** This is ``true`` by default. To disable this behavior, :ref:`gradle_build/use_gradle_build` is required. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorExportPlatformAndroid_property_xr_features/xr_mode: .. rst-class:: classref-property diff --git a/classes/class_editorexportplatformextension.rst b/classes/class_editorexportplatformextension.rst index 01e1709bca3..03030487075 100644 --- a/classes/class_editorexportplatformextension.rst +++ b/classes/class_editorexportplatformextension.rst @@ -21,7 +21,7 @@ Description External :ref:`EditorExportPlatform` implementations should inherit from this class. -To use :ref:`EditorExportPlatform`, register it using the :ref:`EditorPlugin.add_export_platform` method first. +To use :ref:`EditorExportPlatform`, register it using the :ref:`EditorPlugin.add_export_platform()` method first. .. rst-class:: classref-reftable-group @@ -118,9 +118,9 @@ Method Descriptions **Optional.**\ -Returns ``true``, if specified ``preset`` is valid and can be exported. Use :ref:`set_config_error` and :ref:`set_config_missing_templates` to set error details. +Returns ``true``, if specified ``preset`` is valid and can be exported. Use :ref:`set_config_error()` and :ref:`set_config_missing_templates()` to set error details. -Usual implementation can call :ref:`_has_valid_export_configuration` and :ref:`_has_valid_project_configuration` to determine if export is possible. +Usual implementation can call :ref:`_has_valid_export_configuration()` and :ref:`_has_valid_project_configuration()` to determine if export is possible. .. rst-class:: classref-item-separator @@ -186,7 +186,7 @@ Creates a full project at ``path`` for the specified ``preset``. This method is called when "Export" button is pressed in the export dialog. -This method implementation can call :ref:`EditorExportPlatform.save_pack` or :ref:`EditorExportPlatform.save_zip` to use default PCK/ZIP export process, or calls :ref:`EditorExportPlatform.export_project_files` and implement custom callback for processing each exported file. +This method implementation can call :ref:`EditorExportPlatform.save_pack()` or :ref:`EditorExportPlatform.save_zip()` to use default PCK/ZIP export process, or calls :ref:`EditorExportPlatform.export_project_files()` and implement custom callback for processing each exported file. .. rst-class:: classref-item-separator @@ -318,11 +318,11 @@ Additionally, the following keys are supported: - ``default_value: Variant``, default value of the property. -- ``update_visibility: bool``, if set to ``true``, :ref:`_get_export_option_visibility` is called for each property when this property is changed. +- ``update_visibility: bool``, if set to ``true``, :ref:`_get_export_option_visibility()` is called for each property when this property is changed. -- ``required: bool``, if set to ``true``, this property warnings are critical, and should be resolved to make export possible. This value is a hint for the :ref:`_has_valid_export_configuration` implementation, and not used by the engine directly. +- ``required: bool``, if set to ``true``, this property warnings are critical, and should be resolved to make export possible. This value is a hint for the :ref:`_has_valid_export_configuration()` implementation, and not used by the engine directly. -See also :ref:`Object._get_property_list`. +See also :ref:`Object._get_property_list()`. .. rst-class:: classref-item-separator @@ -336,7 +336,7 @@ See also :ref:`Object._get_property_list`. +Returns platform logo displayed in the export dialog, logo should be 32x32 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale()`. .. rst-class:: classref-item-separator @@ -364,7 +364,7 @@ Returns export platform name. **Optional.**\ -Returns one-click deploy menu item icon for the specified ``device``, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale`. +Returns one-click deploy menu item icon for the specified ``device``, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale()`. .. rst-class:: classref-item-separator @@ -476,7 +476,7 @@ Returns array of platform specific features for the specified ``preset``. **Optional.**\ -Returns icon of the one-click deploy menu button, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale`. +Returns icon of the one-click deploy menu button, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale()`. .. rst-class:: classref-item-separator @@ -574,7 +574,7 @@ Returns ``true`` if export options list is changed and presets should be updated :ref:`String` **get_config_error**\ (\ ) |const| :ref:`πŸ”—` -Returns current configuration error message text. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. +Returns current configuration error message text. This method should be called only from the :ref:`_can_export()`, :ref:`_has_valid_export_configuration()`, or :ref:`_has_valid_project_configuration()` implementations. .. rst-class:: classref-item-separator @@ -586,7 +586,7 @@ Returns current configuration error message text. This method should be called o :ref:`bool` **get_config_missing_templates**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true`` is export templates are missing from the current configuration. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. +Returns ``true`` is export templates are missing from the current configuration. This method should be called only from the :ref:`_can_export()`, :ref:`_has_valid_export_configuration()`, or :ref:`_has_valid_project_configuration()` implementations. .. rst-class:: classref-item-separator @@ -598,7 +598,7 @@ Returns ``true`` is export templates are missing from the current configuration. |void| **set_config_error**\ (\ error_text\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Sets current configuration error message text. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. +Sets current configuration error message text. This method should be called only from the :ref:`_can_export()`, :ref:`_has_valid_export_configuration()`, or :ref:`_has_valid_project_configuration()` implementations. .. rst-class:: classref-item-separator @@ -610,7 +610,7 @@ Sets current configuration error message text. This method should be called only |void| **set_config_missing_templates**\ (\ missing_templates\: :ref:`bool`\ ) |const| :ref:`πŸ”—` -Set to ``true`` is export templates are missing from the current configuration. This method should be called only from the :ref:`_can_export`, :ref:`_has_valid_export_configuration`, or :ref:`_has_valid_project_configuration` implementations. +Set to ``true`` is export templates are missing from the current configuration. This method should be called only from the :ref:`_can_export()`, :ref:`_has_valid_export_configuration()`, or :ref:`_has_valid_project_configuration()` implementations. .. |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_editorexportplatformios.rst b/classes/class_editorexportplatformios.rst index 6daf10c1a51..a5323175767 100644 --- a/classes/class_editorexportplatformios.rst +++ b/classes/class_editorexportplatformios.rst @@ -50,8 +50,6 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/export_project_only` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`application/generate_simulator_library_if_missing` | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`application/icon_interpolation` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`application/min_ios_version` | @@ -639,18 +637,6 @@ If ``true``, exports iOS project files without building an XCArchive or ``.ipa`` ---- -.. _class_EditorExportPlatformIOS_property_application/generate_simulator_library_if_missing: - -.. rst-class:: classref-property - -:ref:`bool` **application/generate_simulator_library_if_missing** :ref:`πŸ”—` - -If ``true``, and ARM64 simulator library is missing from the export template, it is automatically generated from ARM64 device library. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorExportPlatformIOS_property_application/icon_interpolation: .. rst-class:: classref-property @@ -892,7 +878,7 @@ Additional data added to the root ```` section of the `.entitlements ` **entitlements/game_center** :ref:`πŸ”—` -Enable to allow access to Game Center features. `com.apple.developer.game-center `__. +If ``true``, allows access to Game Center features. See `com.apple.developer.game-center `__. .. rst-class:: classref-item-separator @@ -904,7 +890,7 @@ Enable to allow access to Game Center features. `com.apple.developer.game-center :ref:`bool` **entitlements/increased_memory_limit** :ref:`πŸ”—` -Enable if app may perform better with a higher memory limit. `com.apple.developer.kernel.increased-memory-limit `__. +If ``true``, hints that the app might perform better with a higher memory limit. See `com.apple.developer.kernel.increased-memory-limit `__. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplatformlinuxbsd.rst b/classes/class_editorexportplatformlinuxbsd.rst index 082c9a7912d..45b54dc1f56 100644 --- a/classes/class_editorexportplatformlinuxbsd.rst +++ b/classes/class_editorexportplatformlinuxbsd.rst @@ -78,7 +78,7 @@ Application executable architecture. Supported architectures: ``x86_32``, ``x86_64``, ``arm64``, ``arm32``, ``rv64``, ``ppc64``, ``ppc32``, and ``loongarch64``. -Official export templates include ``x86_32`` and ``x86_64`` binaries only. +Official export templates include ``x86_32``, ``x86_64``, ``arm32``, and ``arm64`` binaries only. .. rst-class:: classref-item-separator diff --git a/classes/class_editorexportplatformweb.rst b/classes/class_editorexportplatformweb.rst index 42c1a0207c4..51c742a4adb 100644 --- a/classes/class_editorexportplatformweb.rst +++ b/classes/class_editorexportplatformweb.rst @@ -363,7 +363,7 @@ If ``false``, the exported game will not support threads. As a result, it is mor :ref:`bool` **vram_texture_compression/for_desktop** :ref:`πŸ”—` -If ``true``, allows textures to be optimized for desktop through the S3TC algorithm. +If ``true``, allows textures to be optimized for desktop through the S3TC/BPTC algorithm. .. rst-class:: classref-item-separator @@ -375,7 +375,7 @@ If ``true``, allows textures to be optimized for desktop through the S3TC algori :ref:`bool` **vram_texture_compression/for_mobile** :ref:`πŸ”—` -If ``true`` allows textures to be optimized for mobile through the ETC2 algorithm. +If ``true`` allows textures to be optimized for mobile through the ETC2/ASTC algorithm. .. |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_editorexportplatformwindows.rst b/classes/class_editorexportplatformwindows.rst index c38597dfbe0..8e6f0c55c1d 100644 --- a/classes/class_editorexportplatformwindows.rst +++ b/classes/class_editorexportplatformwindows.rst @@ -299,8 +299,6 @@ Application executable architecture. Supported architectures: ``x86_32``, ``x86_64``, and ``arm64``. -Official export templates include ``x86_32`` and ``x86_64`` binaries only. - .. rst-class:: classref-item-separator ---- diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 6a27ae0b839..e0b26137f3c 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -19,9 +19,9 @@ A script that is executed when exporting the project. Description ----------- -**EditorExportPlugin**\ s are automatically invoked whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, :ref:`_export_begin` is called at the beginning of the export process and then :ref:`_export_file` is called for each exported file. +**EditorExportPlugin**\ s are automatically invoked whenever the user exports the project. Their most common use is to determine what files are being included in the exported project. For each plugin, :ref:`_export_begin()` is called at the beginning of the export process and then :ref:`_export_file()` is called for each exported file. -To use **EditorExportPlugin**, register it using the :ref:`EditorPlugin.add_export_plugin` method first. +To use **EditorExportPlugin**, register it using the :ref:`EditorPlugin.add_export_plugin()` method first. .. rst-class:: classref-introduction-group @@ -87,6 +87,8 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_supports_platform`\ (\ platform\: :ref:`EditorExportPlatform`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedByteArray` | :ref:`_update_android_prebuilt_manifest`\ (\ platform\: :ref:`EditorExportPlatform`, manifest_data\: :ref:`PackedByteArray`\ ) |virtual| |const| | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_file`\ (\ path\: :ref:`String`, file\: :ref:`PackedByteArray`, remap\: :ref:`bool`\ ) | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_ios_bundle_file`\ (\ path\: :ref:`String`\ ) | @@ -133,7 +135,7 @@ Method Descriptions Return ``true`` if this plugin will customize resources based on the platform and features used. -When enabled, :ref:`_get_customization_configuration_hash` and :ref:`_customize_resource` will be called and must be implemented. +When enabled, :ref:`_get_customization_configuration_hash()` and :ref:`_customize_resource()` will be called and must be implemented. .. rst-class:: classref-item-separator @@ -147,9 +149,9 @@ When enabled, :ref:`_get_customization_configuration_hash` and :ref:`_customize_scene` will be called and must be implemented. +When enabled, :ref:`_get_customization_configuration_hash()` and :ref:`_customize_scene()` will be called and must be implemented. -\ **Note:** :ref:`_customize_scene` will only be called for scenes that have been modified since the last export. +\ **Note:** :ref:`_customize_scene()` will only be called for scenes that have been modified since the last export. .. rst-class:: classref-item-separator @@ -165,9 +167,9 @@ Customize a resource. If changes are made to it, return the same or a new resour The ``path`` argument is only used when customizing an actual file, otherwise this means that this resource is part of another one and it will be empty. -Implementing this method is required if :ref:`_begin_customize_resources` returns ``true``. +Implementing this method is required if :ref:`_begin_customize_resources()` returns ``true``. -\ **Note:** When customizing any of the following types and returning another resource, the other resource should not be skipped using :ref:`skip` in :ref:`_export_file`: +\ **Note:** When customizing any of the following types and returning another resource, the other resource should not be skipped using :ref:`skip()` in :ref:`_export_file()`: - :ref:`AtlasTexture`\ @@ -193,7 +195,7 @@ Implementing this method is required if :ref:`_begin_customize_resources` returns ``true``. +Implementing this method is required if :ref:`_begin_customize_scenes()` returns ``true``. .. rst-class:: classref-item-separator @@ -253,9 +255,9 @@ Virtual method to be overridden by the user. Called when the export is finished. |void| **_export_file**\ (\ path\: :ref:`String`, type\: :ref:`String`, features\: :ref:`PackedStringArray`\ ) |virtual| :ref:`πŸ”—` -Virtual method to be overridden by the user. Called for each exported file before :ref:`_customize_resource` and :ref:`_customize_scene`. The arguments can be used to identify the file. ``path`` is the path of the file, ``type`` is the :ref:`Resource` represented by the file (e.g. :ref:`PackedScene`), and ``features`` is the list of features for the export. +Virtual method to be overridden by the user. Called for each exported file before :ref:`_customize_resource()` and :ref:`_customize_scene()`. The arguments can be used to identify the file. ``path`` is the path of the file, ``type`` is the :ref:`Resource` represented by the file (e.g. :ref:`PackedScene`), and ``features`` is the list of features for the export. -Calling :ref:`skip` inside this callback will make the file not included in the export. +Calling :ref:`skip()` inside this callback will make the file not included in the export. .. rst-class:: classref-item-separator @@ -361,7 +363,7 @@ Virtual method to be overridden by the user. This is used at export time to upda Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations. -Implementing this method is required if :ref:`_begin_customize_resources` returns ``true``. +Implementing this method is required if :ref:`_begin_customize_resources()` returns ``true``. .. rst-class:: classref-item-separator @@ -401,7 +403,7 @@ Validates ``option`` and returns the visibility for the specified ``platform``. Check the requirements for the given ``option`` and return a non-empty warning string if they are not met. -\ **Note:** Use :ref:`get_option` to check the value of the export options. +\ **Note:** Use :ref:`get_option()` to check the value of the export options. .. rst-class:: classref-item-separator @@ -417,7 +419,7 @@ Return a list of export options that can be configured for this export plugin. Each element in the return value is a :ref:`Dictionary` with the following keys: -- ``option``: A dictionary with the structure documented by :ref:`Object.get_property_list`, but all keys are optional. +- ``option``: A dictionary with the structure documented by :ref:`Object.get_property_list()`, but all keys are optional. - ``default_value``: The default value for this option. @@ -477,7 +479,7 @@ Implementing this method is required. :ref:`bool` **_should_update_export_options**\ (\ platform\: :ref:`EditorExportPlatform`\ ) |virtual| |const| :ref:`πŸ”—` -Return ``true``, if the result of :ref:`_get_export_options` has changed and the export options of preset corresponding to ``platform`` should be updated. +Return ``true``, if the result of :ref:`_get_export_options()` has changed and the export options of preset corresponding to ``platform`` should be updated. .. rst-class:: classref-item-separator @@ -495,6 +497,22 @@ Return ``true`` if the plugin supports the given ``platform``. ---- +.. _class_EditorExportPlugin_private_method__update_android_prebuilt_manifest: + +.. rst-class:: classref-method + +:ref:`PackedByteArray` **_update_android_prebuilt_manifest**\ (\ platform\: :ref:`EditorExportPlatform`, manifest_data\: :ref:`PackedByteArray`\ ) |virtual| |const| :ref:`πŸ”—` + +Provide access to the Android prebuilt manifest and allows the plugin to modify it if needed. + +Implementers of this virtual method should take the binary manifest data from ``manifest_data``, copy it, modify it, and then return it with the modifications. + +If no modifications are needed, then an empty :ref:`PackedByteArray` should be returned. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlugin_method_add_file: .. rst-class:: classref-method @@ -503,9 +521,9 @@ Return ``true`` if the plugin supports the given ``platform``. Adds a custom file to be exported. ``path`` is the virtual path that can be used to load the file, ``file`` is the binary data of the file. -When called inside :ref:`_export_file` and ``remap`` is ``true``, the current file will not be exported, but instead remapped to this custom file. ``remap`` is ignored when called in other places. +When called inside :ref:`_export_file()` and ``remap`` is ``true``, the current file will not be exported, but instead remapped to this custom file. ``remap`` is ignored when called in other places. -\ ``file`` will not be imported, so consider using :ref:`_customize_resource` to remap imported resources. +\ ``file`` will not be imported, so consider using :ref:`_customize_resource()` to remap imported resources. .. rst-class:: classref-item-separator @@ -543,7 +561,7 @@ Adds a C++ code to the iOS export. The final code is created from the code appen Adds a dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary. -\ **Note:** For static libraries (\*.a) works in same way as :ref:`add_ios_framework`. +\ **Note:** For static libraries (\*.a) works in same way as :ref:`add_ios_framework()`. \ **Note:** This method should not be used for System libraries as they are already present on the device. @@ -659,7 +677,7 @@ Returns currently used export preset. :ref:`Variant` **get_option**\ (\ name\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns the current value of an export option supplied by :ref:`_get_export_options`. +Returns the current value of an export option supplied by :ref:`_get_export_options()`. .. rst-class:: classref-item-separator @@ -671,7 +689,7 @@ Returns the current value of an export option supplied by :ref:`_get_export_opti |void| **skip**\ (\ ) :ref:`πŸ”—` -To be called inside :ref:`_export_file`. Skips the current file, so it's not included in the export. +To be called inside :ref:`_export_file()`. Skips the current file, so it's not included in the export. .. |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_editorexportpreset.rst b/classes/class_editorexportpreset.rst index 38c10078ce6..ad097cbb103 100644 --- a/classes/class_editorexportpreset.rst +++ b/classes/class_editorexportpreset.rst @@ -66,6 +66,8 @@ Methods +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_preset_name`\ (\ ) |const| | +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`get_project_setting`\ (\ name\: :ref:`StringName`\ ) | + +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_script_export_mode`\ (\ ) |const| | +---------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_version`\ (\ name\: :ref:`StringName`, windows_version\: :ref:`bool`\ ) |const| | @@ -273,7 +275,7 @@ Method Descriptions :ref:`bool` **are_advanced_options_enabled**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true``, is "Advanced" toggle is enabled in the export dialog. +Returns ``true`` if "Advanced" toggle is enabled in the export dialog. .. rst-class:: classref-item-separator @@ -297,7 +299,7 @@ Returns string with a comma separated list of custom features. :ref:`Dictionary` **get_customized_files**\ (\ ) |const| :ref:`πŸ”—` -Returns :ref:`Dictionary` of files selected in the "Resources" tab of the export dialog. Dictionary keys are file names and values are export mode - ``"strip``, ``"keep"``, or ``"remove"``. See also :ref:`get_file_export_mode`. +Returns :ref:`Dictionary` of files selected in the "Resources" tab of the export dialog. Dictionary keys are file names and values are export mode - ``"strip"``, ``"keep"``, or ``"remove"``. See also :ref:`get_file_export_mode()`. .. rst-class:: classref-item-separator @@ -321,7 +323,7 @@ Returns number of files selected in the "Resources" tab of the export dialog. :ref:`bool` **get_encrypt_directory**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true``, PCK directory encryption is enabled in the export dialog. +Returns ``true`` if PCK directory encryption is enabled in the export dialog. .. rst-class:: classref-item-separator @@ -333,7 +335,7 @@ Returns ``true``, PCK directory encryption is enabled in the export dialog. :ref:`bool` **get_encrypt_pck**\ (\ ) |const| :ref:`πŸ”—` -Returns ``true``, PCK encryption is enabled in the export dialog. +Returns ``true`` if PCK encryption is enabled in the export dialog. .. rst-class:: classref-item-separator @@ -483,6 +485,18 @@ Returns export preset name. ---- +.. _class_EditorExportPreset_method_get_project_setting: + +.. rst-class:: classref-method + +:ref:`Variant` **get_project_setting**\ (\ name\: :ref:`StringName`\ ) :ref:`πŸ”—` + +Returns the value of the setting identified by ``name`` using export preset feature tag overrides instead of current OS features. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPreset_method_get_script_export_mode: .. rst-class:: classref-method @@ -515,7 +529,7 @@ If ``windows_version`` is ``true``, formats the returned version number to be co :ref:`bool` **has**\ (\ property\: :ref:`StringName`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if preset has specified property. +Returns ``true`` if the preset has the property named ``property``. .. rst-class:: classref-item-separator diff --git a/classes/class_editorfeatureprofile.rst b/classes/class_editorfeatureprofile.rst index 3e0adcdbb68..f1aafb896b9 100644 --- a/classes/class_editorfeatureprofile.rst +++ b/classes/class_editorfeatureprofile.rst @@ -225,9 +225,9 @@ Returns ``true`` if the ``feature`` is disabled. When a feature is disabled, it :ref:`Error` **load_from_file**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's **Export** button or the :ref:`save_to_file` method. +Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's **Export** button or the :ref:`save_to_file()` method. -\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir()`. .. rst-class:: classref-item-separator @@ -239,9 +239,9 @@ Loads an editor feature profile from a file. The file must follow the JSON forma :ref:`Error` **save_to_file**\ (\ path\: :ref:`String`\ ) :ref:`πŸ”—` -Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the :ref:`load_from_file` method. +Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's **Import** button or the :ref:`load_from_file()` method. -\ **Note:** Feature profiles created via the user interface are saved in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **Note:** Feature profiles created via the user interface are saved in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index c739d3ed75f..fce551203dc 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -21,6 +21,8 @@ Description **EditorFileDialog** is an enhanced version of :ref:`FileDialog` available only to editor plugins. Additional features include list of favorited/recent files and the ability to see files as thumbnails grid instead of list. +Unlike :ref:`FileDialog`, **EditorFileDialog** does not have a property for using native dialogs. Instead, native dialogs can be enabled globally via the :ref:`EditorSettings.interface/editor/use_native_file_dialogs` editor setting. They are also enabled automatically when running in sandbox (e.g. on macOS). + .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_editorfilesystem.rst b/classes/class_editorfilesystem.rst index 0515f96921c..404539665ca 100644 --- a/classes/class_editorfilesystem.rst +++ b/classes/class_editorfilesystem.rst @@ -21,7 +21,7 @@ Description This object holds information of all resources in the filesystem, their types, etc. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_filesystem`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_filesystem()`. .. rst-class:: classref-reftable-group @@ -205,9 +205,9 @@ Returns ``true`` if the filesystem is being scanned. Reimports a set of files. Call this if these files or their ``.import`` files were directly edited by script or an external program. -If the file type changed or the file was newly created, use :ref:`update_file` or :ref:`scan`. +If the file type changed or the file was newly created, use :ref:`update_file()` or :ref:`scan()`. -\ **Note:** This function blocks until the import is finished. However, the main loop iteration, including timers and :ref:`Node._process`, will occur during the import process due to progress bar updates. Avoid calls to :ref:`reimport_files` or :ref:`scan` while an import is in progress. +\ **Note:** This function blocks until the import is finished. However, the main loop iteration, including timers and :ref:`Node._process()`, will occur during the import process due to progress bar updates. Avoid calls to :ref:`reimport_files()` or :ref:`scan()` while an import is in progress. .. rst-class:: classref-item-separator @@ -245,7 +245,7 @@ Check if the source of any imported resource changed. Add a file in an existing directory, or schedule file information to be updated on editor restart. Can be used to update text files saved by an external program. -This will not import the file. To reimport, call :ref:`reimport_files` or :ref:`scan` methods. +This will not import the file. To reimport, call :ref:`reimport_files()` or :ref:`scan()` methods. .. |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_editorimportplugin.rst b/classes/class_editorimportplugin.rst index 7ccb2b25985..6df2268045b 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -21,7 +21,7 @@ Description **EditorImportPlugin**\ s provide a way to extend the editor's resource import functionality. Use them to import resources from custom files or to provide alternatives to the editor's existing importers. -EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`_get_recognized_extensions` and :ref:`_get_resource_type`. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the ``.godot/imported`` directory (see :ref:`ProjectSettings.application/config/use_hidden_project_data_directory`). +EditorImportPlugins work by associating with specific file extensions and a resource type. See :ref:`_get_recognized_extensions()` and :ref:`_get_resource_type()`. They may optionally specify some import presets that affect the import process. EditorImportPlugins are responsible for creating the resources and saving them in the ``.godot/imported`` directory (see :ref:`ProjectSettings.application/config/use_hidden_project_data_directory`). Below is an example EditorImportPlugin that imports a :ref:`Mesh` from a file with the extension ".special" or ".spec": @@ -85,7 +85,7 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr public override string[] _GetRecognizedExtensions() { - return new string[] { "special", "spec" }; + return ["special", "spec"]; } public override string _GetSaveExtension() @@ -110,14 +110,14 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr public override Godot.Collections.Array _GetImportOptions(string path, int presetIndex) { - return new Godot.Collections.Array - { + return + [ new Godot.Collections.Dictionary { { "name", "myOption" }, { "default_value", false }, - } - }; + }, + ]; } public override Error _Import(string sourceFile, string savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles) @@ -137,7 +137,7 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr -To use **EditorImportPlugin**, register it using the :ref:`EditorPlugin.add_import_plugin` method first. +To use **EditorImportPlugin**, register it using the :ref:`EditorPlugin.add_import_plugin()` method first. .. rst-class:: classref-introduction-group @@ -306,7 +306,7 @@ Returns ``true`` to make all options always visible. :ref:`int` **_get_preset_count**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Gets the number of initial presets defined by the plugin. Use :ref:`_get_import_options` to get the default options for the preset and :ref:`_get_preset_name` to get the name of the preset. +Gets the number of initial presets defined by the plugin. Use :ref:`_get_import_options()` to get the default options for the preset and :ref:`_get_preset_name()` to get the name of the preset. .. rst-class:: classref-item-separator @@ -404,7 +404,7 @@ This method must be overridden to do the actual importing work. See this class' :ref:`Error` **append_import_external_resource**\ (\ path\: :ref:`String`, custom_options\: :ref:`Dictionary` = {}, custom_importer\: :ref:`String` = "", generator_parameters\: :ref:`Variant` = null\ ) :ref:`πŸ”—` -This function can only be called during the :ref:`_import` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the ``custom_options``. Additionally, in cases where multiple importers can handle a file, the ``custom_importer`` can be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. ``generator_parameters`` defines optional extra metadata which will be stored as ``generator_parameters`` in the ``remap`` section of the ``.import`` file, for example to store a md5 hash of the source data. +This function can only be called during the :ref:`_import()` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the ``custom_options``. Additionally, in cases where multiple importers can handle a file, the ``custom_importer`` can be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. ``generator_parameters`` defines optional extra metadata which will be stored as ``generator_parameters`` in the ``remap`` section of the ``.import`` file, for example to store a md5 hash of the source data. .. |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_editorinspector.rst b/classes/class_editorinspector.rst index 0ae74125c56..c708a8ba0e8 100644 --- a/classes/class_editorinspector.rst +++ b/classes/class_editorinspector.rst @@ -19,9 +19,9 @@ A control used to edit properties of an object. Description ----------- -This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the **EditorInspector** used in the editor's Inspector dock, use :ref:`EditorInterface.get_inspector`. +This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the **EditorInspector** used in the editor's Inspector dock, use :ref:`EditorInterface.get_inspector()`. -\ **EditorInspector** will show properties in the same order as the array returned by :ref:`Object.get_property_list`. +\ **EditorInspector** will show properties in the same order as the array returned by :ref:`Object.get_property_list()`. If a property's name is path-like (i.e. if it contains forward slashes), **EditorInspector** will create nested sections for "directories" along the path. For example, if a property is named ``highlighting/gdscript/node_path_color``, it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section. diff --git a/classes/class_editorinspectorplugin.rst b/classes/class_editorinspectorplugin.rst index 9d13dc70898..cec4bb7d73c 100644 --- a/classes/class_editorinspectorplugin.rst +++ b/classes/class_editorinspectorplugin.rst @@ -21,17 +21,17 @@ Description **EditorInspectorPlugin** allows adding custom property editors to :ref:`EditorInspector`. -When an object is edited, the :ref:`_can_handle` function is called and must return ``true`` if the object type is supported. +When an object is edited, the :ref:`_can_handle()` function is called and must return ``true`` if the object type is supported. -If supported, the function :ref:`_parse_begin` will be called, allowing to place custom controls at the beginning of the class. +If supported, the function :ref:`_parse_begin()` will be called, allowing to place custom controls at the beginning of the class. -Subsequently, the :ref:`_parse_category` and :ref:`_parse_property` are called for every category and property. They offer the ability to add custom controls to the inspector too. +Subsequently, the :ref:`_parse_category()` and :ref:`_parse_property()` are called for every category and property. They offer the ability to add custom controls to the inspector too. -Finally, :ref:`_parse_end` will be called. +Finally, :ref:`_parse_end()` will be called. On each of these calls, the "add" functions can be called. -To use **EditorInspectorPlugin**, register it using the :ref:`EditorPlugin.add_inspector_plugin` method first. +To use **EditorInspectorPlugin**, register it using the :ref:`EditorPlugin.add_inspector_plugin()` method first. .. rst-class:: classref-introduction-group diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 5f227c64846..b9dce8b9e52 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -59,119 +59,121 @@ Methods .. table:: :widths: auto - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`edit_node`\ (\ node\: :ref:`Node`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`edit_resource`\ (\ resource\: :ref:`Resource`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`edit_script`\ (\ script\: :ref:`Script`, line\: :ref:`int` = -1, column\: :ref:`int` = 0, grab_focus\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Control` | :ref:`get_base_control`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorCommandPalette` | :ref:`get_command_palette`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_current_directory`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_current_feature_profile`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_current_path`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`get_edited_scene_root`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VBoxContainer` | :ref:`get_editor_main_screen`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorPaths` | :ref:`get_editor_paths`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_editor_scale`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorSettings` | :ref:`get_editor_settings`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Theme` | :ref:`get_editor_theme`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorToaster` | :ref:`get_editor_toaster`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorUndoRedoManager` | :ref:`get_editor_undo_redo`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SubViewport` | :ref:`get_editor_viewport_2d`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SubViewport` | :ref:`get_editor_viewport_3d`\ (\ idx\: :ref:`int` = 0\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FileSystemDock` | :ref:`get_file_system_dock`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorInspector` | :ref:`get_inspector`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_open_scenes`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_playing_scene`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorFileSystem` | :ref:`get_resource_filesystem`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorResourcePreview` | :ref:`get_resource_previewer`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`ScriptEditor` | :ref:`get_script_editor`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`get_selected_paths`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`EditorSelection` | :ref:`get_selection`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`inspect_object`\ (\ object\: :ref:`Object`, for_property\: :ref:`String` = "", inspector_only\: :ref:`bool` = false\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_multi_window_enabled`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing_scene`\ (\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_plugin_enabled`\ (\ plugin\: :ref:`String`\ ) |const| | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`Texture2D`\] | :ref:`make_mesh_previews`\ (\ meshes\: :ref:`Array`\[:ref:`Mesh`\], preview_size\: :ref:`int`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`mark_scene_as_unsaved`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`open_scene_from_path`\ (\ scene_filepath\: :ref:`String`, set_inherited\: :ref:`bool` = false\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`play_current_scene`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`play_custom_scene`\ (\ scene_filepath\: :ref:`String`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`play_main_scene`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_create_dialog`\ (\ callback\: :ref:`Callable`, base_type\: :ref:`StringName` = "", current_type\: :ref:`String` = "", dialog_title\: :ref:`String` = "", type_blocklist\: :ref:`Array`\[:ref:`StringName`\] = [], type_suffixes\: :ref:`Dictionary` = {}\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog`\ (\ dialog\: :ref:`Window`, rect\: :ref:`Rect2i` = Rect2i(0, 0, 0, 0)\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog_centered`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0)\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog_centered_clamped`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0), fallback_ratio\: :ref:`float` = 0.75\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_dialog_centered_ratio`\ (\ dialog\: :ref:`Window`, ratio\: :ref:`float` = 0.8\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_method_selector`\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, current_value\: :ref:`String` = ""\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_node_selector`\ (\ callback\: :ref:`Callable`, valid_types\: :ref:`Array`\[:ref:`StringName`\] = [], current_value\: :ref:`Node` = null\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_property_selector`\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array(), current_value\: :ref:`String` = ""\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`popup_quick_open`\ (\ callback\: :ref:`Callable`, base_types\: :ref:`Array`\[:ref:`StringName`\] = []\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`reload_scene_from_path`\ (\ scene_filepath\: :ref:`String`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`restart_editor`\ (\ save\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`save_all_scenes`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_scene`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`save_scene_as`\ (\ path\: :ref:`String`, with_preview\: :ref:`bool` = true\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`select_file`\ (\ file\: :ref:`String`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_current_feature_profile`\ (\ profile_name\: :ref:`String`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_main_screen_editor`\ (\ name\: :ref:`String`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_plugin_enabled`\ (\ plugin\: :ref:`String`, enabled\: :ref:`bool`\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`stop_playing_scene`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_node`\ (\ node\: :ref:`Node`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_resource`\ (\ resource\: :ref:`Resource`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`edit_script`\ (\ script\: :ref:`Script`, line\: :ref:`int` = -1, column\: :ref:`int` = 0, grab_focus\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Control` | :ref:`get_base_control`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorCommandPalette` | :ref:`get_command_palette`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_directory`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_feature_profile`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_current_path`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`get_edited_scene_root`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VBoxContainer` | :ref:`get_editor_main_screen`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorPaths` | :ref:`get_editor_paths`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_editor_scale`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorSettings` | :ref:`get_editor_settings`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Theme` | :ref:`get_editor_theme`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorToaster` | :ref:`get_editor_toaster`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorUndoRedoManager` | :ref:`get_editor_undo_redo`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubViewport` | :ref:`get_editor_viewport_2d`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SubViewport` | :ref:`get_editor_viewport_3d`\ (\ idx\: :ref:`int` = 0\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FileSystemDock` | :ref:`get_file_system_dock`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorInspector` | :ref:`get_inspector`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Node`\] | :ref:`get_open_scene_roots`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_open_scenes`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_playing_scene`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorFileSystem` | :ref:`get_resource_filesystem`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorResourcePreview` | :ref:`get_resource_previewer`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ScriptEditor` | :ref:`get_script_editor`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`get_selected_paths`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorSelection` | :ref:`get_selection`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`inspect_object`\ (\ object\: :ref:`Object`, for_property\: :ref:`String` = "", inspector_only\: :ref:`bool` = false\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_multi_window_enabled`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing_scene`\ (\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_plugin_enabled`\ (\ plugin\: :ref:`String`\ ) |const| | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Texture2D`\] | :ref:`make_mesh_previews`\ (\ meshes\: :ref:`Array`\[:ref:`Mesh`\], preview_size\: :ref:`int`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`mark_scene_as_unsaved`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`open_scene_from_path`\ (\ scene_filepath\: :ref:`String`, set_inherited\: :ref:`bool` = false\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_current_scene`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_custom_scene`\ (\ scene_filepath\: :ref:`String`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`play_main_scene`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_create_dialog`\ (\ callback\: :ref:`Callable`, base_type\: :ref:`StringName` = "", current_type\: :ref:`String` = "", dialog_title\: :ref:`String` = "", type_blocklist\: :ref:`Array`\[:ref:`StringName`\] = []\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog`\ (\ dialog\: :ref:`Window`, rect\: :ref:`Rect2i` = Rect2i(0, 0, 0, 0)\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0)\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered_clamped`\ (\ dialog\: :ref:`Window`, minsize\: :ref:`Vector2i` = Vector2i(0, 0), fallback_ratio\: :ref:`float` = 0.75\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_dialog_centered_ratio`\ (\ dialog\: :ref:`Window`, ratio\: :ref:`float` = 0.8\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_method_selector`\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, current_value\: :ref:`String` = ""\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_node_selector`\ (\ callback\: :ref:`Callable`, valid_types\: :ref:`Array`\[:ref:`StringName`\] = [], current_value\: :ref:`Node` = null\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_property_selector`\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array(), current_value\: :ref:`String` = ""\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`popup_quick_open`\ (\ callback\: :ref:`Callable`, base_types\: :ref:`Array`\[:ref:`StringName`\] = []\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`reload_scene_from_path`\ (\ scene_filepath\: :ref:`String`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`restart_editor`\ (\ save\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_all_scenes`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_scene`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`save_scene_as`\ (\ path\: :ref:`String`, with_preview\: :ref:`bool` = true\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`select_file`\ (\ file\: :ref:`String`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_current_feature_profile`\ (\ profile_name\: :ref:`String`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_main_screen_editor`\ (\ name\: :ref:`String`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_plugin_enabled`\ (\ plugin\: :ref:`String`, enabled\: :ref:`bool`\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop_playing_scene`\ (\ ) | + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -239,7 +241,7 @@ Edits the given :ref:`Node`. The node will be also selected if it's |void| **edit_resource**\ (\ resource\: :ref:`Resource`\ ) :ref:`πŸ”—` -Edits the given :ref:`Resource`. If the resource is a :ref:`Script` you can also edit it with :ref:`edit_script` to specify the line and column position. +Edits the given :ref:`Resource`. If the resource is a :ref:`Script` you can also edit it with :ref:`edit_script()` to specify the line and column position. .. rst-class:: classref-item-separator @@ -291,7 +293,7 @@ Returns the editor's :ref:`EditorCommandPalette` ins :ref:`String` **get_current_directory**\ (\ ) |const| :ref:`πŸ”—` -Returns the current directory being viewed in the :ref:`FileSystemDock`. If a file is selected, its base directory will be returned using :ref:`String.get_base_dir` instead. +Returns the current directory being viewed in the :ref:`FileSystemDock`. If a file is selected, its base directory will be returned using :ref:`String.get_base_dir()` instead. .. rst-class:: classref-item-separator @@ -305,9 +307,9 @@ Returns the current directory being viewed in the :ref:`FileSystemDock`, you must load the feature profile using :ref:`EditorFeatureProfile.load_from_file`. +In order to get a reference to the :ref:`EditorFeatureProfile`, you must load the feature profile using :ref:`EditorFeatureProfile.load_from_file()`. -\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **Note:** Feature profiles created via the user interface are loaded from the ``feature_profiles`` directory, as a file with the ``.profile`` extension. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir()`. .. rst-class:: classref-item-separator @@ -343,7 +345,7 @@ Returns the edited (current) scene's root :ref:`Node`. :ref:`VBoxContainer` **get_editor_main_screen**\ (\ ) |const| :ref:`πŸ”—` -Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement :ref:`EditorPlugin._has_main_screen`. +Returns the editor control responsible for main screen plugins and tools. Use it with plugins that implement :ref:`EditorPlugin._has_main_screen()`. \ **Note:** This node is a :ref:`VBoxContainer`, which means that if you add a :ref:`Control` child to it, you need to set the child's :ref:`Control.size_flags_vertical` to :ref:`Control.SIZE_EXPAND_FILL` to make it use the full available space. @@ -373,7 +375,7 @@ Returns the :ref:`EditorPaths` singleton. Returns the actual scale of the editor UI (``1.0`` being 100% scale). This can be used to adjust position and dimensions of the UI added by plugins. -\ **Note:** This value is set via the ``interface/editor/display_scale`` and ``interface/editor/custom_display_scale`` editor settings. Editor must be restarted for changes to be properly applied. +\ **Note:** This value is set via the :ref:`EditorSettings.interface/editor/display_scale` and :ref:`EditorSettings.interface/editor/custom_display_scale` settings. The editor must be restarted for changes to be properly applied. .. rst-class:: classref-item-separator @@ -447,7 +449,7 @@ Returns the 2D editor :ref:`SubViewport`. It does not have a :ref:`SubViewport` **get_editor_viewport_3d**\ (\ idx\: :ref:`int` = 0\ ) |const| :ref:`πŸ”—` -Returns the specified 3D editor :ref:`SubViewport`, from ``0`` to ``3``. The viewport can be used to access the active editor cameras with :ref:`Viewport.get_camera_3d`. +Returns the specified 3D editor :ref:`SubViewport`, from ``0`` to ``3``. The viewport can be used to access the active editor cameras with :ref:`Viewport.get_camera_3d()`. .. rst-class:: classref-item-separator @@ -481,13 +483,25 @@ Returns the editor's :ref:`EditorInspector` instance. ---- +.. _class_EditorInterface_method_get_open_scene_roots: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Node`\] **get_open_scene_roots**\ (\ ) |const| :ref:`πŸ”—` + +Returns an array with references to the root nodes of the currently opened scenes. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_get_open_scenes: .. rst-class:: classref-method :ref:`PackedStringArray` **get_open_scenes**\ (\ ) |const| :ref:`πŸ”—` -Returns an :ref:`Array` with the file paths of the currently opened scenes. +Returns an array with the file paths of the currently opened scenes. .. rst-class:: classref-item-separator @@ -697,7 +711,9 @@ Plays the main scene. .. rst-class:: classref-method -|void| **popup_create_dialog**\ (\ callback\: :ref:`Callable`, base_type\: :ref:`StringName` = "", current_type\: :ref:`String` = "", dialog_title\: :ref:`String` = "", type_blocklist\: :ref:`Array`\[:ref:`StringName`\] = [], type_suffixes\: :ref:`Dictionary` = {}\ ) :ref:`πŸ”—` +|void| **popup_create_dialog**\ (\ callback\: :ref:`Callable`, base_type\: :ref:`StringName` = "", current_type\: :ref:`String` = "", dialog_title\: :ref:`String` = "", type_blocklist\: :ref:`Array`\[:ref:`StringName`\] = []\ ) :ref:`πŸ”—` + +**Experimental:** This method may be changed or removed in future versions. Pops up an editor dialog for creating an object. @@ -711,22 +727,6 @@ The ``dialog_title`` allows you to define a custom title for the dialog. This is The ``type_blocklist`` contains a list of type names, and the types in the blocklist will be hidden from the create dialog. -The ``type_suffixes`` is a dictionary, with keys being :ref:`StringName`\ s and values being :ref:`String`\ s. Custom suffixes override the default suffixes which are file names of their scripts. For example, if you set a custom suffix as "Custom Suffix" for a global script type, - -.. code:: text - - Node - |- MyCustomNode (my_custom_node.gd) - -will be - -.. code:: text - - Node - |- MyCustomNode (Custom Suffix) - -Bear in mind that when a built-in type does not have any custom suffix, its suffix will be removed. The suffix of a type created from a script will fall back to its script file name. For global types by scripts, if you customize their suffixes to an empty string, their suffixes will be removed. - \ **Note:** Trying to list the base type in the ``type_blocklist`` will hide all types derived from the base type from the create dialog. .. rst-class:: classref-item-separator @@ -739,9 +739,9 @@ Bear in mind that when a built-in type does not have any custom suffix, its suff |void| **popup_dialog**\ (\ dialog\: :ref:`Window`, rect\: :ref:`Rect2i` = Rect2i(0, 0, 0, 0)\ ) :ref:`πŸ”—` -Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive`. The dialog must have no current parent, otherwise the method fails. +Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive()`. The dialog must have no current parent, otherwise the method fails. -See also :ref:`Window.set_unparent_when_invisible`. +See also :ref:`Window.set_unparent_when_invisible()`. .. rst-class:: classref-item-separator @@ -753,9 +753,9 @@ See also :ref:`Window.set_unparent_when_invisible`, minsize\: :ref:`Vector2i` = Vector2i(0, 0)\ ) :ref:`πŸ”—` -Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered`. The dialog must have no current parent, otherwise the method fails. +Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered()`. The dialog must have no current parent, otherwise the method fails. -See also :ref:`Window.set_unparent_when_invisible`. +See also :ref:`Window.set_unparent_when_invisible()`. .. rst-class:: classref-item-separator @@ -767,9 +767,9 @@ See also :ref:`Window.set_unparent_when_invisible`, minsize\: :ref:`Vector2i` = Vector2i(0, 0), fallback_ratio\: :ref:`float` = 0.75\ ) :ref:`πŸ”—` -Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_clamped`. The dialog must have no current parent, otherwise the method fails. +Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_clamped()`. The dialog must have no current parent, otherwise the method fails. -See also :ref:`Window.set_unparent_when_invisible`. +See also :ref:`Window.set_unparent_when_invisible()`. .. rst-class:: classref-item-separator @@ -781,9 +781,9 @@ See also :ref:`Window.set_unparent_when_invisible`, ratio\: :ref:`float` = 0.8\ ) :ref:`πŸ”—` -Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_ratio`. The dialog must have no current parent, otherwise the method fails. +Pops up the ``dialog`` in the editor UI with :ref:`Window.popup_exclusive_centered_ratio()`. The dialog must have no current parent, otherwise the method fails. -See also :ref:`Window.set_unparent_when_invisible`. +See also :ref:`Window.set_unparent_when_invisible()`. .. rst-class:: classref-item-separator @@ -833,7 +833,7 @@ Pops up an editor dialog for selecting a :ref:`Node` from the edited |void| **popup_property_selector**\ (\ object\: :ref:`Object`, callback\: :ref:`Callable`, type_filter\: :ref:`PackedInt32Array` = PackedInt32Array(), current_value\: :ref:`String` = ""\ ) :ref:`πŸ”—` -Pops up an editor dialog for selecting properties from ``object``. The ``callback`` must take a single argument of type :ref:`NodePath`. It is called on the selected property path (see :ref:`NodePath.get_as_property_path`) or the empty path ``^""`` if the dialog is canceled. If ``type_filter`` is provided, the dialog will only show properties that match one of the listed :ref:`Variant.Type` values. If ``current_value`` is provided, the property will be selected automatically in the property list, if it exists. +Pops up an editor dialog for selecting properties from ``object``. The ``callback`` must take a single argument of type :ref:`NodePath`. It is called on the selected property path (see :ref:`NodePath.get_as_property_path()`) or the empty path ``^""`` if the dialog is canceled. If ``type_filter`` is provided, the dialog will only show properties that match one of the listed :ref:`Variant.Type` values. If ``current_value`` is provided, the property will be selected automatically in the property list, if it exists. :: @@ -945,7 +945,7 @@ Selects and activates the specified feature profile with the given ``profile_nam A feature profile can be created programmatically using the :ref:`EditorFeatureProfile` class. -\ **Note:** The feature profile that gets activated must be located in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. If a profile could not be found, an error occurs. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir`. +\ **Note:** The feature profile that gets activated must be located in the ``feature_profiles`` directory, as a file with the ``.profile`` extension. If a profile could not be found, an error occurs. The editor configuration folder can be found by using :ref:`EditorPaths.get_config_dir()`. .. rst-class:: classref-item-separator @@ -957,7 +957,7 @@ A feature profile can be created programmatically using the :ref:`EditorFeatureP |void| **set_main_screen_editor**\ (\ name\: :ref:`String`\ ) :ref:`πŸ”—` -Sets the editor's current main screen to the one specified in ``name``. ``name`` must match the title of the tab in question exactly (e.g. ``2D``, ``3D``, ``Script``, or ``AssetLib`` for default tabs). +Sets the editor's current main screen to the one specified in ``name``. ``name`` must match the title of the tab in question exactly (e.g. ``2D``, ``3D``, ``Script``, ``Game``, or ``AssetLib`` for default tabs). .. rst-class:: classref-item-separator diff --git a/classes/class_editornode3dgizmo.rst b/classes/class_editornode3dgizmo.rst index e5977c727be..59b5f87621f 100644 --- a/classes/class_editornode3dgizmo.rst +++ b/classes/class_editornode3dgizmo.rst @@ -110,11 +110,11 @@ Method Descriptions |void| **_commit_handle**\ (\ id\: :ref:`int`, secondary\: :ref:`bool`, restore\: :ref:`Variant`, cancel\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Override this method to commit a handle being edited (handles must have been previously added by :ref:`add_handles`). This usually means creating an :ref:`UndoRedo` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". +Override this method to commit a handle being edited (handles must have been previously added by :ref:`add_handles()`). This usually means creating an :ref:`UndoRedo` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". If the ``cancel`` argument is ``true``, the ``restore`` value should be directly set, without any :ref:`UndoRedo` action. -The ``secondary`` argument is ``true`` when the committed handle is secondary (see :ref:`add_handles` for more information). +The ``secondary`` argument is ``true`` when the committed handle is secondary (see :ref:`add_handles()` for more information). .. rst-class:: classref-item-separator @@ -126,7 +126,7 @@ The ``secondary`` argument is ``true`` when the committed handle is secondary (s |void| **_commit_subgizmos**\ (\ ids\: :ref:`PackedInt32Array`, restores\: :ref:`Array`\[:ref:`Transform3D`\], cancel\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". +Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray()` and :ref:`_subgizmos_intersect_frustum()`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". If the ``cancel`` argument is ``true``, the ``restores`` transforms should be directly set, without any :ref:`UndoRedo` action. @@ -140,9 +140,9 @@ If the ``cancel`` argument is ``true``, the ``restores`` transforms should be di :ref:`String` **_get_handle_name**\ (\ id\: :ref:`int`, secondary\: :ref:`bool`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return the name of an edited handle (handles must have been previously added by :ref:`add_handles`). Handles can be named for reference to the user when editing. +Override this method to return the name of an edited handle (handles must have been previously added by :ref:`add_handles()`). Handles can be named for reference to the user when editing. -The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles` for more information). +The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles()` for more information). .. rst-class:: classref-item-separator @@ -154,9 +154,9 @@ The ``secondary`` argument is ``true`` when the requested handle is secondary (s :ref:`Variant` **_get_handle_value**\ (\ id\: :ref:`int`, secondary\: :ref:`bool`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle`. +Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle()`. -The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles` for more information). +The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles()` for more information). .. rst-class:: classref-item-separator @@ -168,7 +168,7 @@ The ``secondary`` argument is ``true`` when the requested handle is secondary (s :ref:`Transform3D` **_get_subgizmo_transform**\ (\ id\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_subgizmos`. +Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_subgizmos()`. .. rst-class:: classref-item-separator @@ -182,7 +182,7 @@ Override this method to return the current transform of a subgizmo. This transfo Override this method to return ``true`` whenever the given handle should be highlighted in the editor. -The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles` for more information). +The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`add_handles()` for more information). .. rst-class:: classref-item-separator @@ -194,7 +194,7 @@ The ``secondary`` argument is ``true`` when the requested handle is secondary (s |void| **_redraw**\ (\ ) |virtual| :ref:`πŸ”—` -Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`clear` at the beginning of this method and then add visual elements depending on the node's properties. +Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`clear()` at the beginning of this method and then add visual elements depending on the node's properties. .. rst-class:: classref-item-separator @@ -206,9 +206,9 @@ Override this method to add all the gizmo elements whenever a gizmo update is re |void| **_set_handle**\ (\ id\: :ref:`int`, secondary\: :ref:`bool`, camera\: :ref:`Camera3D`, point\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Override this method to update the node properties when the user drags a gizmo handle (previously added with :ref:`add_handles`). The provided ``point`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. +Override this method to update the node properties when the user drags a gizmo handle (previously added with :ref:`add_handles()`). The provided ``point`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. -The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`add_handles` for more information). +The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`add_handles()` for more information). .. rst-class:: classref-item-separator @@ -220,7 +220,7 @@ The ``secondary`` argument is ``true`` when the edited handle is secondary (see |void| **_set_subgizmo_transform**\ (\ id\: :ref:`int`, transform\: :ref:`Transform3D`\ ) |virtual| :ref:`πŸ”—` -Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). The ``transform`` is given in the :ref:`Node3D`'s local coordinate system. +Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray()` and :ref:`_subgizmos_intersect_frustum()`). The ``transform`` is given in the :ref:`Node3D`'s local coordinate system. .. rst-class:: classref-item-separator @@ -232,7 +232,7 @@ Override this method to update the node properties during subgizmo editing (see :ref:`PackedInt32Array` **_subgizmos_intersect_frustum**\ (\ camera\: :ref:`Camera3D`, frustum\: :ref:`Array`\[:ref:`Plane`\]\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and a ``frustum``, this method should return which subgizmos are contained within the frustum. The ``frustum`` argument consists of an array with all the :ref:`Plane`\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. +Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and a ``frustum``, this method should return which subgizmos are contained within the frustum. The ``frustum`` argument consists of an array with all the :ref:`Plane`\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform()` or :ref:`_commit_subgizmos()`. .. rst-class:: classref-item-separator @@ -244,7 +244,7 @@ Override this method to allow selecting subgizmos using mouse drag box selection :ref:`int` **_subgizmos_intersect_ray**\ (\ camera\: :ref:`Camera3D`, point\: :ref:`Vector2`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``point`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. +Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``point`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform()` or :ref:`_commit_subgizmos()`. .. rst-class:: classref-item-separator @@ -256,7 +256,7 @@ Override this method to allow selecting subgizmos using mouse clicks. Given a `` |void| **add_collision_segments**\ (\ segments\: :ref:`PackedVector3Array`\ ) :ref:`πŸ”—` -Adds the specified ``segments`` to the gizmo's collision shape for picking. Call this method during :ref:`_redraw`. +Adds the specified ``segments`` to the gizmo's collision shape for picking. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -268,7 +268,7 @@ Adds the specified ``segments`` to the gizmo's collision shape for picking. Call |void| **add_collision_triangles**\ (\ triangles\: :ref:`TriangleMesh`\ ) :ref:`πŸ”—` -Adds collision triangles to the gizmo for picking. A :ref:`TriangleMesh` can be generated from a regular :ref:`Mesh` too. Call this method during :ref:`_redraw`. +Adds collision triangles to the gizmo for picking. A :ref:`TriangleMesh` can be generated from a regular :ref:`Mesh` too. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -284,7 +284,7 @@ Adds a list of handles (points) which can be used to edit the properties of the The ``secondary`` argument marks the added handles as secondary, meaning they will normally have lower selection priority than regular handles. When the user is holding the shift key secondary handles will switch to have higher priority than regular handles. This change in priority can be used to place multiple handles at the same point while still giving the user control on their selection. -There are virtual methods which will be called upon editing of these handles. Call this method during :ref:`_redraw`. +There are virtual methods which will be called upon editing of these handles. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -296,7 +296,7 @@ There are virtual methods which will be called upon editing of these handles. Ca |void| **add_lines**\ (\ lines\: :ref:`PackedVector3Array`, material\: :ref:`Material`, billboard\: :ref:`bool` = false, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`πŸ”—` -Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during :ref:`_redraw`. +Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -308,7 +308,7 @@ Adds lines to the gizmo (as sets of 2 points), with a given material. The lines |void| **add_mesh**\ (\ mesh\: :ref:`Mesh`, material\: :ref:`Material` = null, transform\: :ref:`Transform3D` = Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0), skeleton\: :ref:`SkinReference` = null\ ) :ref:`πŸ”—` -Adds a mesh to the gizmo with the specified ``material``, local ``transform`` and ``skeleton``. Call this method during :ref:`_redraw`. +Adds a mesh to the gizmo with the specified ``material``, local ``transform`` and ``skeleton``. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -320,7 +320,7 @@ Adds a mesh to the gizmo with the specified ``material``, local ``transform`` an |void| **add_unscaled_billboard**\ (\ material\: :ref:`Material`, default_scale\: :ref:`float` = 1, modulate\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`πŸ”—` -Adds an unscaled billboard for visualization and selection. Call this method during :ref:`_redraw`. +Adds an unscaled billboard for visualization and selection. Call this method during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -356,7 +356,7 @@ Returns the :ref:`Node3D` node associated with this gizmo. :ref:`EditorNode3DGizmoPlugin` **get_plugin**\ (\ ) |const| :ref:`πŸ”—` -Returns the :ref:`EditorNode3DGizmoPlugin` that owns this gizmo. It's useful to retrieve materials using :ref:`EditorNode3DGizmoPlugin.get_material`. +Returns the :ref:`EditorNode3DGizmoPlugin` that owns this gizmo. It's useful to retrieve materials using :ref:`EditorNode3DGizmoPlugin.get_material()`. .. rst-class:: classref-item-separator @@ -368,7 +368,7 @@ Returns the :ref:`EditorNode3DGizmoPlugin` that o :ref:`PackedInt32Array` **get_subgizmo_selection**\ (\ ) |const| :ref:`πŸ”—` -Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during :ref:`_redraw`. +Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during :ref:`_redraw()`. .. rst-class:: classref-item-separator @@ -380,7 +380,7 @@ Returns a list of the currently selected subgizmos. Can be used to highlight sel :ref:`bool` **is_subgizmo_selected**\ (\ id\: :ref:`int`\ ) |const| :ref:`πŸ”—` -Returns ``true`` if the given subgizmo is currently selected. Can be used to highlight selected elements during :ref:`_redraw`. +Returns ``true`` if the given subgizmo is currently selected. Can be used to highlight selected elements during :ref:`_redraw()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editornode3dgizmoplugin.rst b/classes/class_editornode3dgizmoplugin.rst index 73b435bffbb..5bdbc2e5dd9 100644 --- a/classes/class_editornode3dgizmoplugin.rst +++ b/classes/class_editornode3dgizmoplugin.rst @@ -21,7 +21,7 @@ Description **EditorNode3DGizmoPlugin** allows you to define a new type of Gizmo. There are two main ways to do so: extending **EditorNode3DGizmoPlugin** for the simpler gizmos, or creating a new :ref:`EditorNode3DGizmo` type. See the tutorial in the documentation for more info. -To use **EditorNode3DGizmoPlugin**, register it using the :ref:`EditorPlugin.add_node_3d_gizmo_plugin` method first. +To use **EditorNode3DGizmoPlugin**, register it using the :ref:`EditorPlugin.add_node_3d_gizmo_plugin()` method first. .. rst-class:: classref-introduction-group @@ -127,11 +127,11 @@ Override this method to define whether the gizmos handled by this plugin can be |void| **_commit_handle**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, handle_id\: :ref:`int`, secondary\: :ref:`bool`, restore\: :ref:`Variant`, cancel\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Override this method to commit a handle being edited (handles must have been previously added by :ref:`EditorNode3DGizmo.add_handles` during :ref:`_redraw`). This usually means creating an :ref:`UndoRedo` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". +Override this method to commit a handle being edited (handles must have been previously added by :ref:`EditorNode3DGizmo.add_handles()` during :ref:`_redraw()`). This usually means creating an :ref:`UndoRedo` action for the change, using the current handle value as "do" and the ``restore`` argument as "undo". If the ``cancel`` argument is ``true``, the ``restore`` value should be directly set, without any :ref:`UndoRedo` action. -The ``secondary`` argument is ``true`` when the committed handle is secondary (see :ref:`EditorNode3DGizmo.add_handles` for more information). +The ``secondary`` argument is ``true`` when the committed handle is secondary (see :ref:`EditorNode3DGizmo.add_handles()` for more information). Called for this plugin's active gizmos. @@ -145,7 +145,7 @@ Called for this plugin's active gizmos. |void| **_commit_subgizmos**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, ids\: :ref:`PackedInt32Array`, restores\: :ref:`Array`\[:ref:`Transform3D`\], cancel\: :ref:`bool`\ ) |virtual| :ref:`πŸ”—` -Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". +Override this method to commit a group of subgizmos being edited (see :ref:`_subgizmos_intersect_ray()` and :ref:`_subgizmos_intersect_frustum()`). This usually means creating an :ref:`UndoRedo` action for the change, using the current transforms as "do" and the ``restores`` transforms as "undo". If the ``cancel`` argument is ``true``, the ``restores`` transforms should be directly set, without any :ref:`UndoRedo` action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. @@ -159,7 +159,7 @@ If the ``cancel`` argument is ``true``, the ``restores`` transforms should be di :ref:`EditorNode3DGizmo` **_create_gizmo**\ (\ for_node_3d\: :ref:`Node3D`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return a custom :ref:`EditorNode3DGizmo` for the 3D nodes of your choice, return ``null`` for the rest of nodes. See also :ref:`_has_gizmo`. +Override this method to return a custom :ref:`EditorNode3DGizmo` for the 3D nodes of your choice, return ``null`` for the rest of nodes. See also :ref:`_has_gizmo()`. .. rst-class:: classref-item-separator @@ -183,7 +183,7 @@ Override this method to provide the name that will appear in the gizmo visibilit :ref:`String` **_get_handle_name**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, handle_id\: :ref:`int`, secondary\: :ref:`bool`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to provide gizmo's handle names. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles` for more information). Called for this plugin's active gizmos. +Override this method to provide gizmo's handle names. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles()` for more information). Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -195,9 +195,9 @@ Override this method to provide gizmo's handle names. The ``secondary`` argument :ref:`Variant` **_get_handle_value**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, handle_id\: :ref:`int`, secondary\: :ref:`bool`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle`. +Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the ``restore`` argument in :ref:`_commit_handle()`. -The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles` for more information). +The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles()` for more information). Called for this plugin's active gizmos. @@ -225,7 +225,7 @@ All built-in editor gizmos return a priority of ``-1``. If not overridden, this :ref:`Transform3D` **_get_subgizmo_transform**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, subgizmo_id\: :ref:`int`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the ``restore`` argument in :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. +Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the ``restore`` argument in :ref:`_commit_subgizmos()`. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -249,7 +249,7 @@ Override this method to define which Node3D nodes have a gizmo from this plugin. :ref:`bool` **_is_handle_highlighted**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, handle_id\: :ref:`int`, secondary\: :ref:`bool`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to return ``true`` whenever to given handle should be highlighted in the editor. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles` for more information). Called for this plugin's active gizmos. +Override this method to return ``true`` whenever to given handle should be highlighted in the editor. The ``secondary`` argument is ``true`` when the requested handle is secondary (see :ref:`EditorNode3DGizmo.add_handles()` for more information). Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -273,7 +273,7 @@ Override this method to define whether Node3D with this gizmo should be selectab |void| **_redraw**\ (\ gizmo\: :ref:`EditorNode3DGizmo`\ ) |virtual| :ref:`πŸ”—` -Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`EditorNode3DGizmo.clear` at the beginning of this method and then add visual elements depending on the node's properties. +Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call :ref:`EditorNode3DGizmo.clear()` at the beginning of this method and then add visual elements depending on the node's properties. .. rst-class:: classref-item-separator @@ -285,9 +285,9 @@ Override this method to add all the gizmo elements whenever a gizmo update is re |void| **_set_handle**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, handle_id\: :ref:`int`, secondary\: :ref:`bool`, camera\: :ref:`Camera3D`, screen_pos\: :ref:`Vector2`\ ) |virtual| :ref:`πŸ”—` -Override this method to update the node's properties when the user drags a gizmo handle (previously added with :ref:`EditorNode3DGizmo.add_handles`). The provided ``screen_pos`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. +Override this method to update the node's properties when the user drags a gizmo handle (previously added with :ref:`EditorNode3DGizmo.add_handles()`). The provided ``screen_pos`` is the mouse position in screen coordinates and the ``camera`` can be used to convert it to raycasts. -The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`EditorNode3DGizmo.add_handles` for more information). +The ``secondary`` argument is ``true`` when the edited handle is secondary (see :ref:`EditorNode3DGizmo.add_handles()` for more information). Called for this plugin's active gizmos. @@ -301,7 +301,7 @@ Called for this plugin's active gizmos. |void| **_set_subgizmo_transform**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, subgizmo_id\: :ref:`int`, transform\: :ref:`Transform3D`\ ) |virtual| :ref:`πŸ”—` -Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray` and :ref:`_subgizmos_intersect_frustum`). The ``transform`` is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. +Override this method to update the node properties during subgizmo editing (see :ref:`_subgizmos_intersect_ray()` and :ref:`_subgizmos_intersect_frustum()`). The ``transform`` is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -313,7 +313,7 @@ Override this method to update the node properties during subgizmo editing (see :ref:`PackedInt32Array` **_subgizmos_intersect_frustum**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, camera\: :ref:`Camera3D`, frustum_planes\: :ref:`Array`\[:ref:`Plane`\]\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and ``frustum_planes``, this method should return which subgizmos are contained within the frustums. The ``frustum_planes`` argument consists of an array with all the :ref:`Plane`\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. +Override this method to allow selecting subgizmos using mouse drag box selection. Given a ``camera`` and ``frustum_planes``, this method should return which subgizmos are contained within the frustums. The ``frustum_planes`` argument consists of an array with all the :ref:`Plane`\ s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform()` or :ref:`_commit_subgizmos()`. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -325,7 +325,7 @@ Override this method to allow selecting subgizmos using mouse drag box selection :ref:`int` **_subgizmos_intersect_ray**\ (\ gizmo\: :ref:`EditorNode3DGizmo`, camera\: :ref:`Camera3D`, screen_pos\: :ref:`Vector2`\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``screen_pos`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform` or :ref:`_commit_subgizmos`. Called for this plugin's active gizmos. +Override this method to allow selecting subgizmos using mouse clicks. Given a ``camera`` and a ``screen_pos`` in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like :ref:`_get_subgizmo_transform()` or :ref:`_commit_subgizmos()`. Called for this plugin's active gizmos. .. rst-class:: classref-item-separator @@ -337,7 +337,7 @@ Override this method to allow selecting subgizmos using mouse clicks. Given a `` |void| **add_material**\ (\ name\: :ref:`String`, material\: :ref:`StandardMaterial3D`\ ) :ref:`πŸ”—` -Adds a new material to the internal material list for the plugin. It can then be accessed with :ref:`get_material`. Should not be overridden. +Adds a new material to the internal material list for the plugin. It can then be accessed with :ref:`get_material()`. Should not be overridden. .. rst-class:: classref-item-separator @@ -349,7 +349,7 @@ Adds a new material to the internal material list for the plugin. It can then be |void| **create_handle_material**\ (\ name\: :ref:`String`, billboard\: :ref:`bool` = false, texture\: :ref:`Texture2D` = null\ ) :ref:`πŸ”—` -Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material` and used in :ref:`EditorNode3DGizmo.add_handles`. Should not be overridden. +Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material()` and used in :ref:`EditorNode3DGizmo.add_handles()`. Should not be overridden. You can optionally provide a texture to use instead of the default icon. @@ -363,7 +363,7 @@ You can optionally provide a texture to use instead of the default icon. |void| **create_icon_material**\ (\ name\: :ref:`String`, texture\: :ref:`Texture2D`, on_top\: :ref:`bool` = false, color\: :ref:`Color` = Color(1, 1, 1, 1)\ ) :ref:`πŸ”—` -Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material` and used in :ref:`EditorNode3DGizmo.add_unscaled_billboard`. Should not be overridden. +Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material()` and used in :ref:`EditorNode3DGizmo.add_unscaled_billboard()`. Should not be overridden. .. rst-class:: classref-item-separator @@ -375,7 +375,7 @@ Creates an icon material with its variants (selected and/or editable) and adds t |void| **create_material**\ (\ name\: :ref:`String`, color\: :ref:`Color`, billboard\: :ref:`bool` = false, on_top\: :ref:`bool` = false, use_vertex_color\: :ref:`bool` = false\ ) :ref:`πŸ”—` -Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material` and used in :ref:`EditorNode3DGizmo.add_mesh` and :ref:`EditorNode3DGizmo.add_lines`. Should not be overridden. +Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with :ref:`get_material()` and used in :ref:`EditorNode3DGizmo.add_mesh()` and :ref:`EditorNode3DGizmo.add_lines()`. Should not be overridden. .. rst-class:: classref-item-separator diff --git a/classes/class_editorpaths.rst b/classes/class_editorpaths.rst index f027e563d49..1b86cefd8f6 100644 --- a/classes/class_editorpaths.rst +++ b/classes/class_editorpaths.rst @@ -21,7 +21,7 @@ Description This editor-only singleton returns OS-specific paths to various data folders and files. It can be used in editor plugins to ensure files are saved in the correct location on each operating system. -\ **Note:** This singleton is not accessible in exported projects. Attempting to access it in an exported project will result in a script error as the singleton won't be declared. To prevent script errors in exported projects, use :ref:`Engine.has_singleton` to check whether the singleton is available before using it. +\ **Note:** This singleton is not accessible in exported projects. Attempting to access it in an exported project will result in a script error as the singleton won't be declared. To prevent script errors in exported projects, use :ref:`Engine.has_singleton()` to check whether the singleton is available before using it. \ **Note:** On the Linux/BSD platform, Redot complies with the `XDG Base Directory Specification `__. You can override environment variables following the specification to change the editor and project data paths. @@ -141,7 +141,7 @@ Returns the project-specific editor settings path. Projects all have a unique su :ref:`String` **get_self_contained_file**\ (\ ) |const| :ref:`πŸ”—` -Returns the absolute path to the self-contained file that makes the current Redot editor instance be considered as self-contained. Returns an empty string if the current Redot editor instance isn't self-contained. See also :ref:`is_self_contained`. +Returns the absolute path to the self-contained file that makes the current Redot editor instance be considered as self-contained. Returns an empty string if the current Redot editor instance isn't self-contained. See also :ref:`is_self_contained()`. .. rst-class:: classref-item-separator @@ -155,7 +155,7 @@ Returns the absolute path to the self-contained file that makes the current Redo Returns ``true`` if the editor is marked as self-contained, ``false`` otherwise. When self-contained mode is enabled, user configuration, data and cache files are saved in an ``editor_data/`` folder next to the editor binary. This makes portable usage easier and ensures the Redot editor minimizes file writes outside its own folder. Self-contained mode is not available for exported projects. -Self-contained mode can be enabled by creating a file named ``._sc_`` or ``_sc_`` in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also :ref:`get_self_contained_file`. +Self-contained mode can be enabled by creating a file named ``._sc_`` or ``_sc_`` in the same folder as the editor binary or macOS .app bundle while the editor is not running. See also :ref:`get_self_contained_file()`. \ **Note:** On macOS, quarantine flag should be manually removed before using self-contained mode, see `Running on macOS `__. diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 81a22005ba2..b9ba5f785aa 100644 --- a/classes/class_editorplugin.rst +++ b/classes/class_editorplugin.rst @@ -203,7 +203,7 @@ Signals **main_screen_changed**\ (\ screen_name\: :ref:`String`\ ) :ref:`πŸ”—` -Emitted when user changes the workspace (**2D**, **3D**, **Script**, **AssetLib**). Also works with custom screens defined by plugins. +Emitted when user changes the workspace (**2D**, **3D**, **Script**, **Game**, **AssetLib**). Also works with custom screens defined by plugins. .. rst-class:: classref-item-separator @@ -525,7 +525,7 @@ This is used, for example, in shader editors to let the plugin know that it must This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs. -This method must return a boolean. If this method returns ``false``, the project will not run. The run is aborted immediately, so this also prevents all other plugins' :ref:`_build` methods from running. +This method must return a boolean. If this method returns ``false``, the project will not run. The run is aborted immediately, so this also prevents all other plugins' :ref:`_build()` methods from running. .. rst-class:: classref-item-separator @@ -587,7 +587,7 @@ Called by the engine when the user enables the **EditorPlugin** in the Plugin ta |void| **_forward_3d_draw_over_viewport**\ (\ viewport_control\: :ref:`Control`\ ) |virtual| :ref:`πŸ”—` -Called by the engine when the 3D editor's viewport is updated. Use the ``overlay`` :ref:`Control` for drawing. You can update the viewport manually by calling :ref:`update_overlays`. +Called by the engine when the 3D editor's viewport is updated. ``viewport_control`` is an overlay on top of the viewport and it can be used for drawing. You can update the viewport manually by calling :ref:`update_overlays()`. .. tabs:: @@ -595,12 +595,12 @@ Called by the engine when the 3D editor's viewport is updated. Use the ``overlay .. code-tab:: gdscript func _forward_3d_draw_over_viewport(overlay): - # Draw a circle at cursor position. + # Draw a circle at the cursor's position. overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE) func _forward_3d_gui_input(camera, event): if event is InputEventMouseMotion: - # Redraw viewport when cursor is moved. + # Redraw the viewport when the cursor is moved. update_overlays() return EditorPlugin.AFTER_GUI_INPUT_STOP return EditorPlugin.AFTER_GUI_INPUT_PASS @@ -609,7 +609,7 @@ Called by the engine when the 3D editor's viewport is updated. Use the ``overlay public override void _Forward3DDrawOverViewport(Control viewportControl) { - // Draw a circle at cursor position. + // Draw a circle at the cursor's position. viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White); } @@ -617,7 +617,7 @@ Called by the engine when the 3D editor's viewport is updated. Use the ``overlay { if (@event is InputEventMouseMotion) { - // Redraw viewport when cursor is moved. + // Redraw the viewport when the cursor is moved. UpdateOverlays(); return EditorPlugin.AfterGuiInput.Stop; } @@ -636,9 +636,9 @@ Called by the engine when the 3D editor's viewport is updated. Use the ``overlay |void| **_forward_3d_force_draw_over_viewport**\ (\ viewport_control\: :ref:`Control`\ ) |virtual| :ref:`πŸ”—` -This method is the same as :ref:`_forward_3d_draw_over_viewport`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. +This method is the same as :ref:`_forward_3d_draw_over_viewport()`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. -You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled`. +You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled()`. .. rst-class:: classref-item-separator @@ -650,7 +650,7 @@ You need to enable calling of this method by using :ref:`set_force_draw_over_for :ref:`int` **_forward_3d_gui_input**\ (\ viewport_camera\: :ref:`Camera3D`, event\: :ref:`InputEvent`\ ) |virtual| :ref:`πŸ”—` -Called when there is a root node in the current edited scene, :ref:`_handles` is implemented, and an :ref:`InputEvent` happens in the 3D viewport. The return value decides whether the :ref:`InputEvent` is consumed or forwarded to other **EditorPlugin**\ s. See :ref:`AfterGUIInput` for options. +Called when there is a root node in the current edited scene, :ref:`_handles()` is implemented, and an :ref:`InputEvent` happens in the 3D viewport. The return value decides whether the :ref:`InputEvent` is consumed or forwarded to other **EditorPlugin**\ s. See :ref:`AfterGUIInput` for options. .. tabs:: @@ -702,7 +702,7 @@ This method must return :ref:`AFTER_GUI_INPUT_PASS`\ ) |virtual| :ref:`πŸ”—` -Called by the engine when the 2D editor's viewport is updated. Use the ``overlay`` :ref:`Control` for drawing. You can update the viewport manually by calling :ref:`update_overlays`. +Called by the engine when the 2D editor's viewport is updated. ``viewport_control`` is an overlay on top of the viewport and it can be used for drawing. You can update the viewport manually by calling :ref:`update_overlays()`. .. tabs:: @@ -710,12 +710,12 @@ Called by the engine when the 2D editor's viewport is updated. Use the ``overlay .. code-tab:: gdscript func _forward_canvas_draw_over_viewport(overlay): - # Draw a circle at cursor position. + # Draw a circle at the cursor's position. overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.WHITE) func _forward_canvas_gui_input(event): if event is InputEventMouseMotion: - # Redraw viewport when cursor is moved. + # Redraw the viewport when the cursor is moved. update_overlays() return true return false @@ -724,7 +724,7 @@ Called by the engine when the 2D editor's viewport is updated. Use the ``overlay public override void _ForwardCanvasDrawOverViewport(Control viewportControl) { - // Draw a circle at cursor position. + // Draw a circle at the cursor's position. viewportControl.DrawCircle(viewportControl.GetLocalMousePosition(), 64, Colors.White); } @@ -732,7 +732,7 @@ Called by the engine when the 2D editor's viewport is updated. Use the ``overlay { if (@event is InputEventMouseMotion) { - // Redraw viewport when cursor is moved. + // Redraw the viewport when the cursor is moved. UpdateOverlays(); return true; } @@ -751,9 +751,9 @@ Called by the engine when the 2D editor's viewport is updated. Use the ``overlay |void| **_forward_canvas_force_draw_over_viewport**\ (\ viewport_control\: :ref:`Control`\ ) |virtual| :ref:`πŸ”—` -This method is the same as :ref:`_forward_canvas_draw_over_viewport`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. +This method is the same as :ref:`_forward_canvas_draw_over_viewport()`, except it draws on top of everything. Useful when you need an extra layer that shows over anything else. -You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled`. +You need to enable calling of this method by using :ref:`set_force_draw_over_forwarding_enabled()`. .. rst-class:: classref-item-separator @@ -765,7 +765,7 @@ You need to enable calling of this method by using :ref:`set_force_draw_over_for :ref:`bool` **_forward_canvas_gui_input**\ (\ event\: :ref:`InputEvent`\ ) |virtual| :ref:`πŸ”—` -Called when there is a root node in the current edited scene, :ref:`_handles` is implemented, and an :ref:`InputEvent` happens in the 2D viewport. If this method returns ``true``, ``event`` is intercepted by this **EditorPlugin**, otherwise ``event`` is forwarded to other Editor classes. +Called when there is a root node in the current edited scene, :ref:`_handles()` is implemented, and an :ref:`InputEvent` happens in the 2D viewport. If this method returns ``true``, ``event`` is intercepted by this **EditorPlugin**, otherwise ``event`` is forwarded to other Editor classes. .. tabs:: @@ -837,7 +837,7 @@ This is for editors that edit script-based objects. You can return a list of bre Override this method in your plugin to return a :ref:`Texture2D` in order to give it an icon. -For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. +For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", "Game", and "AssetLib" buttons. Ideally, the plugin icon should be white with a transparent background and 16Γ—16 pixels in size. @@ -876,7 +876,7 @@ Ideally, the plugin icon should be white with a transparent background and 16Γ—1 Override this method in your plugin to provide the name of the plugin when displayed in the Redot editor. -For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. +For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", "Game", and "AssetLib" buttons. .. rst-class:: classref-item-separator @@ -888,13 +888,13 @@ For main screen plugins, this appears at the top of the screen, to the right of :ref:`Dictionary` **_get_state**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an ``editstate`` file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use :ref:`_get_window_layout` instead. +Override this method to provide a state data you want to be saved, like view position, grid settings, folding, etc. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). This data is automatically saved for each scene in an ``editstate`` file in the editor metadata folder. If you want to store global (scene-independent) editor data for your plugin, you can use :ref:`_get_window_layout()` instead. -Use :ref:`_set_state` to restore your saved state. +Use :ref:`_set_state()` to restore your saved state. \ **Note:** This method should not be used to save important settings that should persist with the project. -\ **Note:** You must implement :ref:`_get_plugin_name` for the state to be stored and restored correctly. +\ **Note:** You must implement :ref:`_get_plugin_name()` for the state to be stored and restored correctly. :: @@ -916,7 +916,7 @@ Override this method to provide a custom message that lists unsaved changes. The When closing a scene, ``for_scene`` is the path to the scene being closed. You can use it to handle built-in resources in that scene. -If the user confirms saving, :ref:`_save_external_data` will be called, before closing the editor. +If the user confirms saving, :ref:`_save_external_data()` will be called, before closing the editor. :: @@ -950,9 +950,9 @@ If the plugin has no scene-specific changes, you can ignore the calls when closi |void| **_get_window_layout**\ (\ configuration\: :ref:`ConfigFile`\ ) |virtual| :ref:`πŸ”—` -Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when :ref:`queue_save_layout` is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the ``editor_layout.cfg`` file in the editor metadata directory. +Override this method to provide the GUI layout of the plugin or any other data you want to be stored. This is used to save the project's editor layout when :ref:`queue_save_layout()` is called or the editor layout was changed (for example changing the position of a dock). The data is stored in the ``editor_layout.cfg`` file in the editor metadata directory. -Use :ref:`_set_window_layout` to restore your saved layout. +Use :ref:`_set_window_layout()` to restore your saved layout. :: @@ -970,7 +970,7 @@ Use :ref:`_set_window_layout` **_handles**\ (\ object\: :ref:`Object`\ ) |virtual| |const| :ref:`πŸ”—` -Implement this function if your plugin edits a specific type of object (Resource or Node). If you return ``true``, then you will get the functions :ref:`_edit` and :ref:`_make_visible` called when the editor requests them. If you have declared the methods :ref:`_forward_canvas_gui_input` and :ref:`_forward_3d_gui_input` these will be called too. +Implement this function if your plugin edits a specific type of object (Resource or Node). If you return ``true``, then you will get the functions :ref:`_edit()` and :ref:`_make_visible()` called when the editor requests them. If you have declared the methods :ref:`_forward_canvas_gui_input()` and :ref:`_forward_3d_gui_input()` these will be called too. \ **Note:** Each plugin should handle only one type of objects at a time. If a plugin handles more types of objects and they are edited at the same time, it will result in errors. @@ -984,11 +984,11 @@ Implement this function if your plugin edits a specific type of object (Resource :ref:`bool` **_has_main_screen**\ (\ ) |virtual| |const| :ref:`πŸ”—` -Returns ``true`` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script** and **AssetLib**). +Returns ``true`` if this is a main screen editor plugin (it goes in the workspace selector together with **2D**, **3D**, **Script**, **Game**, and **AssetLib**). -When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of :ref:`EditorInterface.get_editor_main_screen` and made visible inside :ref:`_make_visible`. +When the plugin's workspace is selected, other main screen plugins will be hidden, but your plugin will not appear automatically. It needs to be added as a child of :ref:`EditorInterface.get_editor_main_screen()` and made visible inside :ref:`_make_visible()`. -Use :ref:`_get_plugin_name` and :ref:`_get_plugin_icon` to customize the plugin button's appearance. +Use :ref:`_get_plugin_name()` and :ref:`_get_plugin_icon()` to customize the plugin button's appearance. :: @@ -1047,9 +1047,9 @@ This method is called after the editor saves the project or when it's closed. It |void| **_set_state**\ (\ state\: :ref:`Dictionary`\ ) |virtual| :ref:`πŸ”—` -Restore the state saved by :ref:`_get_state`. This method is called when the current scene tab is changed in the editor. +Restore the state saved by :ref:`_get_state()`. This method is called when the current scene tab is changed in the editor. -\ **Note:** Your plugin must implement :ref:`_get_plugin_name`, otherwise it will not be recognized and this method will not be called. +\ **Note:** Your plugin must implement :ref:`_get_plugin_name()`, otherwise it will not be recognized and this method will not be called. :: @@ -1067,7 +1067,7 @@ Restore the state saved by :ref:`_get_state`\ ) |virtual| :ref:`πŸ”—` -Restore the plugin GUI layout and data saved by :ref:`_get_window_layout`. This method is called for every plugin on editor startup. Use the provided ``configuration`` file to read your saved data. +Restore the plugin GUI layout and data saved by :ref:`_get_window_layout()`. This method is called for every plugin on editor startup. Use the provided ``configuration`` file to read your saved data. :: @@ -1111,7 +1111,7 @@ See :ref:`ContextMenuSlot` for ava :ref:`Button` **add_control_to_bottom_panel**\ (\ control\: :ref:`Control`, title\: :ref:`String`, shortcut\: :ref:`Shortcut` = null\ ) :ref:`πŸ”—` -Adds a control to the bottom panel (together with Output, Debug, Animation, etc.). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel` and free it with :ref:`Node.queue_free`. +Adds a control to the bottom panel (together with Output, Debug, Animation, etc.). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_bottom_panel()` and free it with :ref:`Node.queue_free()`. Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the bottom panel's visibility. See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use :kbd:`Alt` modifier. @@ -1129,7 +1129,7 @@ Adds a custom control to a container (see :ref:`CustomControlContainer` and free it with :ref:`Node.queue_free`. +When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_container()` and free it with :ref:`Node.queue_free()`. .. rst-class:: classref-item-separator @@ -1145,9 +1145,9 @@ Adds the control to a specific dock slot (see :ref:`DockSlot` and free it with :ref:`Node.queue_free`. +When your plugin is deactivated, make sure to remove your custom control with :ref:`remove_control_from_docks()` and free it with :ref:`Node.queue_free()`. -Optionally, you can specify a shortcut parameter. When pressed, this shortcut will toggle the dock's visibility once it's moved to the bottom panel (this shortcut does not affect the dock otherwise). See the default editor bottom panel shortcuts in the Editor Settings for inspiration. Per convention, they all use :kbd:`Alt` modifier. +Optionally, you can specify a shortcut parameter. When pressed, this shortcut will open and focus the dock. .. rst-class:: classref-item-separator @@ -1165,7 +1165,7 @@ When a given node or resource is selected, the base type will be instantiated (e \ **Note:** The base type is the base engine class which this type's class hierarchy inherits, not any custom type parent classes. -You can use the virtual method :ref:`_handles` to check if your custom object is being edited by checking the script or using the ``is`` keyword. +You can use the virtual method :ref:`_handles()` to check if your custom object is being edited by checking the script or using the ``is`` keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. @@ -1207,7 +1207,7 @@ Registers a new :ref:`EditorExportPlatform`. Export Registers a new :ref:`EditorExportPlugin`. Export plugins are used to perform tasks when the project is being exported. -See :ref:`add_inspector_plugin` for an example of how to register a plugin. +See :ref:`add_inspector_plugin()` for an example of how to register a plugin. .. rst-class:: classref-item-separator @@ -1223,9 +1223,9 @@ Registers a new :ref:`EditorImportPlugin`. Import plug If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. -\ **Note:** If you want to import custom 3D asset formats use :ref:`add_scene_format_importer_plugin` instead. +\ **Note:** If you want to import custom 3D asset formats use :ref:`add_scene_format_importer_plugin()` instead. -See :ref:`add_inspector_plugin` for an example of how to register a plugin. +See :ref:`add_inspector_plugin()` for an example of how to register a plugin. .. rst-class:: classref-item-separator @@ -1239,7 +1239,7 @@ See :ref:`add_inspector_plugin` Registers a new :ref:`EditorInspectorPlugin`. Inspector plugins are used to extend :ref:`EditorInspector` and provide custom configuration tools for your object's properties. -\ **Note:** Always use :ref:`remove_inspector_plugin` to remove the registered :ref:`EditorInspectorPlugin` when your **EditorPlugin** is disabled to prevent leaks and an unexpected behavior. +\ **Note:** Always use :ref:`remove_inspector_plugin()` to remove the registered :ref:`EditorInspectorPlugin` when your **EditorPlugin** is disabled to prevent leaks and an unexpected behavior. .. tabs:: @@ -1269,7 +1269,7 @@ Registers a new :ref:`EditorInspectorPlugin`. Inspe Registers a new :ref:`EditorNode3DGizmoPlugin`. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a :ref:`Node3D`. -See :ref:`add_inspector_plugin` for an example of how to register a plugin. +See :ref:`add_inspector_plugin()` for an example of how to register a plugin. .. rst-class:: classref-item-separator @@ -1335,7 +1335,7 @@ Adds a custom menu item to **Project > Tools** named ``name``. When clicked, the |void| **add_tool_submenu_item**\ (\ name\: :ref:`String`, submenu\: :ref:`PopupMenu`\ ) :ref:`πŸ”—` -Adds a custom :ref:`PopupMenu` submenu under **Project > Tools >** ``name``. Use :ref:`remove_tool_menu_item` on plugin clean up to remove the menu. +Adds a custom :ref:`PopupMenu` submenu under **Project > Tools >** ``name``. Use :ref:`remove_tool_menu_item()` on plugin clean up to remove the menu. .. rst-class:: classref-item-separator @@ -1499,7 +1499,7 @@ Removes the specified context menu plugin. |void| **remove_control_from_bottom_panel**\ (\ control\: :ref:`Control`\ ) :ref:`πŸ”—` -Removes the control from the bottom panel. You have to manually :ref:`Node.queue_free` the control. +Removes the control from the bottom panel. You have to manually :ref:`Node.queue_free()` the control. .. rst-class:: classref-item-separator @@ -1511,7 +1511,7 @@ Removes the control from the bottom panel. You have to manually :ref:`Node.queue |void| **remove_control_from_container**\ (\ container\: :ref:`CustomControlContainer`, control\: :ref:`Control`\ ) :ref:`πŸ”—` -Removes the control from the specified container. You have to manually :ref:`Node.queue_free` the control. +Removes the control from the specified container. You have to manually :ref:`Node.queue_free()` the control. .. rst-class:: classref-item-separator @@ -1523,7 +1523,7 @@ Removes the control from the specified container. You have to manually :ref:`Nod |void| **remove_control_from_docks**\ (\ control\: :ref:`Control`\ ) :ref:`πŸ”—` -Removes the control from the dock. You have to manually :ref:`Node.queue_free` the control. +Removes the control from the dock. You have to manually :ref:`Node.queue_free()` the control. .. rst-class:: classref-item-separator @@ -1535,7 +1535,7 @@ Removes the control from the dock. You have to manually :ref:`Node.queue_free`\ ) :ref:`πŸ”—` -Removes a custom type added by :ref:`add_custom_type`. +Removes a custom type added by :ref:`add_custom_type()`. .. rst-class:: classref-item-separator @@ -1559,7 +1559,7 @@ Removes the debugger plugin with given script from the Debugger. |void| **remove_export_platform**\ (\ platform\: :ref:`EditorExportPlatform`\ ) :ref:`πŸ”—` -Removes an export platform registered by :ref:`add_export_platform`. +Removes an export platform registered by :ref:`add_export_platform()`. .. rst-class:: classref-item-separator @@ -1571,7 +1571,7 @@ Removes an export platform registered by :ref:`add_export_platform`\ ) :ref:`πŸ”—` -Removes an export plugin registered by :ref:`add_export_plugin`. +Removes an export plugin registered by :ref:`add_export_plugin()`. .. rst-class:: classref-item-separator @@ -1583,7 +1583,7 @@ Removes an export plugin registered by :ref:`add_export_plugin`\ ) :ref:`πŸ”—` -Removes an import plugin registered by :ref:`add_import_plugin`. +Removes an import plugin registered by :ref:`add_import_plugin()`. .. rst-class:: classref-item-separator @@ -1595,7 +1595,7 @@ Removes an import plugin registered by :ref:`add_import_plugin`\ ) :ref:`πŸ”—` -Removes an inspector plugin registered by :ref:`add_inspector_plugin`. +Removes an inspector plugin registered by :ref:`add_inspector_plugin()`. .. rst-class:: classref-item-separator @@ -1607,7 +1607,7 @@ Removes an inspector plugin registered by :ref:`add_inspector_plugin`\ ) :ref:`πŸ”—` -Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin`. +Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin()`. .. rst-class:: classref-item-separator @@ -1619,7 +1619,7 @@ Removes a gizmo plugin registered by :ref:`add_node_3d_gizmo_plugin`\ ) :ref:`πŸ”—` -Removes a resource conversion plugin registered by :ref:`add_resource_conversion_plugin`. +Removes a resource conversion plugin registered by :ref:`add_resource_conversion_plugin()`. .. rst-class:: classref-item-separator @@ -1631,7 +1631,7 @@ Removes a resource conversion plugin registered by :ref:`add_resource_conversion |void| **remove_scene_format_importer_plugin**\ (\ scene_format_importer\: :ref:`EditorSceneFormatImporter`\ ) :ref:`πŸ”—` -Removes a scene format importer registered by :ref:`add_scene_format_importer_plugin`. +Removes a scene format importer registered by :ref:`add_scene_format_importer_plugin()`. .. rst-class:: classref-item-separator @@ -1643,7 +1643,7 @@ Removes a scene format importer registered by :ref:`add_scene_format_importer_pl |void| **remove_scene_post_import_plugin**\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin`\ ) :ref:`πŸ”—` -Remove the :ref:`EditorScenePostImportPlugin`, added with :ref:`add_scene_post_import_plugin`. +Remove the :ref:`EditorScenePostImportPlugin`, added with :ref:`add_scene_post_import_plugin()`. .. rst-class:: classref-item-separator @@ -1667,7 +1667,7 @@ Removes a menu ``name`` from **Project > Tools**. |void| **remove_translation_parser_plugin**\ (\ parser\: :ref:`EditorTranslationParserPlugin`\ ) :ref:`πŸ”—` -Removes a custom translation parser plugin registered by :ref:`add_translation_parser_plugin`. +Removes a custom translation parser plugin registered by :ref:`add_translation_parser_plugin()`. .. rst-class:: classref-item-separator @@ -1679,7 +1679,7 @@ Removes a custom translation parser plugin registered by :ref:`add_translation_p |void| **remove_undo_redo_inspector_hook_callback**\ (\ callable\: :ref:`Callable`\ ) :ref:`πŸ”—` -Removes a callback previously added by :ref:`add_undo_redo_inspector_hook_callback`. +Removes a callback previously added by :ref:`add_undo_redo_inspector_hook_callback()`. .. rst-class:: classref-item-separator @@ -1703,7 +1703,7 @@ Sets the tab icon for the given control in a dock slot. Setting to ``null`` remo |void| **set_force_draw_over_forwarding_enabled**\ (\ ) :ref:`πŸ”—` -Enables calling of :ref:`_forward_canvas_force_draw_over_viewport` for the 2D editor and :ref:`_forward_3d_force_draw_over_viewport` for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. +Enables calling of :ref:`_forward_canvas_force_draw_over_viewport()` for the 2D editor and :ref:`_forward_3d_force_draw_over_viewport()` for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. .. rst-class:: classref-item-separator @@ -1715,7 +1715,7 @@ Enables calling of :ref:`_forward_canvas_force_draw_over_viewport` -Use this method if you always want to receive inputs from 3D view screen inside :ref:`_forward_3d_gui_input`. It might be especially usable if your plugin will want to use raycast in the scene. +Use this method if you always want to receive inputs from 3D view screen inside :ref:`_forward_3d_gui_input()`. It might be especially usable if your plugin will want to use raycast in the scene. .. rst-class:: classref-item-separator @@ -1727,7 +1727,7 @@ Use this method if you always want to receive inputs from 3D view screen inside :ref:`int` **update_overlays**\ (\ ) |const| :ref:`πŸ”—` -Updates the overlays of the 2D and 3D editor viewport. Causes methods :ref:`_forward_canvas_draw_over_viewport`, :ref:`_forward_canvas_force_draw_over_viewport`, :ref:`_forward_3d_draw_over_viewport` and :ref:`_forward_3d_force_draw_over_viewport` to be called. +Updates the overlays of the 2D and 3D editor viewport. Causes methods :ref:`_forward_canvas_draw_over_viewport()`, :ref:`_forward_canvas_force_draw_over_viewport()`, :ref:`_forward_3d_draw_over_viewport()` and :ref:`_forward_3d_force_draw_over_viewport()` to be called. .. |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_editorproperty.rst b/classes/class_editorproperty.rst index ace6bcf63c7..81f88a09572 100644 --- a/classes/class_editorproperty.rst +++ b/classes/class_editorproperty.rst @@ -29,27 +29,33 @@ Properties .. table:: :widths: auto - +-----------------------------+-------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`checkable` | ``false`` | - +-----------------------------+-------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`checked` | ``false`` | - +-----------------------------+-------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`deletable` | ``false`` | - +-----------------------------+-------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`draw_warning` | ``false`` | - +-----------------------------+-------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`keying` | ``false`` | - +-----------------------------+-------------------------------------------------------------------------+-----------+ - | :ref:`String` | :ref:`label` | ``""`` | - +-----------------------------+-------------------------------------------------------------------------+-----------+ - | :ref:`float` | :ref:`name_split_ratio` | ``0.5`` | - +-----------------------------+-------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`read_only` | ``false`` | - +-----------------------------+-------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`selectable` | ``true`` | - +-----------------------------+-------------------------------------------------------------------------+-----------+ - | :ref:`bool` | :ref:`use_folding` | ``false`` | - +-----------------------------+-------------------------------------------------------------------------+-----------+ + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`checkable` | ``false`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`checked` | ``false`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`deletable` | ``false`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_background` | ``true`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_label` | ``true`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`draw_warning` | ``false`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``3`` (overrides :ref:`Control`) | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`keying` | ``false`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`String` | :ref:`label` | ``""`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`float` | :ref:`name_split_ratio` | ``0.5`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`read_only` | ``false`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`selectable` | ``true`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_folding` | ``false`` | + +------------------------------------------+-------------------------------------------------------------------------+---------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -102,7 +108,7 @@ Signals **multiple_properties_changed**\ (\ properties\: :ref:`PackedStringArray`, value\: :ref:`Array`\ ) :ref:`πŸ”—` -Emit it if you want multiple properties modified at the same time. Do not use if added via :ref:`EditorInspectorPlugin._parse_property`. +Emit it if you want multiple properties modified at the same time. Do not use if added via :ref:`EditorInspectorPlugin._parse_property()`. .. rst-class:: classref-item-separator @@ -138,7 +144,7 @@ Emitted when the revertability (i.e., whether it has a non-default value and thu **property_changed**\ (\ property\: :ref:`StringName`, value\: :ref:`Variant`, field\: :ref:`StringName`, changing\: :ref:`bool`\ ) :ref:`πŸ”—` -Do not emit this manually, use the :ref:`emit_changed` method instead. +Do not emit this manually, use the :ref:`emit_changed()` method instead. .. rst-class:: classref-item-separator @@ -298,6 +304,40 @@ Used by the inspector, set to ``true`` when the property can be deleted by the u ---- +.. _class_EditorProperty_property_draw_background: + +.. rst-class:: classref-property + +:ref:`bool` **draw_background** = ``true`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_draw_background**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_draw_background**\ (\ ) + +Used by the inspector, set to ``true`` when the property label is drawn. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorProperty_property_draw_label: + +.. rst-class:: classref-property + +:ref:`bool` **draw_label** = ``true`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_draw_label**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_draw_label**\ (\ ) + +Used by the inspector, set to ``true`` when the property background is drawn. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorProperty_property_draw_warning: .. rst-class:: classref-property @@ -500,7 +540,7 @@ Gets the edited object. :ref:`StringName` **get_edited_property**\ (\ ) |const| :ref:`πŸ”—` -Gets the edited property. If your editor is for a single property (added via :ref:`EditorInspectorPlugin._parse_property`), then this will return the property. +Gets the edited property. If your editor is for a single property (added via :ref:`EditorInspectorPlugin._parse_property()`), then this will return the property. .. rst-class:: classref-item-separator @@ -536,7 +576,7 @@ Draw property as selected. Used by the inspector. |void| **set_bottom_editor**\ (\ editor\: :ref:`Control`\ ) :ref:`πŸ”—` -Puts the ``editor`` control below the property label. The control must be previously added using :ref:`Node.add_child`. +Puts the ``editor`` control below the property label. The control must be previously added using :ref:`Node.add_child()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorresourceconversionplugin.rst b/classes/class_editorresourceconversionplugin.rst index 176250642ce..4684dcf74d9 100644 --- a/classes/class_editorresourceconversionplugin.rst +++ b/classes/class_editorresourceconversionplugin.rst @@ -43,7 +43,7 @@ Below shows an example of a basic plugin that will convert an :ref:`ImageTexture -To use an **EditorResourceConversionPlugin**, register it using the :ref:`EditorPlugin.add_resource_conversion_plugin` method first. +To use an **EditorResourceConversionPlugin**, register it using the :ref:`EditorPlugin.add_resource_conversion_plugin()` method first. .. rst-class:: classref-reftable-group @@ -76,7 +76,7 @@ Method Descriptions :ref:`Resource` **_convert**\ (\ resource\: :ref:`Resource`\ ) |virtual| |const| :ref:`πŸ”—` -Takes an input :ref:`Resource` and converts it to the type given in :ref:`_converts_to`. The returned :ref:`Resource` is the result of the conversion, and the input :ref:`Resource` remains unchanged. +Takes an input :ref:`Resource` and converts it to the type given in :ref:`_converts_to()`. The returned :ref:`Resource` is the result of the conversion, and the input :ref:`Resource` remains unchanged. .. rst-class:: classref-item-separator diff --git a/classes/class_editorresourcepicker.rst b/classes/class_editorresourcepicker.rst index 18f9ee301ec..eaa3f431f79 100644 --- a/classes/class_editorresourcepicker.rst +++ b/classes/class_editorresourcepicker.rst @@ -161,7 +161,7 @@ The edited resource value. - |void| **set_toggle_mode**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_toggle_mode**\ (\ ) -If ``true``, the main button with the resource preview works in the toggle mode. Use :ref:`set_toggle_pressed` to manually set the state. +If ``true``, the main button with the resource preview works in the toggle mode. Use :ref:`set_toggle_pressed()` to manually set the state. .. rst-class:: classref-section-separator @@ -178,7 +178,7 @@ Method Descriptions :ref:`bool` **_handle_menu_selected**\ (\ id\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -This virtual method can be implemented to handle context menu items not handled by default. See :ref:`_set_create_options`. +This virtual method can be implemented to handle context menu items not handled by default. See :ref:`_set_create_options()`. .. rst-class:: classref-item-separator @@ -192,7 +192,7 @@ This virtual method can be implemented to handle context menu items not handled This virtual method is called when updating the context menu of **EditorResourcePicker**. Implement this method to override the "New ..." items with your own options. ``menu_node`` is a reference to the :ref:`PopupMenu` node. -\ **Note:** Implement :ref:`_handle_menu_selected` to handle these custom items. +\ **Note:** Implement :ref:`_handle_menu_selected()` to handle these custom items. .. rst-class:: classref-item-separator diff --git a/classes/class_editorresourcepreview.rst b/classes/class_editorresourcepreview.rst index ca36a28aa36..59bde0e1dea 100644 --- a/classes/class_editorresourcepreview.rst +++ b/classes/class_editorresourcepreview.rst @@ -21,7 +21,7 @@ Description This node is used to generate previews for resources or files. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_previewer`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_resource_previewer()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_editorresourcepreviewgenerator.rst b/classes/class_editorresourcepreviewgenerator.rst index 55323806086..91c385fb1f4 100644 --- a/classes/class_editorresourcepreviewgenerator.rst +++ b/classes/class_editorresourcepreviewgenerator.rst @@ -56,7 +56,7 @@ Method Descriptions :ref:`bool` **_can_generate_small_preview**\ (\ ) |virtual| |const| :ref:`πŸ”—` -If this function returns ``true``, the generator will call :ref:`_generate` or :ref:`_generate_from_path` for small previews as well. +If this function returns ``true``, the generator will call :ref:`_generate()` or :ref:`_generate_from_path()` for small previews as well. By default, it returns ``false``. @@ -76,7 +76,7 @@ Returning ``null`` is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). -\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path` (like image size, sample length etc.). +\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path()` (like image size, sample length etc.). .. rst-class:: classref-item-separator @@ -88,13 +88,13 @@ Care must be taken because this function is always called from a thread (not the :ref:`Texture2D` **_generate_from_path**\ (\ path\: :ref:`String`, size\: :ref:`Vector2i`, metadata\: :ref:`Dictionary`\ ) |virtual| |const| :ref:`πŸ”—` -Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call :ref:`_generate`. +Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call :ref:`_generate()`. Returning ``null`` is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). -\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path` (like image size, sample length etc.). +\ ``metadata`` dictionary can be modified to store file-specific metadata that can be used in :ref:`EditorResourceTooltipPlugin._make_tooltip_for_path()` (like image size, sample length etc.). .. rst-class:: classref-item-separator @@ -106,7 +106,7 @@ Care must be taken because this function is always called from a thread (not the :ref:`bool` **_generate_small_preview_automatically**\ (\ ) |virtual| |const| :ref:`πŸ”—` -If this function returns ``true``, the generator will automatically generate the small previews from the normal preview texture generated by the methods :ref:`_generate` or :ref:`_generate_from_path`. +If this function returns ``true``, the generator will automatically generate the small previews from the normal preview texture generated by the methods :ref:`_generate()` or :ref:`_generate_from_path()`. By default, it returns ``false``. diff --git a/classes/class_editorresourcetooltipplugin.rst b/classes/class_editorresourcetooltipplugin.rst index f8899f5f2b5..72c10196393 100644 --- a/classes/class_editorresourcetooltipplugin.rst +++ b/classes/class_editorresourcetooltipplugin.rst @@ -21,7 +21,7 @@ Description Resource tooltip plugins are used by :ref:`FileSystemDock` to generate customized tooltips for specific resources. E.g. tooltip for a :ref:`Texture2D` displays a bigger preview and the texture's dimensions. -A plugin must be first registered with :ref:`FileSystemDock.add_resource_tooltip_plugin`. When the user hovers a resource in filesystem dock which is handled by the plugin, :ref:`_make_tooltip_for_path` is called to create the tooltip. It works similarly to :ref:`Control._make_custom_tooltip`. +A plugin must be first registered with :ref:`FileSystemDock.add_resource_tooltip_plugin()`. When the user hovers a resource in filesystem dock which is handled by the plugin, :ref:`_make_tooltip_for_path()` is called to create the tooltip. It works similarly to :ref:`Control._make_custom_tooltip()`. .. rst-class:: classref-reftable-group @@ -68,13 +68,13 @@ Return ``true`` if the plugin is going to handle the given :ref:`Resource`). +The ``metadata`` dictionary is provided by preview generator (see :ref:`EditorResourcePreviewGenerator._generate()`). \ ``base`` is the base default tooltip, which is a :ref:`VBoxContainer` with a file name, type and size labels. If another plugin handled the same file type, ``base`` will be output from the previous plugin. For best result, make sure the base tooltip is part of the returned :ref:`Control`. -\ **Note:** It's unadvised to use :ref:`ResourceLoader.load`, especially with heavy resources like models or textures, because it will make the editor unresponsive when creating the tooltip. You can use :ref:`request_thumbnail` if you want to display a preview in your tooltip. +\ **Note:** It's unadvised to use :ref:`ResourceLoader.load()`, especially with heavy resources like models or textures, because it will make the editor unresponsive when creating the tooltip. You can use :ref:`request_thumbnail()` if you want to display a preview in your tooltip. -\ **Note:** If you decide to discard the ``base``, make sure to call :ref:`Node.queue_free`, because it's not freed automatically. +\ **Note:** If you decide to discard the ``base``, make sure to call :ref:`Node.queue_free()`, because it's not freed automatically. :: diff --git a/classes/class_editorsceneformatimporter.rst b/classes/class_editorsceneformatimporter.rst index 155cc953e82..e610ebc751e 100644 --- a/classes/class_editorsceneformatimporter.rst +++ b/classes/class_editorsceneformatimporter.rst @@ -23,7 +23,7 @@ Description **EditorSceneFormatImporter** allows to define an importer script for a third-party 3D format. -To use **EditorSceneFormatImporter**, register it using the :ref:`EditorPlugin.add_scene_format_importer_plugin` method first. +To use **EditorSceneFormatImporter**, register it using the :ref:`EditorPlugin.add_scene_format_importer_plugin()` method first. .. rst-class:: classref-reftable-group @@ -33,17 +33,19 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_extensions`\ (\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_import_flags`\ (\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_get_import_options`\ (\ path\: :ref:`String`\ ) |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_option_visibility`\ (\ path\: :ref:`String`, for_animation\: :ref:`bool`, option\: :ref:`String`\ ) |virtual| |const| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Object` | :ref:`_import_scene`\ (\ path\: :ref:`String`, flags\: :ref:`int`, options\: :ref:`Dictionary`\ ) |virtual| | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_extensions`\ (\ ) |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_get_import_options`\ (\ path\: :ref:`String`\ ) |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_option_visibility`\ (\ path\: :ref:`String`, for_animation\: :ref:`bool`, option\: :ref:`String`\ ) |virtual| |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Object` | :ref:`_import_scene`\ (\ path\: :ref:`String`, flags\: :ref:`int`, options\: :ref:`Dictionary`\ ) |virtual| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_import_option`\ (\ name\: :ref:`String`, value\: :ref:`Variant`\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_import_option_advanced`\ (\ type\: :ref:`Variant.Type`, name\: :ref:`String`, default_value\: :ref:`Variant`, hint\: :ref:`PropertyHint` = 0, hint_string\: :ref:`String` = "", usage_flags\: :ref:`int` = 6\ ) | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -153,65 +155,71 @@ Method Descriptions :ref:`PackedStringArray` **_get_extensions**\ (\ ) |virtual| |const| :ref:`πŸ”—` -.. container:: contribute - - There is currently no description for this method. Please help us by :ref:`contributing one `! +Return supported file extensions for this scene importer. .. rst-class:: classref-item-separator ---- -.. _class_EditorSceneFormatImporter_private_method__get_import_flags: +.. _class_EditorSceneFormatImporter_private_method__get_import_options: .. rst-class:: classref-method -:ref:`int` **_get_import_flags**\ (\ ) |virtual| |const| :ref:`πŸ”—` +|void| **_get_import_options**\ (\ path\: :ref:`String`\ ) |virtual| :ref:`πŸ”—` + +Override to add general import options. These will appear in the main import dock on the editor. Add options via :ref:`add_import_option()` and :ref:`add_import_option_advanced()`. -.. container:: contribute +\ **Note:** All **EditorSceneFormatImporter** and :ref:`EditorScenePostImportPlugin` instances will add options for all files. It is good practice to check the file extension when ``path`` is non-empty. - There is currently no description for this method. Please help us by :ref:`contributing one `! +When the user is editing project settings, ``path`` will be empty. It is recommended to add all options when ``path`` is empty to allow the user to customize Import Defaults. .. rst-class:: classref-item-separator ---- -.. _class_EditorSceneFormatImporter_private_method__get_import_options: +.. _class_EditorSceneFormatImporter_private_method__get_option_visibility: .. rst-class:: classref-method -|void| **_get_import_options**\ (\ path\: :ref:`String`\ ) |virtual| :ref:`πŸ”—` - -.. container:: contribute +:ref:`Variant` **_get_option_visibility**\ (\ path\: :ref:`String`, for_animation\: :ref:`bool`, option\: :ref:`String`\ ) |virtual| |const| :ref:`πŸ”—` - There is currently no description for this method. Please help us by :ref:`contributing one `! +Should return ``true`` to show the given option, ``false`` to hide the given option, or ``null`` to ignore. .. rst-class:: classref-item-separator ---- -.. _class_EditorSceneFormatImporter_private_method__get_option_visibility: +.. _class_EditorSceneFormatImporter_private_method__import_scene: .. rst-class:: classref-method -:ref:`Variant` **_get_option_visibility**\ (\ path\: :ref:`String`, for_animation\: :ref:`bool`, option\: :ref:`String`\ ) |virtual| |const| :ref:`πŸ”—` - -.. container:: contribute +:ref:`Object` **_import_scene**\ (\ path\: :ref:`String`, flags\: :ref:`int`, options\: :ref:`Dictionary`\ ) |virtual| :ref:`πŸ”—` - There is currently no description for this method. Please help us by :ref:`contributing one `! +Perform the bulk of the scene import logic here, for example using :ref:`GLTFDocument` or :ref:`FBXDocument`. .. rst-class:: classref-item-separator ---- -.. _class_EditorSceneFormatImporter_private_method__import_scene: +.. _class_EditorSceneFormatImporter_method_add_import_option: .. rst-class:: classref-method -:ref:`Object` **_import_scene**\ (\ path\: :ref:`String`, flags\: :ref:`int`, options\: :ref:`Dictionary`\ ) |virtual| :ref:`πŸ”—` +|void| **add_import_option**\ (\ name\: :ref:`String`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -.. container:: contribute +Add a specific import option (name and default value only). This function can only be called from :ref:`_get_import_options()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSceneFormatImporter_method_add_import_option_advanced: + +.. rst-class:: classref-method + +|void| **add_import_option_advanced**\ (\ type\: :ref:`Variant.Type`, name\: :ref:`String`, default_value\: :ref:`Variant`, hint\: :ref:`PropertyHint` = 0, hint_string\: :ref:`String` = "", usage_flags\: :ref:`int` = 6\ ) :ref:`πŸ”—` - There is currently no description for this method. Please help us by :ref:`contributing one `! +Add a specific import option. This function can only be called from :ref:`_get_import_options()`. .. |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_editorsceneformatimporterblend.rst b/classes/class_editorsceneformatimporterblend.rst index d5739071d1d..ce41d91e8db 100644 --- a/classes/class_editorsceneformatimporterblend.rst +++ b/classes/class_editorsceneformatimporterblend.rst @@ -21,7 +21,7 @@ Description Imports Blender scenes in the ``.blend`` file format through the glTF 2.0 3D import pipeline. This importer requires Blender to be installed by the user, so that it can be used to export the scene as glTF 2.0. -The location of the Blender binary is set via the ``filesystem/import/blender/blender_path`` editor setting. +The location of the Blender binary is set via the :ref:`EditorSettings.filesystem/import/blender/blender_path` setting. This importer is only used if :ref:`ProjectSettings.filesystem/import/blender/enabled` is enabled, otherwise ``.blend`` files present in the project folder are not imported. diff --git a/classes/class_editorscenepostimport.rst b/classes/class_editorscenepostimport.rst index 9488231d60c..b651bedc06d 100644 --- a/classes/class_editorscenepostimport.rst +++ b/classes/class_editorscenepostimport.rst @@ -21,7 +21,7 @@ Description Imported scenes can be automatically modified right after import by setting their **Custom Script** Import property to a ``tool`` script that inherits from this class. -The :ref:`_post_import` callback receives the imported scene's root node and returns the modified version of the scene: +The :ref:`_post_import()` callback receives the imported scene's root node and returns the modified version of the scene: .. tabs:: diff --git a/classes/class_editorscenepostimportplugin.rst b/classes/class_editorscenepostimportplugin.rst index cd8b733f50b..991cdde3394 100644 --- a/classes/class_editorscenepostimportplugin.rst +++ b/classes/class_editorscenepostimportplugin.rst @@ -179,7 +179,7 @@ Method Descriptions |void| **_get_import_options**\ (\ path\: :ref:`String`\ ) |virtual| :ref:`πŸ”—` -Override to add general import options. These will appear in the main import dock on the editor. Add options via :ref:`add_import_option` and :ref:`add_import_option_advanced`. +Override to add general import options. These will appear in the main import dock on the editor. Add options via :ref:`add_import_option()` and :ref:`add_import_option_advanced()`. .. rst-class:: classref-item-separator @@ -191,7 +191,7 @@ Override to add general import options. These will appear in the main import doc |void| **_get_internal_import_options**\ (\ category\: :ref:`int`\ ) |virtual| :ref:`πŸ”—` -Override to add internal import options. These will appear in the 3D scene import dialog. Add options via :ref:`add_import_option` and :ref:`add_import_option_advanced`. +Override to add internal import options. These will appear in the 3D scene import dialog. Add options via :ref:`add_import_option()` and :ref:`add_import_option_advanced()`. .. rst-class:: classref-item-separator @@ -265,6 +265,8 @@ Post process the scene. This function is called after the final scene has been c Pre Process the scene. This function is called right after the scene format loader loaded the scene and no changes have been made. +Pre process may be used to adjust internal import options in the ``"nodes"``, ``"meshes"``, ``"animations"`` or ``"materials"`` keys inside ``get_option_value("_subresources")``. + .. rst-class:: classref-item-separator ---- @@ -275,7 +277,7 @@ Pre Process the scene. This function is called right after the scene format load |void| **add_import_option**\ (\ name\: :ref:`String`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Add a specific import option (name and default value only). This function can only be called from :ref:`_get_import_options` and :ref:`_get_internal_import_options`. +Add a specific import option (name and default value only). This function can only be called from :ref:`_get_import_options()` and :ref:`_get_internal_import_options()`. .. rst-class:: classref-item-separator @@ -287,7 +289,7 @@ Add a specific import option (name and default value only). This function can on |void| **add_import_option_advanced**\ (\ type\: :ref:`Variant.Type`, name\: :ref:`String`, default_value\: :ref:`Variant`, hint\: :ref:`PropertyHint` = 0, hint_string\: :ref:`String` = "", usage_flags\: :ref:`int` = 6\ ) :ref:`πŸ”—` -Add a specific import option. This function can only be called from :ref:`_get_import_options` and :ref:`_get_internal_import_options`. +Add a specific import option. This function can only be called from :ref:`_get_import_options()` and :ref:`_get_internal_import_options()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index 5f8b9e7b068..a01339d2457 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -19,7 +19,7 @@ Base script that can be used to add extension functions to the editor. Description ----------- -Scripts extending this class and implementing its :ref:`_run` method can be executed from the Script Editor's **File > Run** menu option (or by pressing :kbd:`Ctrl + Shift + X`) while the editor is running. This is useful for adding custom in-editor functionality to Redot. For more complex additions, consider using :ref:`EditorPlugin`\ s instead. +Scripts extending this class and implementing its :ref:`_run()` method can be executed from the Script Editor's **File > Run** menu option (or by pressing :kbd:`Ctrl + Shift + X`) while the editor is running. This is useful for adding custom in-editor functionality to Redot. For more complex additions, consider using :ref:`EditorPlugin`\ s instead. \ **Note:** Extending scripts need to have ``tool`` mode enabled. @@ -126,7 +126,7 @@ Returns the :ref:`EditorInterface` singleton instance. :ref:`Node` **get_scene**\ (\ ) |const| :ref:`πŸ”—` -Returns the edited (current) scene's root :ref:`Node`. Equivalent of :ref:`EditorInterface.get_edited_scene_root`. +Returns the edited (current) scene's root :ref:`Node`. Equivalent of :ref:`EditorInterface.get_edited_scene_root()`. .. |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_editorselection.rst b/classes/class_editorselection.rst index 18187de1a20..e325fcc1f83 100644 --- a/classes/class_editorselection.rst +++ b/classes/class_editorselection.rst @@ -21,7 +21,7 @@ Description This object manages the SceneTree selection in the editor. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_selection`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_selection()`. .. rst-class:: classref-reftable-group @@ -38,6 +38,8 @@ Methods +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Node`\] | :ref:`get_selected_nodes`\ (\ ) | +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`Node`\] | :ref:`get_top_selected_nodes`\ (\ ) | + +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Node`\] | :ref:`get_transformable_selected_nodes`\ (\ ) | +------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`remove_node`\ (\ node\: :ref:`Node`\ ) | @@ -77,7 +79,7 @@ Method Descriptions Adds a node to the selection. -\ **Note:** The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use :ref:`EditorInterface.edit_node`. +\ **Note:** The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use :ref:`EditorInterface.edit_node()`. .. rst-class:: classref-item-separator @@ -107,13 +109,29 @@ Returns the list of selected nodes. ---- +.. _class_EditorSelection_method_get_top_selected_nodes: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`Node`\] **get_top_selected_nodes**\ (\ ) :ref:`πŸ”—` + +Returns the list of top selected nodes only, excluding any children. This is useful for performing transform operations (moving them, rotating, etc.). + +For example, if there is a node A with a child B and a sibling C, then selecting all three will cause this method to return only A and C. Changing the global transform of A will affect the global transform of B, so there is no need to change B separately. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSelection_method_get_transformable_selected_nodes: .. rst-class:: classref-method :ref:`Array`\[:ref:`Node`\] **get_transformable_selected_nodes**\ (\ ) :ref:`πŸ”—` -Returns the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc.). This list can be used to avoid situations where a node is selected and is also a child/grandchild. +**Deprecated:** Use :ref:`get_top_selected_nodes()` instead. + +Returns the list of top selected nodes only, excluding any children. This is useful for performing transform operations (moving them, rotating, etc.). See :ref:`get_top_selected_nodes()`. .. rst-class:: classref-item-separator diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index e64289296f5..e5b1315c3d1 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -48,7 +48,7 @@ Accessing the settings can be done using the following methods, such as: -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_settings`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_settings()`. .. rst-class:: classref-reftable-group @@ -65,6 +65,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debugger/auto_switch_to_stack_trace` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`debugger/max_node_selection` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`debugger/profile_native_calls` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debugger/profiler_frame_history_size` | @@ -89,6 +91,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`docks/property_editor/subresource_hue_tint` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/scene_tree/accessibility_warnings` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`docks/scene_tree/ask_before_deleting_related_animation_tracks` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`docks/scene_tree/ask_before_revoking_unique_name` | @@ -97,6 +101,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`docks/scene_tree/center_node_on_reparent` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/scene_tree/hide_filtered_out_parents` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`docks/scene_tree/start_create_dialog_fully_expanded` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/2d/bone_color1` | @@ -125,6 +131,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/2d/zoom_speed_factor` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d/active_selection_box_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/3d/default_fov` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/3d/default_z_far` | @@ -213,6 +221,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/fog_volume` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/gridmap_grid` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/instantiated` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/joint` | @@ -241,6 +251,12 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/skeleton` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/spring_bone_collision` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/spring_bone_inside_collision` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/spring_bone_joint` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/stream_player_3d` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/3d_gizmos/gizmo_colors/visibility_notifier` | @@ -257,10 +273,16 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/animation/confirm_insert_track` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/animation/default_animation_step` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/animation/default_create_bezier_tracks` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/animation/default_create_reset_tracks` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editors/animation/default_fps_compatibility` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/animation/default_fps_mode` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/animation/onion_layers_future_color` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/animation/onion_layers_past_color` | @@ -273,8 +295,6 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/bone_mapper/handle_colors/unset` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`editors/grid_map/editor_side` | - +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/grid_map/palette_min_width` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/grid_map/pick_distance` | @@ -479,6 +499,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/single_window_mode` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/editor/tablet_driver` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/ui_layout_direction` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec` | @@ -581,7 +603,9 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`interface/touchscreen/scale_gizmo_handles` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`network/connection/engine_version_update_mode` | + | :ref:`int` | :ref:`interface/touchscreen/touch_actions_panel` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`network/connection/check_for_updates` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`network/connection/network_mode` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -595,6 +619,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`network/tls/editor_tls_certificates` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`network/tls/enable_tls_v1.3` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`project_manager/default_renderer` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`project_manager/directory_naming_convention` | @@ -617,7 +643,7 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`run/window_placement/android_window` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`run/window_placement/play_window_pip_mode` | + | :ref:`int` | :ref:`run/window_placement/game_embed_mode` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`run/window_placement/rect` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -665,6 +691,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/appearance/whitespace/line_spacing` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/documentation/enable_tooltips` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/auto_reload_and_parse_scripts_on_save` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/auto_reload_scripts_on_external_change` | @@ -673,6 +701,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/convert_indent_on_save` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/behavior/files/drop_preload_resources_as_uid` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/open_dominant_script_on_scene_change` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`text_editor/behavior/files/restore_scripts_on_load` | @@ -845,6 +875,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`text_editor/theme/highlighting/user_type_color` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`text_editor/theme/highlighting/warning_color` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`text_editor/theme/highlighting/word_highlighted_color` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/theme/line_spacing` | @@ -979,6 +1011,20 @@ If ``true``, automatically switches to the **Stack Trace** panel when the debugg ---- +.. _class_EditorSettings_property_debugger/max_node_selection: + +.. rst-class:: classref-property + +:ref:`int` **debugger/max_node_selection** :ref:`πŸ”—` + +The limit of how many remote nodes can be selected at once. + +\ **Warning:** Increasing this value is not recommended, as selecting too many can make the editing and inspection of remote properties unreliable. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_debugger/profile_native_calls: .. rst-class:: classref-property @@ -1127,6 +1173,18 @@ The tint intensity to use for the subresources background in the Inspector dock. ---- +.. _class_EditorSettings_property_docks/scene_tree/accessibility_warnings: + +.. rst-class:: classref-property + +:ref:`bool` **docks/scene_tree/accessibility_warnings** :ref:`πŸ”—` + +If ``true``, accessibility related warnings are displayed alongside other configuration warnings. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_docks/scene_tree/ask_before_deleting_related_animation_tracks: .. rst-class:: classref-property @@ -1175,6 +1233,18 @@ If ``true``, new node created when reparenting node(s) will be positioned at the ---- +.. _class_EditorSettings_property_docks/scene_tree/hide_filtered_out_parents: + +.. rst-class:: classref-property + +:ref:`bool` **docks/scene_tree/hide_filtered_out_parents** :ref:`πŸ”—` + +If ``true``, the scene tree dock will only show nodes that match the filter, without showing parents that don't. This settings can also be changed in the Scene dock's top menu. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_docks/scene_tree/start_create_dialog_fully_expanded: .. rst-class:: classref-property @@ -1347,6 +1417,20 @@ The factor to use when zooming in or out in the 2D editor. For example, ``1.1`` ---- +.. _class_EditorSettings_property_editors/3d/active_selection_box_color: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d/active_selection_box_color** :ref:`πŸ”—` + +The color to use for the active selection box that surrounds selected nodes in the 3D editor viewport. The color's alpha channel influences the selection box's opacity. + +\ **Note:** The term "active" indicates that this object is the primary selection used as the basis for certain operations. This is the last selected :ref:`Node3D`, which can be reordered with :kbd:`Shift + Left mouse button`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/3d/default_fov: .. rst-class:: classref-property @@ -1905,6 +1989,18 @@ The 3D editor gizmo color for :ref:`FogVolume` nodes. ---- +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/gridmap_grid: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/gridmap_grid** :ref:`πŸ”—` + +The 3D editor gizmo color for the :ref:`GridMap` grid. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/instantiated: .. rst-class:: classref-property @@ -2073,6 +2169,42 @@ The 3D editor gizmo color used for :ref:`Skeleton3D` nodes. ---- +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/spring_bone_collision: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/spring_bone_collision** :ref:`πŸ”—` + +The 3D editor gizmo color used for :ref:`SpringBoneCollision3D` nodes. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/spring_bone_inside_collision: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/spring_bone_inside_collision** :ref:`πŸ”—` + +The 3D editor gizmo color used for :ref:`SpringBoneCollision3D` nodes with inside mode. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/spring_bone_joint: + +.. rst-class:: classref-property + +:ref:`Color` **editors/3d_gizmos/gizmo_colors/spring_bone_joint** :ref:`πŸ”—` + +The 3D editor gizmo color used for :ref:`SpringBoneSimulator3D` nodes. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/3d_gizmos/gizmo_colors/stream_player_3d: .. rst-class:: classref-property @@ -2171,6 +2303,20 @@ If ``false``, the behavior is reversed, i.e. the dialog only appears when Shift ---- +.. _class_EditorSettings_property_editors/animation/default_animation_step: + +.. rst-class:: classref-property + +:ref:`float` **editors/animation/default_animation_step** :ref:`πŸ”—` + +Default step used when creating a new :ref:`Animation` in the Animation bottom panel. Only affects the first animation created in the :ref:`AnimationPlayer`. By default, other newly created animations will use the step from the previous ones. + +This value is always expressed in seconds. If you want e.g. ``10`` FPS to be the default, you need to set the default step to ``0.1``. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/animation/default_create_bezier_tracks: .. rst-class:: classref-property @@ -2195,6 +2341,30 @@ If ``true``, create a ``RESET`` track when creating a new animation track. This ---- +.. _class_EditorSettings_property_editors/animation/default_fps_compatibility: + +.. rst-class:: classref-property + +:ref:`bool` **editors/animation/default_fps_compatibility** :ref:`πŸ”—` + +Controls whether :ref:`AnimationPlayer` will apply snapping to nearest integer FPS when snapping is in Seconds mode. The option is remembered locally for a scene and this option only determines the default value when scene doesn't have local state yet. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_editors/animation/default_fps_mode: + +.. rst-class:: classref-property + +:ref:`int` **editors/animation/default_fps_mode** :ref:`πŸ”—` + +Default step mode for :ref:`AnimationPlayer` (seconds or FPS). The option is remembered locally for a scene and this option only determines the default value when scene doesn't have local state yet. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/animation/onion_layers_future_color: .. rst-class:: classref-property @@ -2275,18 +2445,6 @@ The modulate color to use for "past" frames displayed in the animation editor's ---- -.. _class_EditorSettings_property_editors/grid_map/editor_side: - -.. rst-class:: classref-property - -:ref:`int` **editors/grid_map/editor_side** :ref:`πŸ”—` - -Specifies the side of 3D editor's viewport where GridMap's mesh palette will appear. - -.. rst-class:: classref-item-separator - ----- - .. _class_EditorSettings_property_editors/grid_map/palette_min_width: .. rst-class:: classref-property @@ -2969,10 +3127,37 @@ Port used for file server when exporting project with remote file system. :ref:`String` **filesystem/import/blender/blender_path** :ref:`πŸ”—` -The path to the directory containing the Blender executable used for converting the Blender 3D scene files ``.blend`` to glTF 2.0 format during import. Blender 3.0 or later is required. +The path to the Blender executable used for converting the Blender 3D scene files ``.blend`` to glTF 2.0 format during import. Blender 3.0 or later is required. To enable this feature for your specific project, use :ref:`ProjectSettings.filesystem/import/blender/enabled`. +If this setting is empty, Blender's default paths will be detected and used automatically if present in this order: + +\ **Windows:**\ + +:: + + - C:\Program Files\Blender Foundation\blender.exe + - C:\Program Files (x86)\Blender Foundation\blender.exe + +\ **macOS:**\ + +:: + + - /opt/homebrew/bin/blender + - /opt/local/bin/blender + - /usr/local/bin/blender + - /usr/local/opt/blender + - /Applications/Blender.app/Contents/MacOS/Blender + +\ **Linux/\*BSD:**\ + +:: + + - /usr/bin/blender + - /usr/local/bin/blender + - /opt/blender/bin/blender + .. rst-class:: classref-item-separator ---- @@ -3171,7 +3356,7 @@ Input accumulation can be disabled to get slightly more precise/reactive input a How to position the Cancel and OK buttons in the editor's :ref:`AcceptDialog`\ s. Different platforms have different standard behaviors for this, which can be overridden using this setting. This is useful if you use Redot both on Windows and macOS/Linux and your Redot muscle memory is stronger than your OS specific one. -- **Auto** follows the platform convention: Cancel first on macOS and Linux, OK first on Windows. +- **Auto** follows the platform convention: OK first on Windows, KDE, and LXQt, Cancel first on macOS and other Linux desktop environments. - **Cancel First** forces the ordering Cancel/OK. @@ -3321,7 +3506,7 @@ Translations are provided by the community. If you spot a mistake, :doc:`contrib :ref:`int` **interface/editor/editor_screen** :ref:`πŸ”—` -The preferred monitor to display the editor. If **Auto**, the editor will remember the last screen it was displayed on across restarts. +The preferred monitor to display the editor. If **Auto**, the editor will remember the last screen it was displayed on across multiple sessions. .. rst-class:: classref-item-separator @@ -3551,7 +3736,7 @@ If ``true``, scenes and scripts are saved when the editor loses focus. Depending :ref:`bool` **interface/editor/separate_distraction_mode** :ref:`πŸ”—` -If ``true``, the editor's Script tab will have a separate distraction mode setting from the 2D/3D/AssetLib tabs. If ``false``, the distraction-free mode toggle is shared between all tabs. +If ``true``, the editor's Script tab will have a separate distraction mode setting from the 2D/3D/Game/AssetLib tabs. If ``false``, the distraction-free mode toggle is shared between all tabs. .. rst-class:: classref-item-separator @@ -3601,7 +3786,21 @@ If ``true``, embed modal windows such as docks inside the main editor window. Wh This is equivalent to :ref:`ProjectSettings.display/window/subwindows/embed_subwindows` in the running project, except the setting's value is inverted. -\ **Note:** To query whether the editor can use multiple windows in an editor plugin, use :ref:`EditorInterface.is_multi_window_enabled` instead of querying the value of this editor setting. +\ **Note:** To query whether the editor can use multiple windows in an editor plugin, use :ref:`EditorInterface.is_multi_window_enabled()` instead of querying the value of this editor setting. + +\ **Note:** If ``true``, game embedding is disabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_interface/editor/tablet_driver: + +.. rst-class:: classref-property + +:ref:`int` **interface/editor/tablet_driver** :ref:`πŸ”—` + +Overrides the tablet driver used by the editor. .. rst-class:: classref-item-separator @@ -3917,11 +4116,11 @@ If ``true``, display OpenType features marked as ``hidden`` by the font file in :ref:`bool` **interface/multi_window/enable** :ref:`πŸ”—` -If ``true``, multiple window support in editor is enabled. The following panels can become dedicated windows (i.e. made floating): Docks, Script editor, and Shader editor. +If ``true``, multiple window support in editor is enabled. The following panels can become dedicated windows (i.e. made floating): Docks, Script editor, Shader editor, and Game Workspace. \ **Note:** When :ref:`interface/editor/single_window_mode` is ``true``, the multi window support is always disabled. -\ **Note:** To query whether the editor can use multiple windows in an editor plugin, use :ref:`EditorInterface.is_multi_window_enabled` instead of querying the value of this editor setting. +\ **Note:** To query whether the editor can use multiple windows in an editor plugin, use :ref:`EditorInterface.is_multi_window_enabled()` instead of querying the value of this editor setting. .. rst-class:: classref-item-separator @@ -4275,11 +4474,25 @@ Specify the multiplier to apply to the scale for the editor gizmo handles to imp ---- -.. _class_EditorSettings_property_network/connection/engine_version_update_mode: +.. _class_EditorSettings_property_interface/touchscreen/touch_actions_panel: + +.. rst-class:: classref-property + +:ref:`int` **interface/touchscreen/touch_actions_panel** :ref:`πŸ”—` + +A touch-friendly panel that provides easy access to common actions such as save, delete, undo, and redo without requiring a keyboard. + +\ **Note:** Only available in the Android and XR editor. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorSettings_property_network/connection/check_for_updates: .. rst-class:: classref-property -:ref:`int` **network/connection/engine_version_update_mode** :ref:`πŸ”—` +:ref:`int` **network/connection/check_for_updates** :ref:`πŸ”—` Specifies how the engine should check for updates. @@ -4373,6 +4586,20 @@ The TLS certificate bundle to use for HTTP requests made within the editor (e.g. ---- +.. _class_EditorSettings_property_network/tls/enable_tls_v1.3: + +.. rst-class:: classref-property + +:ref:`bool` **network/tls/enable_tls_v1.3** :ref:`πŸ”—` + +If ``true``, enable TLSv1.3 negotiation. + +\ **Note:** Only supported when using Mbed TLS 3.0 or later (Linux distribution packages may be compiled against older system Mbed TLS packages), otherwise the maximum supported TLS version is always TLSv1.2. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_project_manager/default_renderer: .. rst-class:: classref-property @@ -4511,29 +4738,19 @@ Specifies how the Play window is launched relative to the Android editor. - **Side-by-side with Editor** will launch the Play window side-by-side with the Editor window. -- **Launch in PiP mode** will launch the Play window directly in picture-in-picture (PiP) mode if PiP mode is supported and enabled. When maximized, the Play window will occupy the same window as the Editor. - \ **Note:** Only available in the Android editor. .. rst-class:: classref-item-separator ---- -.. _class_EditorSettings_property_run/window_placement/play_window_pip_mode: +.. _class_EditorSettings_property_run/window_placement/game_embed_mode: .. rst-class:: classref-property -:ref:`int` **run/window_placement/play_window_pip_mode** :ref:`πŸ”—` - -Specifies the picture-in-picture (PiP) mode for the Play window. - -- **Disabled:** PiP is disabled for the Play window. - -- **Enabled:** If the device supports it, PiP is always enabled for the Play window. The Play window will contain a button to enter PiP mode. +:ref:`int` **run/window_placement/game_embed_mode** :ref:`πŸ”—` -- **Enabled when Play window is same as Editor** (default for Android editor): If the device supports it, PiP is enabled when the Play window is the same as the Editor. The Play window will contain a button to enter PiP mode. - -\ **Note:** Only available in the Android editor. +Overrides game embedding setting for all newly opened projects. If enabled, game embedding settings are not saved. .. rst-class:: classref-item-separator @@ -4547,6 +4764,8 @@ Specifies the picture-in-picture (PiP) mode for the Play window. The window mode to use to display the project when starting the project from the editor. +\ **Note:** Game embedding is not available for **"Force Maximized"** or **"Force Fullscreen"**. + .. rst-class:: classref-item-separator ---- @@ -4815,6 +5034,18 @@ The space to add between lines (in pixels). Greater line spacing can help improv ---- +.. _class_EditorSettings_property_text_editor/behavior/documentation/enable_tooltips: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/behavior/documentation/enable_tooltips** :ref:`πŸ”—` + +If ``true``, documentation tooltips will appear when hovering over a symbol. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/files/auto_reload_and_parse_scripts_on_save: .. rst-class:: classref-property @@ -4863,6 +5094,20 @@ If ``true``, converts indentation to match the script editor's indentation setti ---- +.. _class_EditorSettings_property_text_editor/behavior/files/drop_preload_resources_as_uid: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/behavior/files/drop_preload_resources_as_uid** :ref:`πŸ”—` + +If ``true``, when dropping a :ref:`Resource` file to script editor while :kbd:`Ctrl` is held, the resource will be preloaded with a UID. If ``false``, the resource will be preloaded with a path. + +When you hold :kbd:`Ctrl+Shift`, the behavior is reversed. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/behavior/files/open_dominant_script_on_scene_change: .. rst-class:: classref-property @@ -5917,6 +6162,18 @@ The script editor's color for user-defined types (using ``class_name``). ---- +.. _class_EditorSettings_property_text_editor/theme/highlighting/warning_color: + +.. rst-class:: classref-property + +:ref:`Color` **text_editor/theme/highlighting/warning_color** :ref:`πŸ”—` + +The script editor's background color for lines with warnings. This should be set to a translucent color so that it can display on top of other line color modifiers such as :ref:`text_editor/theme/highlighting/current_line_color`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/theme/highlighting/word_highlighted_color: .. rst-class:: classref-property @@ -6040,7 +6297,7 @@ Adds a custom property info to a property. The dictionary must contain: :ref:`bool` **check_changed_settings_in_group**\ (\ setting_prefix\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Checks if any settings with the prefix ``setting_prefix`` exist in the set of changed settings. See also :ref:`get_changed_settings`. +Checks if any settings with the prefix ``setting_prefix`` exist in the set of changed settings. See also :ref:`get_changed_settings()`. .. rst-class:: classref-item-separator @@ -6088,7 +6345,7 @@ Returns the list of favorite files and directories for this project. :ref:`Variant` **get_project_metadata**\ (\ section\: :ref:`String`, key\: :ref:`String`, default\: :ref:`Variant` = null\ ) |const| :ref:`πŸ”—` -Returns project-specific metadata for the ``section`` and ``key`` specified. If the metadata doesn't exist, ``default`` will be returned instead. See also :ref:`set_project_metadata`. +Returns project-specific metadata for the ``section`` and ``key`` specified. If the metadata doesn't exist, ``default`` will be returned instead. See also :ref:`set_project_metadata()`. .. rst-class:: classref-item-separator @@ -6112,7 +6369,7 @@ Returns the list of recently visited folders in the file dialog for this project :ref:`Variant` **get_setting**\ (\ name\: :ref:`String`\ ) |const| :ref:`πŸ”—` -Returns the value of the setting specified by ``name``. This is equivalent to using :ref:`Object.get` on the EditorSettings instance. +Returns the value of the setting specified by ``name``. This is equivalent to using :ref:`Object.get()` on the EditorSettings instance. .. rst-class:: classref-item-separator @@ -6136,7 +6393,7 @@ Returns ``true`` if the setting specified by ``name`` exists, ``false`` otherwis |void| **mark_setting_changed**\ (\ setting\: :ref:`String`\ ) :ref:`πŸ”—` -Marks the passed editor setting as being changed, see :ref:`get_changed_settings`. Only settings which exist (see :ref:`has_setting`) will be accepted. +Marks the passed editor setting as being changed, see :ref:`get_changed_settings()`. Only settings which exist (see :ref:`has_setting()`) will be accepted. .. rst-class:: classref-item-separator @@ -6184,7 +6441,7 @@ Sets the initial value of the setting specified by ``name`` to ``value``. This i |void| **set_project_metadata**\ (\ section\: :ref:`String`, key\: :ref:`String`, data\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets project-specific metadata with the ``section``, ``key`` and ``data`` specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also :ref:`get_project_metadata`. +Sets project-specific metadata with the ``section``, ``key`` and ``data`` specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also :ref:`get_project_metadata()`. .. rst-class:: classref-item-separator @@ -6208,7 +6465,7 @@ Sets the list of recently visited folders in the file dialog for this project. |void| **set_setting**\ (\ name\: :ref:`String`, value\: :ref:`Variant`\ ) :ref:`πŸ”—` -Sets the ``value`` of the setting specified by ``name``. This is equivalent to using :ref:`Object.set` on the EditorSettings instance. +Sets the ``value`` of the setting specified by ``name``. This is equivalent to using :ref:`Object.set()` on the EditorSettings instance. .. |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_editorspinslider.rst b/classes/class_editorspinslider.rst index 90da8882eac..28164041c37 100644 --- a/classes/class_editorspinslider.rst +++ b/classes/class_editorspinslider.rst @@ -31,23 +31,25 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`flat` | ``false`` | - +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ - | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | - +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`hide_slider` | ``false`` | - +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`label` | ``""`` | - +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`read_only` | ``false`` | - +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ - | |bitfield|\[:ref:`SizeFlags`\] | size_flags_vertical | ``1`` (overrides :ref:`Control`) | - +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ - | :ref:`float` | step | ``1.0`` (overrides :ref:`Range`) | - +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`suffix` | ``""`` | - +--------------------------------------------------------+-----------------------------------------------------------------+------------------------------------------------------------------------------+ + +--------------------------------------------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`editing_integer` | ``false`` | + +--------------------------------------------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`flat` | ``false`` | + +--------------------------------------------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`FocusMode` | focus_mode | ``2`` (overrides :ref:`Control`) | + +--------------------------------------------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`hide_slider` | ``false`` | + +--------------------------------------------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`label` | ``""`` | + +--------------------------------------------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`read_only` | ``false`` | + +--------------------------------------------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`SizeFlags`\] | size_flags_vertical | ``1`` (overrides :ref:`Control`) | + +--------------------------------------------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`float` | step | ``1.0`` (overrides :ref:`Range`) | + +--------------------------------------------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`suffix` | ``""`` | + +--------------------------------------------------------+-------------------------------------------------------------------------+------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -137,6 +139,23 @@ Emitted when the value form loses focus. Property Descriptions --------------------- +.. _class_EditorSpinSlider_property_editing_integer: + +.. rst-class:: classref-property + +:ref:`bool` **editing_integer** = ``false`` :ref:`πŸ”—` + +.. rst-class:: classref-property-setget + +- |void| **set_editing_integer**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_editing_integer**\ (\ ) + +If ``true``, the **EditorSpinSlider** is considered to be editing an integer value. If ``false``, the **EditorSpinSlider** is considered to be editing a floating-point value. This is used to determine whether a slider should be drawn. The slider is only drawn for floats; integers use up-down arrows similar to :ref:`SpinBox` instead. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSpinSlider_property_flat: .. rst-class:: classref-property diff --git a/classes/class_editorsyntaxhighlighter.rst b/classes/class_editorsyntaxhighlighter.rst index 4603771ce95..e8e94489e85 100644 --- a/classes/class_editorsyntaxhighlighter.rst +++ b/classes/class_editorsyntaxhighlighter.rst @@ -23,7 +23,7 @@ Description Base class that all :ref:`SyntaxHighlighter`\ s used by the :ref:`ScriptEditor` extend from. -Add a syntax highlighter to an individual script by calling :ref:`ScriptEditorBase.add_syntax_highlighter`. To apply to all scripts on open, call :ref:`ScriptEditor.register_syntax_highlighter`. +Add a syntax highlighter to an individual script by calling :ref:`ScriptEditorBase.add_syntax_highlighter()`. To apply to all scripts on open, call :ref:`ScriptEditor.register_syntax_highlighter()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_editortoaster.rst b/classes/class_editortoaster.rst index f6df8b0b398..50ef8b2bf0c 100644 --- a/classes/class_editortoaster.rst +++ b/classes/class_editortoaster.rst @@ -21,7 +21,7 @@ Description This object manages the functionality and display of toast notifications within the editor, ensuring timely and informative alerts are presented to users. -\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_toaster`. +\ **Note:** This class shouldn't be instantiated directly. Instead, access the singleton using :ref:`EditorInterface.get_editor_toaster()`. .. rst-class:: classref-reftable-group diff --git a/classes/class_editortranslationparserplugin.rst b/classes/class_editortranslationparserplugin.rst index 0a6e48b6ff4..e4d750b73b0 100644 --- a/classes/class_editortranslationparserplugin.rst +++ b/classes/class_editortranslationparserplugin.rst @@ -19,11 +19,9 @@ Plugin for adding custom parsers to extract strings that are to be translated fr Description ----------- -**EditorTranslationParserPlugin** is invoked when a file is being parsed to extract strings that require translation. To define the parsing and string extraction logic, override the :ref:`_parse_file` method in script. +**EditorTranslationParserPlugin** is invoked when a file is being parsed to extract strings that require translation. To define the parsing and string extraction logic, override the :ref:`_parse_file()` method in script. -Add the extracted strings to argument ``msgids`` or ``msgids_context_plural`` if context or plural is used. - -When adding to ``msgids_context_plural``, you must add the data using the format ``["A", "B", "C"]``, where ``A`` represents the extracted string, ``B`` represents the context, and ``C`` represents the plural version of the extracted string. If you want to add only context but not plural, put ``""`` for the plural slot. The idea is the same if you only want to add plural but not context. See the code below for concrete examples. +The return value should be an :ref:`Array` of :ref:`PackedStringArray`\ s, one for each extracted translatable string. Each entry should contain ``[msgid, msgctxt, msgid_plural, comment]``, where all except ``msgid`` are optional. Empty strings will be ignored. The extracted strings will be written into a POT file selected by user under "POT Generation" in "Localization" tab in "Project Settings" menu. @@ -37,14 +35,17 @@ Below shows an example of a custom parser that extracts strings from a CSV file @tool extends EditorTranslationParserPlugin - func _parse_file(path, msgids, msgids_context_plural): + func _parse_file(path): + var ret: Array[PackedStringArray] = [] var file = FileAccess.open(path, FileAccess.READ) var text = file.get_as_text() var split_strs = text.split(",", false) for s in split_strs: - msgids.append(s) + ret.append(PackedStringArray([s])) #print("Extracted string: " + s) + return ret + func _get_recognized_extensions(): return ["csv"] @@ -55,59 +56,61 @@ Below shows an example of a custom parser that extracts strings from a CSV file [Tool] public partial class CustomParser : EditorTranslationParserPlugin { - public override void _ParseFile(string path, Godot.Collections.Array msgids, Godot.Collections.Array msgidsContextPlural) + public override Godot.Collections.Array _ParseFile(string path) { + Godot.Collections.Array ret; using var file = FileAccess.Open(path, FileAccess.ModeFlags.Read); string text = file.GetAsText(); string[] splitStrs = text.Split(",", allowEmpty: false); foreach (string s in splitStrs) { - msgids.Add(s); + ret.Add([s]); //GD.Print($"Extracted string: {s}"); } + return ret; } public override string[] _GetRecognizedExtensions() { - return new string[] { "csv" }; + return ["csv"]; } } -To add a translatable string associated with context or plural, add it to ``msgids_context_plural``: +To add a translatable string associated with a context, plural, or comment: .. tabs:: .. code-tab:: gdscript - # This will add a message with msgid "Test 1", msgctxt "context", and msgid_plural "test 1 plurals". - msgids_context_plural.append(["Test 1", "context", "test 1 plurals"]) + # This will add a message with msgid "Test 1", msgctxt "context", msgid_plural "test 1 plurals", and comment "test 1 comment". + ret.append(PackedStringArray(["Test 1", "context", "test 1 plurals", "test 1 comment"])) # This will add a message with msgid "A test without context" and msgid_plural "plurals". - msgids_context_plural.append(["A test without context", "", "plurals"]) + ret.append(PackedStringArray(["A test without context", "", "plurals"])) # This will add a message with msgid "Only with context" and msgctxt "a friendly context". - msgids_context_plural.append(["Only with context", "a friendly context", ""]) + ret.append(PackedStringArray(["Only with context", "a friendly context"])) .. code-tab:: csharp - // This will add a message with msgid "Test 1", msgctxt "context", and msgid_plural "test 1 plurals". - msgidsContextPlural.Add(new Godot.Collections.Array{"Test 1", "context", "test 1 Plurals"}); + // This will add a message with msgid "Test 1", msgctxt "context", msgid_plural "test 1 plurals", and comment "test 1 comment". + ret.Add(["Test 1", "context", "test 1 plurals", "test 1 comment"]); // This will add a message with msgid "A test without context" and msgid_plural "plurals". - msgidsContextPlural.Add(new Godot.Collections.Array{"A test without context", "", "plurals"}); + ret.Add(["A test without context", "", "plurals"]); // This will add a message with msgid "Only with context" and msgctxt "a friendly context". - msgidsContextPlural.Add(new Godot.Collections.Array{"Only with context", "a friendly context", ""}); + ret.Add(["Only with context", "a friendly context"]); -\ **Note:** If you override parsing logic for standard script types (GDScript, C#, etc.), it would be better to load the ``path`` argument using :ref:`ResourceLoader.load`. This is because built-in scripts are loaded as :ref:`Resource` type, not :ref:`FileAccess` type. For example: +\ **Note:** If you override parsing logic for standard script types (GDScript, C#, etc.), it would be better to load the ``path`` argument using :ref:`ResourceLoader.load()`. This is because built-in scripts are loaded as :ref:`Resource` type, not :ref:`FileAccess` type. For example: .. tabs:: .. code-tab:: gdscript - func _parse_file(path, msgids, msgids_context_plural): + func _parse_file(path): var res = ResourceLoader.load(path, "Script") var text = res.source_code # Parsing logic. @@ -117,7 +120,7 @@ To add a translatable string associated with context or plural, add it to ``msgi .. code-tab:: csharp - public override void _ParseFile(string path, Godot.Collections.Array msgids, Godot.Collections.Array msgidsContextPlural) + public override Godot.Collections.Array _ParseFile(string path) { var res = ResourceLoader.Load