diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index bf1f9bfb704..b956b05e280 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -41,7 +41,7 @@ Methods +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`assert`\ (\ condition\: :ref:`bool`, message\: :ref:`String` = ""\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`char`\ (\ char\: :ref:`int`\ ) | + | :ref:`String` | :ref:`char`\ (\ code\: :ref:`int`\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`convert`\ (\ what\: :ref:`Variant`, type\: :ref:`Variant.Type`\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -57,6 +57,8 @@ Methods +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Resource` | :ref:`load`\ (\ path\: :ref:`String`\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`ord`\ (\ char\: :ref:`String`\ ) | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Resource` | :ref:`preload`\ (\ path\: :ref:`String`\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`print_debug`\ (\ ...\ ) |vararg| | @@ -109,7 +111,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. @@ -120,6 +124,37 @@ Positive floating-point infinity. This is the result of floating-point division Annotations ----------- +.. _class_@GDScript_annotation_@abstract: + +.. rst-class:: classref-annotation + +**@abstract**\ (\ ) :ref:`🔗` + +Marks a class or a method as abstract. + +An abstract class is a class that cannot be instantiated directly. Instead, it is meant to be inherited by other classes. Attempting to instantiate an abstract class will result in an error. + +An abstract method is a method that has no implementation. Therefore, a newline or a semicolon is expected after the function header. This defines a contract that inheriting classes must conform to, because the method signature must be compatible when overriding. + +Inheriting classes must either provide implementations for all abstract methods, or the inheriting class must be marked as abstract. If a class has at least one abstract method (either its own or an unimplemented inherited one), then it must also be marked as abstract. However, the reverse is not true: an abstract class is allowed to have no abstract methods. + +:: + + @abstract class Shape: + @abstract func draw() + + class Circle extends Shape: + func draw(): + print("Drawing a circle.") + + class Square extends Shape: + func draw(): + print("Drawing a square.") + +.. rst-class:: classref-item-separator + +---- + .. _class_@GDScript_annotation_@export: .. rst-class:: classref-annotation @@ -131,27 +166,27 @@ Mark the following property as exported (editable in the Inspector dock and save :: extends Node - + enum Direction {LEFT, RIGHT, UP, DOWN} - + # Built-in types. @export var string = "" @export var int_number = 5 @export var float_number: float = 5 - + # Enums. @export var type: Variant.Type @export var format: Image.Format @export var direction: Direction - + # Resources. @export var image: Image @export var custom_resource: CustomResource - + # Nodes. @export var node: Node @export var custom_node: CustomNode - + # Typed arrays. @export var int_array: Array[int] @export var direction_array: Array[Direction] @@ -259,7 +294,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_ENUM` methods to convert it to path. + +.. rst-class:: classref-item-separator + +---- + +.. _class_@GDScript_annotation_@export_file_path: + +.. rst-class:: classref-annotation + +**@export_file_path**\ (\ filter\: :ref:`String` = "", ...\ ) |vararg| :ref:`🔗` + +Same as :ref:`@export_file`, except the file will be stored as a raw path. This means that it may become invalid when the file is moved. If you are exporting a :ref:`Resource` path, consider using :ref:`@export_file` instead. + .. rst-class:: classref-item-separator ---- @@ -564,11 +613,11 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_GROUP` -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. :: @@ -700,7 +749,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. @@ -742,14 +791,14 @@ 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 +848,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 +866,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`. @@ -831,13 +880,15 @@ The order of ``mode``, ``sync`` and ``transfer_mode`` does not matter, but value @rpc func fn(): pass - + @rpc("any_peer", "unreliable_ordered") func fn_update_pos(): pass - + @rpc("authority", "call_remote", "unreliable", 0) # Equivalent to @rpc func fn_default(): pass +\ **Note:** Methods annotated with :ref:`@rpc` cannot receive objects which define required parameters in :ref:`Object._init()`. See :ref:`Object._init()` for more details. + .. rst-class:: classref-item-separator ---- @@ -950,7 +1001,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 +1011,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 +1023,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 +1038,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 @@ -995,15 +1048,16 @@ An optional ``message`` can be shown in addition to the generic "Assertion faile .. rst-class:: classref-method -:ref:`String` **char**\ (\ char\: :ref:`int`\ ) :ref:`🔗` +:ref:`String` **char**\ (\ code\: :ref:`int`\ ) :ref:`🔗` -Returns a single character (as a :ref:`String`) of the given Unicode code point (which is compatible with ASCII code). +Returns a single character (as a :ref:`String` of length 1) of the given Unicode code point ``code``. :: - var upper = char(65) # upper is "A" - var lower = char(65 + 32) # lower is "a" - var euro = char(8364) # euro is "€" + print(char(65)) # Prints "A" + print(char(129302)) # Prints "🤖" (robot face emoji) + +This is the inverse of :ref:`ord()`. See also :ref:`String.chr()` and :ref:`String.unicode_at()`. .. rst-class:: classref-item-separator @@ -1015,7 +1069,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. @@ -1023,7 +1077,7 @@ Converts ``what`` to ``type`` in the best way possible. The ``type`` uses the :r var a = [4, 2.5, 1.2] print(a is Array) # Prints true - + var b = convert(a, TYPE_PACKED_BYTE_ARRAY) print(b) # Prints [4, 2, 1] print(b is Array) # Prints false @@ -1038,7 +1092,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,16 +1106,16 @@ 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. :: func _ready(): foo() - + func foo(): bar() - + func bar(): print(get_stack()) @@ -1069,9 +1125,9 @@ 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. +See also :ref:`print_debug()`, :ref:`print_stack()`, and :ref:`Engine.capture_script_backtraces()`. -\ **Note:** Calling this function from a :ref:`Thread` is not supported. Doing so will return an empty array. +\ **Note:** By default, backtraces are only available in editor builds and debug builds. To enable them for release builds as well, you need to enable :ref:`ProjectSettings.debug/settings/gdscript/always_track_call_stacks`. .. rst-class:: classref-item-separator @@ -1083,9 +1139,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 +1158,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 +1180,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 +1191,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 @@ -1151,7 +1211,7 @@ Returns the length of the given Variant ``var``. The length can be the character var a = [1, 2, 3, 4] len(a) # Returns 4 - + var b = "Hello!" len(b) # Returns 6 @@ -1165,7 +1225,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 +1236,30 @@ 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 + +---- + +.. _class_@GDScript_method_ord: + +.. rst-class:: classref-method + +:ref:`int` **ord**\ (\ char\: :ref:`String`\ ) :ref:`🔗` + +Returns an integer representing the Unicode code point of the given character ``char``, which should be a string of length 1. + +:: + + print(ord("A")) # Prints 65 + print(ord("🤖")) # Prints 129302 + +This is the inverse of :ref:`char()`. See also :ref:`String.chr()` and :ref:`String.unicode_at()`. .. rst-class:: classref-item-separator @@ -1192,7 +1271,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 +1280,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 +1292,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: @@ -1222,7 +1301,9 @@ The output in the console may look like the following: Test print At: res://test.gd:15:_process() -\ **Note:** Calling this function from a :ref:`Thread` is not supported. Doing so will instead print the thread ID. +See also :ref:`print_stack()`, :ref:`get_stack()`, and :ref:`Engine.capture_script_backtraces()`. + +\ **Note:** By default, backtraces are only available in editor builds and debug builds. To enable them for release builds as well, you need to enable :ref:`ProjectSettings.debug/settings/gdscript/always_track_call_stacks`. .. rst-class:: classref-item-separator @@ -1234,7 +1315,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. The output in the console may look like the following: @@ -1242,9 +1323,9 @@ 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. +See also :ref:`print_debug()`, :ref:`get_stack()`, and :ref:`Engine.capture_script_backtraces()`. -\ **Note:** Calling this function from a :ref:`Thread` is not supported. Doing so will instead print the thread ID. +\ **Note:** By default, backtraces are only available in editor builds and debug builds. To enable them for release builds as well, you need to enable :ref:`ProjectSettings.debug/settings/gdscript/always_track_call_stacks`. .. rst-class:: classref-item-separator @@ -1256,7 +1337,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 +1345,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)``). @@ -1326,6 +1407,7 @@ Returns ``true`` if the given :ref:`Object`-derived class exists i type_exists("NonExistentClass") # Returns false .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index ab1ee76ea6b..06c38b547f9 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: @@ -3052,7 +3060,7 @@ Since :ref:`OK` has value ``0``, and all other e var error = method_that_returns_error() if error != OK: printerr("Failure!") - + # Or, alternatively: if error: printerr("Still failing!") @@ -3587,7 +3595,7 @@ Hints that an integer property is a bitmask using the optionally named avoidance :ref:`PropertyHint` **PROPERTY_HINT_FILE** = ``13`` -Hints that a :ref:`String` property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like ``"*.png,*.jpg"``. +Hints that a :ref:`String` property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like ``"*.png,*.jpg"``. By default the file will be stored as UID whenever available. You can use :ref:`ResourceUID` methods to convert it back to path. For storing a raw path, use :ref:`PROPERTY_HINT_FILE_PATH`. .. _class_@GlobalScope_constant_PROPERTY_HINT_DIR: @@ -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:: @@ -3713,7 +3723,7 @@ If a property is :ref:`Array`, hints the editor how to show element hint_string = "%d/%d:Zero,One,Three:3,Six:6" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum). hint_string = "%d/%d:*.png" % [TYPE_STRING, PROPERTY_HINT_FILE] # Array of strings (file paths). hint_string = "%d/%d:Texture2D" % [TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Array of textures. - + hint_string = "%d:%d:" % [TYPE_ARRAY, TYPE_FLOAT] # Two-dimensional array of floats. hint_string = "%d:%d/%d:" % [TYPE_ARRAY, TYPE_STRING, PROPERTY_HINT_MULTILINE_TEXT] # Two-dimensional array of multiline strings. hint_string = "%d:%d/%d:-1,1,0.1" % [TYPE_ARRAY, TYPE_FLOAT, PROPERTY_HINT_RANGE] # Two-dimensional array of floats (in range from -1 to 1). @@ -3726,7 +3736,7 @@ If a property is :ref:`Array`, hints the editor how to show element hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6"; // Array of integers (an enum). hintString = $"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png"; // Array of strings (file paths). hintString = $"{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Array of textures. - + hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}:"; // Two-dimensional array of floats. hintString = $"{Variant.Type.Array:D}:{Variant.Type.String:D}/{PropertyHint.MultilineText:D}:"; // Two-dimensional array of multiline strings. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}/{PropertyHint.Range:D}:-1,1,0.1"; // Two-dimensional array of floats (in range from -1 to 1). @@ -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,41 @@ 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. The property will be displayed as a checkbox on the group header. Only works within a group or subgroup. + +By default, disabling the property hides all properties in the group. Use the optional hint string ``"checkbox_only"`` to disable this behavior. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_INPUT_NAME: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_INPUT_NAME** = ``43`` + +Hints that a :ref:`String` or :ref:`StringName` property is the name of an input action. This allows the selection of any action name from the Input Map in the Project Settings. The hint string may contain two options separated by commas: + +- If it contains ``"show_builtin"``, built-in input actions are included in the selection. + +- If it contains ``"loose_mode"``, loose mode is enabled. This allows inserting any action name even if it's not present in the input map. + +.. _class_@GlobalScope_constant_PROPERTY_HINT_FILE_PATH: + +.. rst-class:: classref-enumeration-constant + +:ref:`PropertyHint` **PROPERTY_HINT_FILE_PATH** = ``44`` + +Like :ref:`PROPERTY_HINT_FILE`, but the property is stored as a raw path, not UID. That means the reference will be broken if you move the file. Consider using :ref:`PROPERTY_HINT_FILE` when possible. + .. _class_@GlobalScope_constant_PROPERTY_HINT_MAX: .. rst-class:: classref-enumeration-constant -:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``42`` +:ref:`PropertyHint` **PROPERTY_HINT_MAX** = ``45`` Represents the size of the :ref:`PropertyHint` enum. @@ -3995,7 +4039,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 +4097,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 +4105,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 +4261,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. In GDScript, this flag is set for abstract functions. .. _class_@GlobalScope_constant_METHOD_FLAGS_DEFAULT: @@ -5253,23 +5305,23 @@ Returns the absolute value of a :ref:`Variant` parameter ``x`` (i var a = abs(-1) # a is 1 - + var b = abs(-1.2) # b is 1.2 - + var c = abs(Vector2(-3.5, -4)) # c is (3.5, 4) - + var d = abs(Vector2i(-5, -6)) # d is (5, 6) - + var e = abs(Vector3(-7, 8.5, -3.8)) # e is (7, 8.5, 3.8) - + 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 +5367,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,13 +5384,13 @@ 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`. :: var a = acosh(2) # Returns 1.31695789692482 cosh(a) # Returns 2 - + var b = acosh(-1) # Returns 0 .. rst-class:: classref-item-separator @@ -5363,7 +5415,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 +5451,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,13 +5489,13 @@ 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`. :: var a = atanh(0.9) # Returns 1.47221948958322 tanh(a) # Returns 0.9 - + var b = atanh(-2) # Returns -inf tanh(b) # Returns -1 @@ -5483,7 +5535,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 +5568,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 +5584,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 +5598,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 @@ -5564,11 +5616,11 @@ Clamps the ``value``, returning a :ref:`Variant` not less than `` var a = clamp(-10, -1, 5) # a is -1 - + 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. @@ -5588,7 +5640,7 @@ Clamps the ``value``, returning a :ref:`float` not less than ``min` var speed = 42.1 var a = clampf(speed, 1.0, 20.5) # a is 20.5 - + speed = -10.0 var b = clampf(speed, -1.0, 1.0) # b is -1.0 @@ -5608,7 +5660,7 @@ Clamps the ``value``, returning an :ref:`int` not less than ``min`` a var speed = 42 var a = clampi(speed, 1, 20) # a is 20 - + speed = -10 var b = clampi(speed, -1, 1) # b is -1 @@ -5668,7 +5720,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 +5732,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 +5748,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 +5802,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 +5819,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 +5837,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 +5860,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 +5876,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 +5890,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 +5979,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,19 +6019,19 @@ 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. :: # The interpolation ratio in the `lerp()` call below is 0.75. var middle = lerp(20, 30, 0.75) # middle is now 27.5. - + # Now, we pretend to have forgotten the original ratio and want to get it back. 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 +6059,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 +6071,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 +6107,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 @@ -6078,7 +6130,7 @@ Returns ``true``, for value types, if ``a`` and ``b`` share the same value. Retu is_same(vec2_a, vec2_a) # true is_same(vec2_a, vec2_b) # true is_same(vec2_a, vec2_c) # false - + # Array is a reference type var arr_a = [] var arr_b = [] @@ -6101,7 +6153,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 +6165,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 +6173,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 +6189,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 +6213,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 +6275,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 +6327,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 @@ -6349,7 +6401,7 @@ Returns the smallest integer power of 2 that is greater than or equal to ``value nearest_po2(3) # Returns 4 nearest_po2(4) # Returns 4 nearest_po2(5) # Returns 8 - + nearest_po2(0) # Returns 0 (this may not be expected) nearest_po2(-1) # Returns 0 (this may not be expected) @@ -6448,16 +6500,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 +6534,17 @@ 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 +6556,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 +6593,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 +6602,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 +6633,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 +6658,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 +6683,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 +6710,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. @@ -6703,7 +6753,7 @@ Given a ``seed``, returns a :ref:`PackedInt64Array` of s :: var a = rand_from_seed(4) - + print(a[0]) # Prints 2879024997 print(a[1]) # Prints 4 @@ -6843,7 +6893,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 +6905,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 +6951,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 +6973,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 +6989,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 +7003,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 +7040,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 ---- @@ -7010,10 +7172,10 @@ Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2 sign(0.0) # Returns 0 sign(6.0) # Returns 1 sign(NAN) # Returns 0 - + 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 +7273,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 `__\ @@ -7135,12 +7297,12 @@ The returned value is the same type of :ref:`Variant` as ``step`` snapped(100, 32) # Returns 96 snapped(3.14159, 0.01) # Returns 3.14 - + 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 +7316,7 @@ See also :ref:`ceil`, :ref:`floor`, returning a :ref:`float`. +A type-safe version of :ref:`snapped()`, returning a :ref:`float`. :: @@ -7173,7 +7335,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 +7360,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 +7409,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 +7499,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 +7522,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 +7539,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 +7555,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 +7569,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:: @@ -7459,18 +7621,18 @@ A weak reference to an object is not enough to keep the object alive: when the o :ref:`Variant` **wrap**\ (\ value\: :ref:`Variant`, min\: :ref:`Variant`, max\: :ref:`Variant`\ ) :ref:`🔗` -Wraps the :ref:`Variant` ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. +Wraps the :ref:`Variant` ``value`` between ``min`` and ``max``. ``min`` is *inclusive* while ``max`` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces. -Variant types :ref:`int` and :ref:`float` are supported. If any of the arguments is :ref:`float` this function returns a :ref:`float`, otherwise it returns an :ref:`int`. +Variant types :ref:`int` and :ref:`float` are supported. If any of the arguments is :ref:`float`, this function returns a :ref:`float`, otherwise it returns an :ref:`int`. :: var a = wrap(4, 5, 10) # a is 9 (int) - + var a = wrap(7, 5, 10) # a is 7 (int) - + var a = wrap(10.5, 5, 10) # a is 5.5 (float) @@ -7484,7 +7646,7 @@ Variant types :ref:`int` and :ref:`float` are supported. :ref:`float` **wrapf**\ (\ value\: :ref:`float`, min\: :ref:`float`, max\: :ref:`float`\ ) :ref:`🔗` -Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. +Wraps the float ``value`` between ``min`` and ``max``. ``min`` is *inclusive* while ``max`` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces. :: @@ -7501,9 +7663,7 @@ 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. - -\ :ref:`wrapf` is more flexible than using the :ref:`fposmod` approach by giving the user control over the minimum value. +\ **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. .. rst-class:: classref-item-separator @@ -7515,7 +7675,7 @@ Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating :ref:`int` **wrapi**\ (\ value\: :ref:`int`, min\: :ref:`int`, max\: :ref:`int`\ ) :ref:`🔗` -Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. +Wraps the integer ``value`` between ``min`` and ``max``. ``min`` is *inclusive* while ``max`` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces. :: @@ -7528,6 +7688,7 @@ Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creatin var result = wrapi(-6, -5, -1) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index 40a2d498fa0..e2addf9830f 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -17,13 +17,13 @@ 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``. +\ **Note:** In a boolean context, an **AABB** evaluates to ``false`` if both :ref:`position` and :ref:`size` are zero (equal to :ref:`Vector3.ZERO`). Otherwise, it always evaluates to ``true``. .. note:: @@ -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 @@ -286,7 +286,7 @@ Returns ``true`` if this bounding box *completely* encloses the ``with`` box. Th var a = AABB(Vector3(0, 0, 0), Vector3(4, 4, 4)) var b = AABB(Vector3(1, 1, 1), Vector3(3, 3, 3)) var c = AABB(Vector3(2, 2, 2), Vector3(8, 8, 8)) - + print(a.encloses(a)) # Prints true print(a.encloses(b)) # Prints true print(a.encloses(c)) # Prints false @@ -296,7 +296,7 @@ Returns ``true`` if this bounding box *completely* encloses the ``with`` box. Th var a = new Aabb(new Vector3(0, 0, 0), new Vector3(4, 4, 4)); var b = new Aabb(new Vector3(1, 1, 1), new Vector3(3, 3, 3)); var c = new Aabb(new Vector3(2, 2, 2), new Vector3(8, 8, 8)); - + GD.Print(a.Encloses(a)); // Prints True GD.Print(a.Encloses(b)); // Prints True GD.Print(a.Encloses(c)); // Prints False @@ -321,11 +321,11 @@ Returns a copy of this bounding box expanded to align the edges with the given ` .. code-tab:: gdscript var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5)) - + box = box.expand(Vector3(10, 0, 0)) print(box.position) # Prints (0.0, 0.0, 0.0) print(box.size) # Prints (10.0, 2.0, 5.0) - + box = box.expand(Vector3(-5, 0, 5)) print(box.position) # Prints (-5.0, 0.0, 0.0) print(box.size) # Prints (15.0, 2.0, 5.0) @@ -333,11 +333,11 @@ Returns a copy of this bounding box expanded to align the edges with the given ` .. code-tab:: csharp var box = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 5)); - + box = box.Expand(new Vector3(10, 0, 0)); GD.Print(box.Position); // Prints (0, 0, 0) GD.Print(box.Size); // Prints (10, 2, 5) - + box = box.Expand(new Vector3(-5, 0, 5)); GD.Print(box.Position); // Prints (-5, 0, 0) GD.Print(box.Size); // Prints (15, 2, 5) @@ -366,7 +366,7 @@ Returns the center point of the bounding box. This is the same as ``position + ( :ref:`Vector3` **get_endpoint**\ (\ idx\: :ref:`int`\ ) |const| :ref:`🔗` -Returns the position of one of the 8 vertices that compose this bounding box. With a ``idx`` of ``0`` this is the same as :ref:`position`, and a ``idx`` of ``7`` is the same as :ref:`end`. +Returns the position of one of the 8 vertices that compose this bounding box. With an ``idx`` of ``0`` this is the same as :ref:`position`, and an ``idx`` of ``7`` is the same as :ref:`end`. .. rst-class:: classref-item-separator @@ -386,7 +386,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 @@ -449,7 +449,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 @@ -538,7 +538,7 @@ Returns a copy of this bounding box extended on all sides by the given amount `` var a = AABB(Vector3(4, 4, 4), Vector3(8, 8, 8)).grow(4) print(a.position) # Prints (0.0, 0.0, 0.0) print(a.size) # Prints (16.0, 16.0, 16.0) - + var b = AABB(Vector3(0, 0, 0), Vector3(8, 4, 2)).grow(2) print(b.position) # Prints (-2.0, -2.0, -2.0) print(b.size) # Prints (12.0, 8.0, 6.0) @@ -548,7 +548,7 @@ Returns a copy of this bounding box extended on all sides by the given amount `` var a = new Aabb(new Vector3(4, 4, 4), new Vector3(8, 8, 8)).Grow(4); GD.Print(a.Position); // Prints (0, 0, 0) GD.Print(a.Size); // Prints (16, 16, 16) - + var b = new Aabb(new Vector3(0, 0, 0), new Vector3(8, 4, 2)).Grow(2); GD.Print(b.Position); // Prints (-2, -2, -2) GD.Print(b.Size); // Prints (12, 8, 6) @@ -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:: @@ -612,7 +612,7 @@ Returns the intersection between this bounding box and ``with``. If the boxes do var box1 = AABB(Vector3(0, 0, 0), Vector3(5, 2, 8)) var box2 = AABB(Vector3(2, 0, 2), Vector3(8, 4, 4)) - + var intersection = box1.intersection(box2) print(intersection.position) # Prints (2.0, 0.0, 2.0) print(intersection.size) # Prints (3.0, 2.0, 4.0) @@ -621,14 +621,14 @@ Returns the intersection between this bounding box and ``with``. If the boxes do var box1 = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 8)); var box2 = new Aabb(new Vector3(2, 0, 2), new Vector3(8, 4, 4)); - + var intersection = box1.Intersection(box2); GD.Print(intersection.Position); // Prints (2, 0, 2) GD.Print(intersection.Size); // Prints (3, 2, 4) -\ **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,9 +765,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst index af919102802..f64d3640d4d 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 with an action is pressed. See :ref:`add_button()`. .. rst-class:: classref-section-separator @@ -173,7 +177,7 @@ Sets autowrapping for the text in the dialog. - |void| **set_close_on_escape**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_close_on_escape**\ (\ ) -If ``true``, the dialog will be hidden when the escape key (:ref:`@GlobalScope.KEY_ESCAPE`) is pressed. +If ``true``, the dialog will be hidden when the ``ui_cancel`` action is pressed (by default, this action is bound to :ref:`@GlobalScope.KEY_ESCAPE`). .. rst-class:: classref-item-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 @@ -243,11 +247,13 @@ Method Descriptions :ref:`Button` **add_button**\ (\ text\: :ref:`String`, right\: :ref:`bool` = false, action\: :ref:`String` = ""\ ) :ref:`🔗` -Adds a button with label ``text`` and a custom ``action`` to the dialog and returns the created button. ``action`` will be passed to the :ref:`custom_action` signal when pressed. +Adds a button with label ``text`` and a custom ``action`` to the dialog and returns the created button. + +If ``action`` is not empty, pressing the button will emit the :ref:`custom_action` signal with the specified action string. 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 +267,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 +319,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 @@ -369,6 +375,7 @@ The size of the vertical space between the dialog's content and the button row. The panel that fills the background of the window. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_aescontext.rst b/classes/class_aescontext.rst index eee208b5c2d..1b3af834d5a 100644 --- a/classes/class_aescontext.rst +++ b/classes/class_aescontext.rst @@ -27,9 +27,9 @@ This class holds the context information required for encryption and decryption .. code-tab:: gdscript extends Node - + var aes = AESContext.new() - + func _ready(): var key = "My secret key!!!" # Key must be either 16 or 32 bytes. var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed. @@ -43,7 +43,7 @@ This class holds the context information required for encryption and decryption aes.finish() # Check ECB assert(decrypted == data.to_utf8_buffer()) - + var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes. # Encrypt CBC aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer()) @@ -60,11 +60,11 @@ This class holds the context information required for encryption and decryption using Godot; using System.Diagnostics; - + public partial class MyNode : Node { private AesContext _aes = new AesContext(); - + public override void _Ready() { string key = "My secret key!!!"; // Key must be either 16 or 32 bytes. @@ -79,7 +79,7 @@ This class holds the context information required for encryption and decryption _aes.Finish(); // Check ECB Debug.Assert(decrypted == data.ToUtf8Buffer()); - + string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes. // Encrypt CBC _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer()); @@ -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,11 +222,12 @@ 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. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_aimmodifier3d.rst b/classes/class_aimmodifier3d.rst new file mode 100644 index 00000000000..7132d64b538 --- /dev/null +++ b/classes/class_aimmodifier3d.rst @@ -0,0 +1,197 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/AimModifier3D.xml. + +.. _class_AimModifier3D: + +AimModifier3D +============= + +**Inherits:** :ref:`BoneConstraint3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +The **AimModifier3D** rotates a bone to look at a reference bone. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This is a simple version of :ref:`LookAtModifier3D` that only allows bone to the reference without advanced options such as angle limitation or time-based interpolation. + +The feature is simplified, but instead it is implemented with smooth tracking without euler, see :ref:`set_use_euler()`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`setting_count` | ``0`` | + +-----------------------+------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BoneAxis` | :ref:`get_forward_axis`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Axis` | :ref:`get_primary_rotation_axis`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_using_euler`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_using_secondary_rotation`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_forward_axis`\ (\ index\: :ref:`int`, axis\: :ref:`BoneAxis`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_primary_rotation_axis`\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_use_euler`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_use_secondary_rotation`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AimModifier3D_property_setting_count: + +.. rst-class:: classref-property + +:ref:`int` **setting_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_setting_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_setting_count**\ (\ ) + +The number of settings in the modifier. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AimModifier3D_method_get_forward_axis: + +.. rst-class:: classref-method + +:ref:`BoneAxis` **get_forward_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the forward axis of the bone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_get_primary_rotation_axis: + +.. rst-class:: classref-method + +:ref:`Axis` **get_primary_rotation_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the axis of the first rotation. It is enabled only if :ref:`is_using_euler()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_is_using_euler: + +.. rst-class:: classref-method + +:ref:`bool` **is_using_euler**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if it provides rotation with using euler. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_is_using_secondary_rotation: + +.. rst-class:: classref-method + +:ref:`bool` **is_using_secondary_rotation**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if it provides rotation by two axes. It is enabled only if :ref:`is_using_euler()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_set_forward_axis: + +.. rst-class:: classref-method + +|void| **set_forward_axis**\ (\ index\: :ref:`int`, axis\: :ref:`BoneAxis`\ ) :ref:`🔗` + +Sets the forward axis of the bone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_set_primary_rotation_axis: + +.. rst-class:: classref-method + +|void| **set_primary_rotation_axis**\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) :ref:`🔗` + +Sets the axis of the first rotation. It is enabled only if :ref:`is_using_euler()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_set_use_euler: + +.. rst-class:: classref-method + +|void| **set_use_euler**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, it provides rotation with using euler. + +If sets ``enabled`` to ``false``, it provides rotation with using rotation by arc generated from the forward axis vector and the vector toward the reference. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_set_use_secondary_rotation: + +.. rst-class:: classref-method + +|void| **set_use_secondary_rotation**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, it provides rotation by two axes. It is enabled only if :ref:`is_using_euler()` is ``true``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` +.. |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.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animatablebody2d.rst b/classes/class_animatablebody2d.rst index b340bb7c53c..1b35d325905 100644 --- a/classes/class_animatablebody2d.rst +++ b/classes/class_animatablebody2d.rst @@ -55,9 +55,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animatablebody3d.rst b/classes/class_animatablebody3d.rst index 24aeddf877d..858155c14fc 100644 --- a/classes/class_animatablebody3d.rst +++ b/classes/class_animatablebody3d.rst @@ -66,9 +66,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animatedsprite2d.rst b/classes/class_animatedsprite2d.rst index e888e1f645c..c8da9cfc606 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,9 +439,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index 955ff4b2422..7df37cf7e89 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,9 +359,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animatedtexture.rst b/classes/class_animatedtexture.rst index 88e6f86fdff..66070dc7a21 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. @@ -61,15 +61,21 @@ Methods .. table:: :widths: auto - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_frame_duration`\ (\ frame\: :ref:`int`\ ) |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`get_frame_texture`\ (\ frame\: :ref:`int`\ ) |const| | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_frame_duration`\ (\ frame\: :ref:`int`, duration\: :ref:`float`\ ) | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_frame_texture`\ (\ frame\: :ref:`int`, texture\: :ref:`Texture2D`\ ) | - +-----------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AnimatedTexture` | :ref:`create_from_image_frames`\ (\ image_frames\: :ref:`ImageFrames`\ ) |static| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_frame_duration`\ (\ frame\: :ref:`int`\ ) |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_frame_texture`\ (\ frame\: :ref:`int`\ ) |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`ImageFrames` | :ref:`make_image_frames`\ (\ ) |const| | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_frame_duration`\ (\ frame\: :ref:`int`, duration\: :ref:`float`\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_frame_texture`\ (\ frame\: :ref:`int`, texture\: :ref:`Texture2D`\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_from_image_frames`\ (\ image_frames\: :ref:`ImageFrames`\ ) | + +-----------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -125,7 +131,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 @@ -187,6 +193,18 @@ The animation speed is multiplied by this value. If set to a negative value, the Method Descriptions ------------------- +.. _class_AnimatedTexture_method_create_from_image_frames: + +.. rst-class:: classref-method + +:ref:`AnimatedTexture` **create_from_image_frames**\ (\ image_frames\: :ref:`ImageFrames`\ ) |static| :ref:`🔗` + +Creates a new **AnimatedTexture** and initializes it by allocating and setting the data from an :ref:`ImageFrames`. This function will ignore all frames beyond :ref:`MAX_FRAMES` - 1. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimatedTexture_method_get_frame_duration: .. rst-class:: classref-method @@ -211,6 +229,18 @@ Returns the given frame's :ref:`Texture2D`. ---- +.. _class_AnimatedTexture_method_make_image_frames: + +.. rst-class:: classref-method + +:ref:`ImageFrames` **make_image_frames**\ (\ ) |const| :ref:`🔗` + +Creates a new :ref:`ImageFrames` object from contents. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimatedTexture_method_set_frame_duration: .. rst-class:: classref-method @@ -233,7 +263,20 @@ Assigns a :ref:`Texture2D` to the given frame. Frame IDs start You can define any number of textures up to :ref:`MAX_FRAMES`, but keep in mind that only frames from 0 to :ref:`frames` - 1 will be part of the animation. +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimatedTexture_method_set_from_image_frames: + +.. rst-class:: classref-method + +|void| **set_from_image_frames**\ (\ image_frames\: :ref:`ImageFrames`\ ) :ref:`🔗` + +Replaces the texture's data with a new :ref:`ImageFrames`. This function will ignore all frames beyond :ref:`MAX_FRAMES` - 1. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animation.rst b/classes/class_animation.rst index 6b36f7834d9..dd394d5bd5b 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -67,15 +67,15 @@ Properties .. table:: :widths: auto - +------------------------------------------+--------------------------------------------------------------------+---------------+ - | :ref:`bool` | :ref:`capture_included` | ``false`` | - +------------------------------------------+--------------------------------------------------------------------+---------------+ - | :ref:`float` | :ref:`length` | ``1.0`` | - +------------------------------------------+--------------------------------------------------------------------+---------------+ - | :ref:`LoopMode` | :ref:`loop_mode` | ``0`` | - +------------------------------------------+--------------------------------------------------------------------+---------------+ - | :ref:`float` | :ref:`step` | ``0.0333333`` | - +------------------------------------------+--------------------------------------------------------------------+---------------+ + +------------------------------------------+--------------------------------------------------------------------+-----------------+ + | :ref:`bool` | :ref:`capture_included` | ``false`` | + +------------------------------------------+--------------------------------------------------------------------+-----------------+ + | :ref:`float` | :ref:`length` | ``1.0`` | + +------------------------------------------+--------------------------------------------------------------------+-----------------+ + | :ref:`LoopMode` | :ref:`loop_mode` | ``0`` | + +------------------------------------------+--------------------------------------------------------------------+-----------------+ + | :ref:`float` | :ref:`step` | ``0.033333335`` | + +------------------------------------------+--------------------------------------------------------------------+-----------------+ .. rst-class:: classref-reftable-group @@ -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 @@ -575,7 +575,7 @@ The total length of the animation (in seconds). - |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode`\ ) - :ref:`LoopMode` **get_loop_mode**\ (\ ) -Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. +Determines the behavior of both ends of the animation timeline during animation playback. This indicates whether and how the animation should be restarted, and is also used to correctly interpolate animation cycles. .. rst-class:: classref-item-separator @@ -585,7 +585,7 @@ Determines the behavior of both ends of the animation timeline during animation .. rst-class:: classref-property -:ref:`float` **step** = ``0.0333333`` :ref:`🔗` +:ref:`float` **step** = ``0.033333335`` :ref:`🔗` .. rst-class:: classref-property-setget @@ -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 @@ -1553,9 +1553,10 @@ A ``backward`` mainly affects the direction of key retrieval of the track with : |void| **value_track_set_update_mode**\ (\ track_idx\: :ref:`int`, mode\: :ref:`UpdateMode`\ ) :ref:`🔗` -Sets the update mode (see :ref:`UpdateMode`) of a value track. +Sets the update mode of a value track. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationlibrary.rst b/classes/class_animationlibrary.rst index f9ff9a938e9..6b042024f86 100644 --- a/classes/class_animationlibrary.rst +++ b/classes/class_animationlibrary.rst @@ -197,6 +197,7 @@ Removes the :ref:`Animation` with the key ``name``. Changes the key of the :ref:`Animation` associated with the key ``name`` to ``newname``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index 9bab5d9b10c..b7fc115993b 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -55,7 +55,7 @@ Properties +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ | :ref:`bool` | :ref:`reset_on_save` | ``true`` | +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ - | :ref:`bool` | :ref:`root_motion_local` | | + | :ref:`bool` | :ref:`root_motion_local` | ``false`` | +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ | :ref:`NodePath` | :ref:`root_motion_track` | ``NodePath("")`` | +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ @@ -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 @@ -480,14 +480,14 @@ This makes it more convenient to preview and edit animations in the editor, as c .. rst-class:: classref-property -:ref:`bool` **root_motion_local** :ref:`🔗` +:ref:`bool` **root_motion_local** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget - |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 @@ -704,7 +704,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: @@ -773,7 +773,7 @@ For example, if an animation with only one key ``Vector3(0, 0, 0)`` is played in .. code-tab:: gdscript var prev_root_motion_position_accumulator - + func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") @@ -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. @@ -840,7 +840,7 @@ For example, if an animation with only one key ``Quaternion(0, 0, 0, 1)`` is pla .. code-tab:: gdscript var prev_root_motion_rotation_accumulator - + func _process(delta): if Input.is_action_just_pressed("animate"): state_machine.travel("Animate") @@ -878,7 +878,7 @@ The most basic example is applying scale to :ref:`CharacterBody3D` associated with the Moves the :ref:`AnimationLibrary` associated with the key ``name`` to the key ``newname``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index f4a0255037f..2cb4739828c 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. @@ -349,9 +349,9 @@ Adds an input to the animation node. This is only useful for animation nodes cre |void| **blend_animation**\ (\ animation\: :ref:`StringName`, time\: :ref:`float`, delta\: :ref:`float`, seeked\: :ref:`bool`, is_external_seeking\: :ref:`bool`, blend\: :ref:`float`, looped_flag\: :ref:`LoopedFlag` = 0\ ) :ref:`🔗` -Blend an animation by ``blend`` amount (name must be valid in the linked :ref:`AnimationPlayer`). A ``time`` and ``delta`` may be passed, as well as whether ``seeked`` happened. +Blends an animation by ``blend`` amount (name must be valid in the linked :ref:`AnimationPlayer`). A ``time`` and ``delta`` may be passed, as well as whether ``seeked`` happened. -A ``looped_flag`` is used by internal processing immediately after the loop. See also :ref:`LoopedFlag`. +A ``looped_flag`` is used by internal processing immediately after the loop. .. rst-class:: classref-item-separator @@ -363,7 +363,7 @@ A ``looped_flag`` is used by internal processing immediately after the loop. See :ref:`float` **blend_input**\ (\ input_index\: :ref:`int`, time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, blend\: :ref:`float`, filter\: :ref:`FilterAction` = 0, sync\: :ref:`bool` = true, test_only\: :ref:`bool` = false\ ) :ref:`🔗` -Blend an input. This is only useful for animation nodes created for an :ref:`AnimationNodeBlendTree`. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. A filter mode may be optionally passed (see :ref:`FilterAction` for options). +Blends an input. This is only useful for animation nodes created for an :ref:`AnimationNodeBlendTree`. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. A filter mode may be optionally passed. .. rst-class:: classref-item-separator @@ -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 @@ -512,6 +512,7 @@ Sets the name of the input at the given ``input`` index. If the setting fails, r Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeadd2.rst b/classes/class_animationnodeadd2.rst index fb78674558e..4b0b3f22b3c 100644 --- a/classes/class_animationnodeadd2.rst +++ b/classes/class_animationnodeadd2.rst @@ -33,6 +33,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeadd3.rst b/classes/class_animationnodeadd3.rst index 5686c8d5263..4dea0875a9c 100644 --- a/classes/class_animationnodeadd3.rst +++ b/classes/class_animationnodeadd3.rst @@ -41,6 +41,7 @@ Tutorials - `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index dc8fd4cf175..fceee106329 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 @@ -241,6 +241,7 @@ If :ref:`use_custom_timeline` provides an animation based on the :ref:`Animation` resource with some parameters adjusted. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeblend2.rst b/classes/class_animationnodeblend2.rst index 252105c6c0c..a9a3c40366f 100644 --- a/classes/class_animationnodeblend2.rst +++ b/classes/class_animationnodeblend2.rst @@ -35,6 +35,7 @@ Tutorials - `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeblend3.rst b/classes/class_animationnodeblend3.rst index ee79b4d2ae5..2d59c913abd 100644 --- a/classes/class_animationnodeblend3.rst +++ b/classes/class_animationnodeblend3.rst @@ -39,6 +39,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeblendspace1d.rst b/classes/class_animationnodeblendspace1d.rst index 8c7183c18ce..b7c3fc5c734 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`. @@ -137,7 +137,7 @@ Property Descriptions - |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode`\ ) - :ref:`BlendMode` **get_blend_mode**\ (\ ) -Controls the interpolation between animations. See :ref:`BlendMode` constants. +Controls the interpolation between animations. .. rst-class:: classref-item-separator @@ -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 @@ -316,6 +316,7 @@ Changes the :ref:`AnimationNode` referenced by the point at Updates the position of the point at index ``point`` on the blend axis. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index e653157a7f2..82df4236488 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 @@ -185,7 +185,7 @@ If ``true``, the blend space is triangulated automatically. The mesh updates eve - |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode`\ ) - :ref:`BlendMode` **get_blend_mode**\ (\ ) -Controls the interpolation between animations. See :ref:`BlendMode` constants. +Controls the interpolation between animations. .. 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 @@ -429,6 +429,7 @@ Changes the :ref:`AnimationNode` referenced by the point at Updates the position of the point at index ``point`` in the blend space. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeblendtree.rst b/classes/class_animationnodeblendtree.rst index 2a4715e0355..46593507bf6 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 @@ -280,6 +294,7 @@ Changes the name of a sub animation node. Modifies the position of a sub animation node. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeextension.rst b/classes/class_animationnodeextension.rst index 3d835dd0d0e..1d7113e8f7e 100644 --- a/classes/class_animationnodeextension.rst +++ b/classes/class_animationnodeextension.rst @@ -31,13 +31,13 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`_process_animation_node`\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_remaining_time`\ (\ node_info\: :ref:`PackedFloat32Array`, break_loop\: :ref:`bool`\ ) |static| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_looping`\ (\ node_info\: :ref:`PackedFloat32Array`\ ) |static| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`_process_animation_node`\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| |required| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_remaining_time`\ (\ node_info\: :ref:`PackedFloat32Array`, break_loop\: :ref:`bool`\ ) |static| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_looping`\ (\ node_info\: :ref:`PackedFloat32Array`\ ) |static| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,9 +52,9 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedFloat32Array` **_process_animation_node**\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| :ref:`🔗` +:ref:`PackedFloat32Array` **_process_animation_node**\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| |required| :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. @@ -85,6 +85,7 @@ Returns the animation's remaining time for the given node info. For looping anim Returns ``true`` if the animation for the given ``node_info`` is looping. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index d5ee1dfab12..ebfdd29d2e4 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -32,22 +32,22 @@ After setting the request and changing the animation playback, the one-shot node animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE) # Alternative syntax (same result as above). animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE - + # Abort child animation connected to "shot" port. animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT) # Alternative syntax (same result as above). animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT - + # Abort child animation with fading out connected to "shot" port. animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT) # Alternative syntax (same result as above). animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT - + # Get current state (read-only). animation_tree.get("parameters/OneShot/active") # Alternative syntax (same result as above). animation_tree["parameters/OneShot/active"] - + # Get current internal state (read-only). animation_tree.get("parameters/OneShot/internal_active") # Alternative syntax (same result as above). @@ -57,16 +57,16 @@ After setting the request and changing the animation playback, the one-shot node // Play child animation connected to "shot" port. animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Fire); - + // Abort child animation connected to "shot" port. animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Abort); - + // Abort child animation with fading out connected to "shot" port. animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.FadeOut); - + // Get current state (read-only). animationTree.Get("parameters/OneShot/active"); - + // Get current internal state (read-only). animationTree.Get("parameters/OneShot/internal_active"); @@ -291,7 +291,7 @@ Determines how cross-fading between animations is eased. If empty, the transitio The fade-in duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 0 second and ends at 1 second during the animation. -\ **Note:** **AnimationNodeOneShot** transitions the current state after the end of the fading. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`fadein_time` is scaled depending on the downstream delta. For example, if this value is set to ``1.0`` and a :ref:`AnimationNodeTimeScale` with a value of ``2.0`` is chained downstream, the actual processing time will be 0.5 second. +\ **Note:** **AnimationNodeOneShot** transitions the current state after the fading has finished. .. rst-class:: classref-item-separator @@ -327,7 +327,7 @@ Determines how cross-fading between animations is eased. If empty, the transitio The fade-out duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a cross-fade that starts at 4 second and ends at 5 second during the animation. -\ **Note:** **AnimationNodeOneShot** transitions the current state after the end of the fading. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`fadeout_time` is scaled depending on the downstream delta. For example, if this value is set to ``1.0`` and an :ref:`AnimationNodeTimeScale` with a value of ``2.0`` is chained downstream, the actual processing time will be 0.5 second. +\ **Note:** **AnimationNodeOneShot** transitions the current state after the fading has finished. .. rst-class:: classref-item-separator @@ -347,6 +347,7 @@ The fade-out duration. For example, setting this to ``1.0`` for a 5 second lengt The blend type. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeoutput.rst b/classes/class_animationnodeoutput.rst index ce019612636..d2e53689e0c 100644 --- a/classes/class_animationnodeoutput.rst +++ b/classes/class_animationnodeoutput.rst @@ -33,6 +33,7 @@ Tutorials - `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index 5489e848d41..5311ecf09c8 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 @@ -438,6 +452,7 @@ Sets the draw offset of the graph. Used for display in the editor. Sets the animation node's coordinates. Used for display in the editor. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodestatemachineplayback.rst b/classes/class_animationnodestatemachineplayback.rst index ebd50b45d0f..d52d79ce422 100644 --- a/classes/class_animationnodestatemachineplayback.rst +++ b/classes/class_animationnodestatemachineplayback.rst @@ -91,6 +91,37 @@ Methods .. rst-class:: classref-descriptions-group +Signals +------- + +.. _class_AnimationNodeStateMachinePlayback_signal_state_finished: + +.. rst-class:: classref-signal + +**state_finished**\ (\ state\: :ref:`StringName`\ ) :ref:`🔗` + +Emitted when the ``state`` finishes playback. If ``state`` is a state machine set to grouped mode, its signals are passed through with its name prefixed. + +If there is a crossfade, this will be fired when the influence of the :ref:`get_fading_from_node()` animation is no longer present. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeStateMachinePlayback_signal_state_started: + +.. rst-class:: classref-signal + +**state_started**\ (\ state\: :ref:`StringName`\ ) :ref:`🔗` + +Emitted when the ``state`` starts playback. If ``state`` is a state machine set to grouped mode, its signals are passed through with its name prefixed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- @@ -221,6 +252,7 @@ If the path does not connect from the current state, the animation will play aft If ``reset_on_teleport`` is ``true``, the animation is played from the beginning when the travel cause a teleportation. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index dc914535acf..4b22a5706fc 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 @@ -322,6 +322,7 @@ The time to cross-fade between this state and the next. \ **Note:** :ref:`AnimationNodeStateMachine` transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`xfade_time` is not scaled depending on the downstream delta. See also :ref:`AnimationNodeOneShot.fadeout_time`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodesub2.rst b/classes/class_animationnodesub2.rst index 75e9d728ec1..280fe54b706 100644 --- a/classes/class_animationnodesub2.rst +++ b/classes/class_animationnodesub2.rst @@ -35,6 +35,7 @@ Tutorials - :doc:`AnimationTree <../tutorials/animation/animation_tree>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodesync.rst b/classes/class_animationnodesync.rst index 99594741913..cc6622ecc6b 100644 --- a/classes/class_animationnodesync.rst +++ b/classes/class_animationnodesync.rst @@ -67,6 +67,7 @@ If ``false``, the blended animations' frame are stopped when the blend value is If ``true``, forcing the blended animations to advance frame. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodetimescale.rst b/classes/class_animationnodetimescale.rst index 2d164e3e549..fd9797d8ecc 100644 --- a/classes/class_animationnodetimescale.rst +++ b/classes/class_animationnodetimescale.rst @@ -31,6 +31,7 @@ Tutorials - `3D Platformer Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodetimeseek.rst b/classes/class_animationnodetimeseek.rst index fa3145ded64..879622366ba 100644 --- a/classes/class_animationnodetimeseek.rst +++ b/classes/class_animationnodetimeseek.rst @@ -32,7 +32,7 @@ After setting the time and changing the animation playback, the time seek node a animation_tree.set("parameters/TimeSeek/seek_request", 0.0) # Alternative syntax (same result as above). animation_tree["parameters/TimeSeek/seek_request"] = 0.0 - + # Play child animation from 12 second timestamp. animation_tree.set("parameters/TimeSeek/seek_request", 12.0) # Alternative syntax (same result as above). @@ -42,7 +42,7 @@ After setting the time and changing the animation playback, the time seek node a // Play child animation from the start. animationTree.Set("parameters/TimeSeek/seek_request", 0.0); - + // Play child animation from 12 second timestamp. animationTree.Set("parameters/TimeSeek/seek_request", 12.0); @@ -90,6 +90,7 @@ Property Descriptions If ``true``, some processes are executed to handle keys between seeks, such as calculating root motion and finding the nearest discrete key. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodetransition.rst b/classes/class_animationnodetransition.rst index 1b4f7226d9a..4670c894779 100644 --- a/classes/class_animationnodetransition.rst +++ b/classes/class_animationnodetransition.rst @@ -34,12 +34,12 @@ After setting the request and changing the animation playback, the transition no animation_tree.set("parameters/Transition/transition_request", "state_2") # Alternative syntax (same result as above). animation_tree["parameters/Transition/transition_request"] = "state_2" - + # Get current state name (read-only). animation_tree.get("parameters/Transition/current_state") # Alternative syntax (same result as above). animation_tree["parameters/Transition/current_state"] - + # Get current state index (read-only). animation_tree.get("parameters/Transition/current_index") # Alternative syntax (same result as above). @@ -49,10 +49,10 @@ After setting the request and changing the animation playback, the transition no // Play child animation connected to "state_2" port. animationTree.Set("parameters/Transition/transition_request", "state_2"); - + // Get current state name (read-only). animationTree.Get("parameters/Transition/current_state"); - + // Get current state index (read-only). animationTree.Get("parameters/Transition/current_index"); @@ -262,6 +262,7 @@ If ``true``, breaks the loop at the end of the loop cycle for transition, even i If ``true``, the destination animation is restarted when the animation transitions. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 7af9683c637..073b66eb593 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,13 +895,14 @@ 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. \ **Note:** The method / audio / animation playback tracks will not be processed by this method. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationrootnode.rst b/classes/class_animationrootnode.rst index 7aac25afcab..30e54cd98cb 100644 --- a/classes/class_animationrootnode.rst +++ b/classes/class_animationrootnode.rst @@ -33,6 +33,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationtree.rst b/classes/class_animationtree.rst index a872fd0e4b5..cdb1a2553d9 100644 --- a/classes/class_animationtree.rst +++ b/classes/class_animationtree.rst @@ -218,6 +218,7 @@ Returns the process notification in which to update animations. Sets the process notification in which to update animations. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index c3a63ba94c4..ad98b044acb 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -155,7 +155,7 @@ Emitted when a :ref:`Shape2D` of the received ``area`` enters a s var other_shape_owner = area.shape_find_owner(area_shape_index) var other_shape_node = area.shape_owner_get_owner(other_shape_owner) - + var local_shape_owner = shape_find_owner(local_shape_index) var local_shape_node = shape_owner_get_owner(local_shape_owner) @@ -222,7 +222,7 @@ Emitted when a :ref:`Shape2D` of the received ``body`` enters a s var body_shape_owner = body.shape_find_owner(body_shape_index) var body_shape_node = body.shape_owner_get_owner(body_shape_owner) - + var local_shape_owner = shape_find_owner(local_shape_index) var local_shape_node = shape_owner_get_owner(local_shape_owner) @@ -336,7 +336,7 @@ See :ref:`ProjectSettings.physics/2d/default_angular_damp`\ ) - :ref:`SpaceOverride` **get_angular_damp_space_override_mode**\ (\ ) -Override mode for angular damping calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for angular damping calculations within this area. .. rst-class:: classref-item-separator @@ -474,7 +474,7 @@ The above is true only when the unit distance is a positive number. When this is - |void| **set_gravity_space_override_mode**\ (\ value\: :ref:`SpaceOverride`\ ) - :ref:`SpaceOverride` **get_gravity_space_override_mode**\ (\ ) -Override mode for gravity calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for gravity calculations within this area. .. rst-class:: classref-item-separator @@ -510,7 +510,7 @@ See :ref:`ProjectSettings.physics/2d/default_linear_damp`\ ) - :ref:`SpaceOverride` **get_linear_damp_space_override_mode**\ (\ ) -Override mode for linear damping calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for linear damping calculations within this area. .. rst-class:: classref-item-separator @@ -655,6 +655,7 @@ Returns ``true`` if the given physics body intersects or overlaps this **Area2D* The ``body`` argument can either be a :ref:`PhysicsBody2D` or a :ref:`TileMap` instance. While TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index 41182199058..141e8497bbf 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -169,7 +169,7 @@ Emitted when a :ref:`Shape3D` of the received ``area`` enters a s var other_shape_owner = area.shape_find_owner(area_shape_index) var other_shape_node = area.shape_owner_get_owner(other_shape_owner) - + var local_shape_owner = shape_find_owner(local_shape_index) var local_shape_node = shape_owner_get_owner(local_shape_owner) @@ -236,7 +236,7 @@ Emitted when a :ref:`Shape3D` of the received ``body`` enters a s var body_shape_owner = body.shape_find_owner(body_shape_index) var body_shape_node = body.shape_owner_get_owner(body_shape_owner) - + var local_shape_owner = shape_find_owner(local_shape_index) var local_shape_node = shape_owner_get_owner(local_shape_owner) @@ -350,7 +350,7 @@ See :ref:`ProjectSettings.physics/3d/default_angular_damp`\ ) - :ref:`SpaceOverride` **get_angular_damp_space_override_mode**\ (\ ) -Override mode for angular damping calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for angular damping calculations within this area. .. rst-class:: classref-item-separator @@ -488,7 +488,7 @@ The above is true only when the unit distance is a positive number. When this is - |void| **set_gravity_space_override_mode**\ (\ value\: :ref:`SpaceOverride`\ ) - :ref:`SpaceOverride` **get_gravity_space_override_mode**\ (\ ) -Override mode for gravity calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for gravity calculations within this area. .. rst-class:: classref-item-separator @@ -524,7 +524,7 @@ See :ref:`ProjectSettings.physics/3d/default_linear_damp`\ ) - :ref:`SpaceOverride` **get_linear_damp_space_override_mode**\ (\ ) -Override mode for linear damping calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for linear damping calculations within this area. .. rst-class:: classref-item-separator @@ -794,6 +794,7 @@ Returns ``true`` if the given physics body intersects or overlaps this **Area3D* The ``body`` argument can either be a :ref:`PhysicsBody3D` or a :ref:`GridMap` instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_array.rst b/classes/class_array.rst index 1dd896a3070..b8e63c1f9b7 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -28,29 +28,29 @@ An array data structure that can contain a sequence of elements of any :ref:`Var print(array[0]) # Prints "First" print(array[2]) # Prints 3 print(array[-1]) # Prints "Last" - + array[1] = "Second" print(array[1]) # Prints "Second" print(array[-3]) # Prints "Second" .. 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" - - array[2] = "Second"; + GD.Print(array[^1]); // Prints "Last" + + 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:: @@ -123,6 +123,8 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array` | :ref:`duplicate`\ (\ deep\: :ref:`bool` = false\ ) |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array` | :ref:`duplicate_deep`\ (\ deep_subresources_mode\: :ref:`int` = 1\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`erase`\ (\ value\: :ref:`Variant`\ ) | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`fill`\ (\ value\: :ref:`Variant`\ ) | @@ -257,7 +259,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``. @@ -267,10 +269,10 @@ If ``type`` is not :ref:`@GlobalScope.TYPE_OBJECT` **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 @@ -425,13 +427,13 @@ The ``method`` should take one :ref:`Variant` parameter (the curr func greater_than_5(number): return number > 5 - + func _ready(): print([6, 10, 6].all(greater_than_5)) # Prints true (3/3 elements evaluate to true). print([4, 10, 4].all(greater_than_5)) # Prints false (1/3 elements evaluate to true). print([4, 4, 4].all(greater_than_5)) # Prints false (0/3 elements evaluate to true). print([].all(greater_than_5)) # Prints true (0/0 elements evaluate to true). - + # Same as the first line above, but using a lambda function. print([6, 10, 6].all(func(element): return element > 5)) # Prints true @@ -441,7 +443,7 @@ The ``method`` should take one :ref:`Variant` parameter (the curr { return number > 5; } - + public override void _Ready() { // Prints True (3/3 elements evaluate to true). @@ -452,16 +454,16 @@ The ``method`` should take one :ref:`Variant` parameter (the curr GD.Print(new Godot.Collections.Array>int< { 4, 4, 4 }.All(GreaterThan5)); // Prints True (0/0 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { }.All(GreaterThan5)); - + // Same as the first line above, but using a lambda function. GD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(element => element > 5)); // Prints True } -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``. @@ -483,19 +485,19 @@ The ``method`` should take one :ref:`Variant` parameter (the curr func greater_than_5(number): return number > 5 - + func _ready(): print([6, 10, 6].any(greater_than_5)) # Prints true (3 elements evaluate to true). print([4, 10, 4].any(greater_than_5)) # Prints true (1 elements evaluate to true). print([4, 4, 4].any(greater_than_5)) # Prints false (0 elements evaluate to true). print([].any(greater_than_5)) # Prints false (0 elements evaluate to true). - + # 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 +511,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 +554,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. @@ -574,15 +576,15 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e var numbers = [2, 4, 8, 10] var idx = numbers.bsearch(7) - + numbers.insert(idx, 7) print(numbers) # Prints [2, 4, 7, 8, 10] - + var fruits = ["Apple", "Lemon", "Lemon", "Orange"] 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 +598,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. @@ -606,22 +608,22 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e if a[1] < b[1]: return true return false - + func _ready(): var my_items = [["Tomato", 2], ["Kiwi", 5], ["Rice", 9]] - + var apple = ["Apple", 5] # "Apple" is inserted before "Kiwi". my_items.insert(my_items.bsearch_custom(apple, sort_by_amount, true), apple) - + var banana = ["Banana", 5] # "Banana" is inserted after "Kiwi". my_items.insert(my_items.bsearch_custom(banana, sort_by_amount, false), banana) - + # 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 +635,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 +649,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 @@ -661,9 +663,23 @@ To count how many elements in an array satisfy a condition, see :ref:`reduce` elements are shared with the original array. Modifying them in one array will also affect them in the other. +By default, a **shallow** copy is returned: all nested **Array**, :ref:`Dictionary`, and :ref:`Resource` elements are shared with the original array. Modifying any of those in one array will also affect them in the other. + +If ``deep`` is ``true``, a **deep** copy is returned: all nested arrays and dictionaries are also duplicated (recursively). Any :ref:`Resource` is still shared with the original array, though. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Array_method_duplicate_deep: + +.. rst-class:: classref-method + +:ref:`Array` **duplicate_deep**\ (\ deep_subresources_mode\: :ref:`int` = 1\ ) |const| :ref:`🔗` + +Duplicates this array, deeply, like :ref:`duplicate()`\ ``(true)``, with extra control over how subresources are handled. -If ``deep`` is ``true``, a **deep** copy is returned: all nested arrays and dictionaries are also duplicated (recursively). +\ ``deep_subresources_mode`` must be one of the values from :ref:`DeepDuplicateMode`. By default, only internal resources will be duplicated (recursively). .. rst-class:: classref-item-separator @@ -675,7 +691,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 +709,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 +723,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] @@ -734,14 +750,14 @@ The ``method`` receives one of the array elements as an argument, and should ret func is_even(number): return number % 2 == 0 - + func _ready(): print([1, 4, 5, 8].filter(is_even)) # Prints [4, 8] - + # 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 +771,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 +789,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:: @@ -782,9 +798,9 @@ Returns the index of the **first** element in the array that causes ``method`` t func is_even(number): 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 +814,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. @@ -812,7 +828,9 @@ Returns the first element of the array. If the array is empty, fails and returns :ref:`Variant` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` -Returns the element at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). +Returns the element at the given ``index`` in the array. If ``index`` out-of-bounds or negative, this method fails and returns ``null``. + +This method is similar (but not identical) to the ``[]`` operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor. .. rst-class:: classref-item-separator @@ -824,7 +842,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 +854,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 +866,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 +892,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 +934,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 +950,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 +962,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 +976,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 @@ -1011,14 +1029,14 @@ The ``method`` should take one :ref:`Variant` parameter (the curr func double(number): return number * 2 - + func _ready(): print([1, 2, 3].map(double)) # Prints [2, 4, 6] - + # 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 +1048,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 +1062,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 +1086,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 +1117,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 +1129,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 +1143,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 +1155,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. @@ -1159,41 +1177,41 @@ The ``method`` takes two arguments: the current value of ``accum`` and the curre func sum(accum, number): return accum + number - + func _ready(): print([1, 2, 3].reduce(sum, 0)) # Prints 6 print([1, 2, 3].reduce(sum, 10)) # Prints 16 - + # 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()`: :: func is_even(number): return number % 2 == 0 - + 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 +1223,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 +1243,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 +1269,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 +1281,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 +1307,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 +1319,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,16 +1337,16 @@ 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()`. :: var letters = ["A", "B", "C", "D", "E", "F"] - + print(letters.slice(0, 2)) # Prints ["A", "B"] print(letters.slice(2, -2)) # Prints ["C", "D"] print(letters.slice(-2, 6)) # Prints ["E", "F"] - + print(letters.slice(0, 6, 2)) # Prints ["A", "C", "E"] print(letters.slice(4, 1, -1)) # Prints ["E", "D", "C"] @@ -1355,13 +1373,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 @@ -1383,17 +1401,17 @@ Sorts the array using a custom :ref:`Callable`. if a[1] < b[1]: return true return false - + func _ready(): var my_items = [["Tomato", 5], ["Apple", 9], ["Rice", 4]] my_items.sort_custom(sort_ascending) print(my_items) # Prints [["Rice", 4], ["Tomato", 5], ["Apple", 9]] - + # Sort descending, using a lambda function. 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 +1466,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 @@ -1537,6 +1555,7 @@ If all searched elements are equal, returns ``true`` if this array's size is gre Returns the :ref:`Variant` element at the specified ``index``. Arrays start at index 0. If ``index`` is greater or equal to ``0``, the element is fetched starting from the beginning of the array. If ``index`` is a negative value, the element is fetched starting from the end. Accessing an array out-of-bounds will cause a run-time error, pausing the project execution if run from the editor. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index a536b5e3b51..a2231214f11 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -32,13 +32,13 @@ The most basic example is the creation of a single triangle: vertices.push_back(Vector3(0, 1, 0)) vertices.push_back(Vector3(1, 0, 0)) vertices.push_back(Vector3(0, 0, 1)) - + # Initialize the ArrayMesh. var arr_mesh = ArrayMesh.new() var arrays = [] arrays.resize(Mesh.ARRAY_MAX) arrays[Mesh.ARRAY_VERTEX] = vertices - + # Create the Mesh. arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) var m = MeshInstance3D.new() @@ -46,19 +46,19 @@ 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; - + // Create the Mesh. arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays); var m = new MeshInstance3D(); @@ -165,7 +165,7 @@ Property Descriptions - |void| **set_blend_shape_mode**\ (\ value\: :ref:`BlendShapeMode`\ ) - :ref:`BlendShapeMode` **get_blend_shape_mode**\ (\ ) -Sets the blend shape mode to one of :ref:`BlendShapeMode`. +The blend shape mode. .. rst-class:: classref-item-separator @@ -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 @@ -467,6 +467,7 @@ Sets a name for a given surface. There is currently no description for this method. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_arrayoccluder3d.rst b/classes/class_arrayoccluder3d.rst index 8fd397dc36d..7c528fec374 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. @@ -121,6 +121,7 @@ Method Descriptions Sets :ref:`indices` and :ref:`vertices`, while updating the final occluder only once after both values are set. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_aspectratiocontainer.rst b/classes/class_aspectratiocontainer.rst index 150fd1838b1..2f57632beb2 100644 --- a/classes/class_aspectratiocontainer.rst +++ b/classes/class_aspectratiocontainer.rst @@ -203,6 +203,7 @@ The aspect ratio to enforce on child controls. This is the width divided by the The stretch mode used to align child controls. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index dc870e3ff3a..01ad1937e52 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -23,6 +23,13 @@ An implementation of the A\* algorithm, used to find the shortest path between t See :ref:`AStar3D` for a more thorough explanation on how to use this class. **AStar2D** is a wrapper for :ref:`AStar3D` that enforces 2D coordinates. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Grid-based Navigation with AStarGrid2D Demo `__ + .. rst-class:: classref-reftable-group Methods @@ -128,7 +135,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:: @@ -301,12 +308,12 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``, astar.add_point(2, Vector2(0, 1), 1) # Default weight is 1 astar.add_point(3, Vector2(1, 1)) astar.add_point(4, Vector2(2, 0)) - + astar.connect_points(1, 2, false) astar.connect_points(2, 3, false) astar.connect_points(4, 3, false) astar.connect_points(1, 4, false) - + var res = astar.get_id_path(1, 3) # Returns [1, 2, 3] .. code-tab:: csharp @@ -316,7 +323,7 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``, astar.AddPoint(2, new Vector2(0, 1), 1); // Default weight is 1 astar.AddPoint(3, new Vector2(1, 1)); astar.AddPoint(4, new Vector2(2, 0)); - + astar.ConnectPoints(1, 2, false); astar.ConnectPoints(2, 3, false); astar.ConnectPoints(4, 3, false); @@ -337,7 +344,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 @@ -361,10 +368,10 @@ Returns an array with the IDs of the points that form the connection with the gi astar.add_point(2, Vector2(0, 1)) astar.add_point(3, Vector2(1, 1)) astar.add_point(4, Vector2(2, 0)) - + astar.connect_points(1, 2, true) astar.connect_points(1, 3, true) - + var neighbors = astar.get_point_connections(1) # Returns [2, 3] .. code-tab:: csharp @@ -374,10 +381,10 @@ Returns an array with the IDs of the points that form the connection with the gi astar.AddPoint(2, new Vector2(0, 1)); astar.AddPoint(3, new Vector2(1, 1)); astar.AddPoint(4, new Vector2(2, 0)); - + astar.ConnectPoints(1, 2, true); astar.ConnectPoints(1, 3, true); - + long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] @@ -494,7 +501,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,9 +537,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index c18872fff7f..cb37b9147fe 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: @@ -34,12 +34,12 @@ It is also possible to use non-Euclidean distances. To do so, create a script th class_name MyAStar3D extends AStar3D - + func _compute_cost(u, v): var u_pos = get_point_position(u) var v_pos = get_point_position(v) return abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - v_pos.z) - + func _estimate_cost(u, v): var u_pos = get_point_position(u) var v_pos = get_point_position(v) @@ -48,7 +48,7 @@ It is also possible to use non-Euclidean distances. To do so, create a script th .. code-tab:: csharp using Godot; - + [GlobalClass] public partial class MyAStar3D : AStar3D { @@ -56,10 +56,10 @@ It is also possible to use non-Euclidean distances. To do so, create a script th { Vector3 fromPoint = GetPointPosition(fromId); Vector3 toPoint = GetPointPosition(toId); - + return Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z); } - + public override float _EstimateCost(long fromId, long toId) { Vector3 fromPoint = GetPointPosition(fromId); @@ -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:: @@ -352,12 +352,12 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``, astar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1 astar.add_point(3, Vector3(1, 1, 0)) astar.add_point(4, Vector3(2, 0, 0)) - + astar.connect_points(1, 2, false) astar.connect_points(2, 3, false) astar.connect_points(4, 3, false) astar.connect_points(1, 4, false) - + var res = astar.get_id_path(1, 3) # Returns [1, 2, 3] .. code-tab:: csharp @@ -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 @@ -411,10 +411,10 @@ Returns an array with the IDs of the points that form the connection with the gi astar.add_point(2, Vector3(0, 1, 0)) astar.add_point(3, Vector3(1, 1, 0)) astar.add_point(4, Vector3(2, 0, 0)) - + astar.connect_points(1, 2, true) astar.connect_points(1, 3, true) - + var neighbors = astar.get_point_connections(1) # Returns [2, 3] .. code-tab:: csharp @@ -426,7 +426,7 @@ Returns an array with the IDs of the points that form the connection with the gi astar.AddPoint(4, new Vector3(2, 0, 0)); astar.ConnectPoints(1, 2, true); astar.ConnectPoints(1, 3, true); - + long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] @@ -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,9 +579,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index c7e8641207e..5b905f3db3c 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,19 @@ 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-introduction-group + +Tutorials +--------- + +- `Grid-based Navigation with AStarGrid2D Demo `__ .. rst-class:: classref-reftable-group @@ -318,7 +325,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 +342,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 +359,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 +376,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 +446,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 +463,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 +482,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 +541,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 +555,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 +637,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 +687,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 +699,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,11 +713,12 @@ 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. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_atlastexture.rst b/classes/class_atlastexture.rst index fbec6550dfb..37df47c1268 100644 --- a/classes/class_atlastexture.rst +++ b/classes/class_atlastexture.rst @@ -119,6 +119,7 @@ The margin around the :ref:`region`. Useful The region used to draw the :ref:`atlas`. If either dimension of the region's size is ``0``, the value from :ref:`atlas` size will be used for that axis instead. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiobuslayout.rst b/classes/class_audiobuslayout.rst index 097367c6956..fdd11f094cf 100644 --- a/classes/class_audiobuslayout.rst +++ b/classes/class_audiobuslayout.rst @@ -22,6 +22,7 @@ Description Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See :ref:`AudioServer` for usage. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffect.rst b/classes/class_audioeffect.rst index ce194fd05af..4a0b4297440 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. @@ -42,9 +42,9 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+------------------------------------------------------------------------------------+ - | :ref:`AudioEffectInstance` | :ref:`_instantiate`\ (\ ) |virtual| | - +-------------------------------------------------------+------------------------------------------------------------------------------------+ + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`AudioEffectInstance` | :ref:`_instantiate`\ (\ ) |virtual| |required| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -59,25 +59,26 @@ Method Descriptions .. rst-class:: classref-method -:ref:`AudioEffectInstance` **_instantiate**\ (\ ) |virtual| :ref:`🔗` +:ref:`AudioEffectInstance` **_instantiate**\ (\ ) |virtual| |required| :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()`. :: extends AudioEffect - + @export var strength = 4.0 - + func _instantiate(): var effect = CustomAudioEffectInstance.new() effect.base = self - + return effect \ **Note:** It is recommended to keep a reference to the original **AudioEffect** in the new instance. Depending on the implementation this allows the effect instance to listen for changes at run-time and be modified accordingly. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectamplify.rst b/classes/class_audioeffectamplify.rst index 4c40139661f..ec1860a2630 100644 --- a/classes/class_audioeffectamplify.rst +++ b/classes/class_audioeffectamplify.rst @@ -81,9 +81,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectbandlimitfilter.rst b/classes/class_audioeffectbandlimitfilter.rst index 4fc414b9672..79f97b4f152 100644 --- a/classes/class_audioeffectbandlimitfilter.rst +++ b/classes/class_audioeffectbandlimitfilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectbandpassfilter.rst b/classes/class_audioeffectbandpassfilter.rst index 970568bebd9..4e2d9ede05c 100644 --- a/classes/class_audioeffectbandpassfilter.rst +++ b/classes/class_audioeffectbandpassfilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectcapture.rst b/classes/class_audioeffectcapture.rst index 0d71c927ac4..22cbb941671 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 @@ -186,6 +186,7 @@ Returns the number of frames available to read using :ref:`get_buffer`! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectcompressor.rst b/classes/class_audioeffectcompressor.rst index 8d1c27ec490..e196f87467c 100644 --- a/classes/class_audioeffectcompressor.rst +++ b/classes/class_audioeffectcompressor.rst @@ -25,7 +25,7 @@ Dynamic range compressor reduces the level of the sound when the amplitude goes Compressor has many uses in the mix: -- In the Master bus to compress the whole output (although an :ref:`AudioEffectLimiter` is probably better). +- In the Master bus to compress the whole output (although an :ref:`AudioEffectHardLimiter` is probably better). - In voice channels to ensure they sound as balanced as possible. @@ -189,6 +189,7 @@ Reduce the sound level using another audio bus for threshold detection. The level above which compression is applied to the audio. Value can range from -60 to 0. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectdelay.rst b/classes/class_audioeffectdelay.rst index a4b57b9b585..b2d6007ced6 100644 --- a/classes/class_audioeffectdelay.rst +++ b/classes/class_audioeffectdelay.rst @@ -293,6 +293,7 @@ Sound level for the second tap. Pan position for the second tap. Value can range from -1 (fully left) to 1 (fully right). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectdistortion.rst b/classes/class_audioeffectdistortion.rst index 54226ee3363..0dc4950d7c7 100644 --- a/classes/class_audioeffectdistortion.rst +++ b/classes/class_audioeffectdistortion.rst @@ -202,6 +202,7 @@ Increases or decreases the volume after the effect, in decibels. Value can range Increases or decreases the volume before the effect, in decibels. Value can range from -60 to 60. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecteq.rst b/classes/class_audioeffecteq.rst index 9ce3d9fb5ab..6bd900c8591 100644 --- a/classes/class_audioeffecteq.rst +++ b/classes/class_audioeffecteq.rst @@ -90,6 +90,7 @@ Returns the band's gain at the specified index, in dB. Sets band's gain at the specified index, in dB. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecteq10.rst b/classes/class_audioeffecteq10.rst index 58900fa6d6f..9515bd8d614 100644 --- a/classes/class_audioeffecteq10.rst +++ b/classes/class_audioeffecteq10.rst @@ -53,6 +53,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecteq21.rst b/classes/class_audioeffecteq21.rst index 39b7000ae57..fbd85f3cf67 100644 --- a/classes/class_audioeffecteq21.rst +++ b/classes/class_audioeffecteq21.rst @@ -75,6 +75,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecteq6.rst b/classes/class_audioeffecteq6.rst index 7cd5ed36098..7f6957d85e4 100644 --- a/classes/class_audioeffecteq6.rst +++ b/classes/class_audioeffecteq6.rst @@ -45,6 +45,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectfilter.rst b/classes/class_audioeffectfilter.rst index 81062f771cd..bd0d70781a4 100644 --- a/classes/class_audioeffectfilter.rst +++ b/classes/class_audioeffectfilter.rst @@ -169,6 +169,7 @@ Gain amount of the frequencies after the filter. Amount of boost in the frequency range near the cutoff frequency. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecthardlimiter.rst b/classes/class_audioeffecthardlimiter.rst index 6787ef61f41..52635e9b158 100644 --- a/classes/class_audioeffecthardlimiter.rst +++ b/classes/class_audioeffecthardlimiter.rst @@ -103,6 +103,7 @@ Gain to apply before limiting, in decibels. Time it takes in seconds for the gain reduction to fully release. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecthighpassfilter.rst b/classes/class_audioeffecthighpassfilter.rst index 49643acd0c5..24e94235085 100644 --- a/classes/class_audioeffecthighpassfilter.rst +++ b/classes/class_audioeffecthighpassfilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecthighshelffilter.rst b/classes/class_audioeffecthighshelffilter.rst index ba3a2a6e97b..60a8c17e991 100644 --- a/classes/class_audioeffecthighshelffilter.rst +++ b/classes/class_audioeffecthighshelffilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectinstance.rst b/classes/class_audioeffectinstance.rst index 260d0797be6..51fd23563e0 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 @@ -38,11 +38,11 @@ Methods .. table:: :widths: auto - +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_process`\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| | - +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_process_silence`\ (\ ) |virtual| |const| | - +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_process`\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| |required| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_process_silence`\ (\ ) |virtual| |const| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -57,9 +57,9 @@ Method Descriptions .. rst-class:: classref-method -|void| **_process**\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| :ref:`🔗` +|void| **_process**\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| |required| :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,9 +75,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectlimiter.rst b/classes/class_audioeffectlimiter.rst index 1f999381015..b3e6d829582 100644 --- a/classes/class_audioeffectlimiter.rst +++ b/classes/class_audioeffectlimiter.rst @@ -126,6 +126,7 @@ Applies a gain to the limited waves, in decibels. Value can range from 0 to 6. Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectlowpassfilter.rst b/classes/class_audioeffectlowpassfilter.rst index b1a1bb47bc7..6b8d02b734f 100644 --- a/classes/class_audioeffectlowpassfilter.rst +++ b/classes/class_audioeffectlowpassfilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectlowshelffilter.rst b/classes/class_audioeffectlowshelffilter.rst index e0974dcd7ef..97acd842726 100644 --- a/classes/class_audioeffectlowshelffilter.rst +++ b/classes/class_audioeffectlowshelffilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectnotchfilter.rst b/classes/class_audioeffectnotchfilter.rst index 56368e1a607..bad634d3b42 100644 --- a/classes/class_audioeffectnotchfilter.rst +++ b/classes/class_audioeffectnotchfilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectpanner.rst b/classes/class_audioeffectpanner.rst index 1f830e6a163..8da02d52d91 100644 --- a/classes/class_audioeffectpanner.rst +++ b/classes/class_audioeffectpanner.rst @@ -63,6 +63,7 @@ Property Descriptions Pan position. Value can range from -1 (fully left) to 1 (fully right). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectphaser.rst b/classes/class_audioeffectphaser.rst index 82ac3c54040..7b59dd8fa86 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 @@ -141,6 +141,7 @@ Determines the minimum frequency affected by the LFO modulations, in Hz. Value c Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectpitchshift.rst b/classes/class_audioeffectpitchshift.rst index 26dfc759296..b9df9468d7f 100644 --- a/classes/class_audioeffectpitchshift.rst +++ b/classes/class_audioeffectpitchshift.rst @@ -166,6 +166,7 @@ The oversampling factor to use. Higher values result in better quality, but are The pitch scale to use. ``1.0`` is the default pitch and plays sounds unaffected. :ref:`pitch_scale` can range from ``0.0`` (infinitely low pitch, inaudible) to ``16`` (16 times higher than the initial pitch). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectrecord.rst b/classes/class_audioeffectrecord.rst index 1a419e29ffc..f6640f3a257 100644 --- a/classes/class_audioeffectrecord.rst +++ b/classes/class_audioeffectrecord.rst @@ -84,7 +84,7 @@ Property Descriptions - |void| **set_format**\ (\ value\: :ref:`Format`\ ) - :ref:`Format` **get_format**\ (\ ) -Specifies the format in which the sample will be recorded. See :ref:`Format` for available formats. +Specifies the format in which the sample will be recorded. .. rst-class:: classref-section-separator @@ -128,6 +128,7 @@ Returns whether the recording is active or not. If ``true``, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectreverb.rst b/classes/class_audioeffectreverb.rst index 042169b035a..aa36ceb3799 100644 --- a/classes/class_audioeffectreverb.rst +++ b/classes/class_audioeffectreverb.rst @@ -198,6 +198,7 @@ Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Val Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index 815bc382db7..d5109225627 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. @@ -170,6 +170,7 @@ The size of the `Fast Fourier transform `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectspectrumanalyzerinstance.rst b/classes/class_audioeffectspectrumanalyzerinstance.rst index c921e8674a5..c1807bbb323 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 @@ -90,9 +90,10 @@ Method Descriptions Returns the magnitude of the frequencies from ``from_hz`` to ``to_hz`` in linear energy as a Vector2. The ``x`` component of the return value represents the left stereo channel, and ``y`` represents the right channel. -\ ``mode`` determines how the frequency range will be processed. See :ref:`MagnitudeMode`. +\ ``mode`` determines how the frequency range will be processed. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectstereoenhance.rst b/classes/class_audioeffectstereoenhance.rst index 9eb8cced0f7..968dbe54451 100644 --- a/classes/class_audioeffectstereoenhance.rst +++ b/classes/class_audioeffectstereoenhance.rst @@ -101,6 +101,7 @@ Widens sound stage through phase shifting in conjunction with :ref:`time_pullout Widens sound stage through phase shifting in conjunction with :ref:`surround`. Just delays the right channel if :ref:`surround` is 0. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiolistener2d.rst b/classes/class_audiolistener2d.rst index 20aeb83275a..c4ef04a1f13 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. @@ -86,6 +86,7 @@ Makes the **AudioListener2D** active, setting it as the hearing point for the so This method will have no effect if the **AudioListener2D** is not added to :ref:`SceneTree`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiolistener3d.rst b/classes/class_audiolistener3d.rst index c985ec7f0fb..f19387140c1 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. @@ -98,6 +98,7 @@ Returns ``true`` if the listener was made current using :ref:`make_current`\ ) - :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. @@ -923,6 +923,7 @@ Swaps the position of two effects in bus ``bus_idx``. Unlocks the audio driver's main loop. (After locking it, you should always unlock it.) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostream.rst b/classes/class_audiostream.rst index 504bd968144..ff20d378c91 100644 --- a/classes/class_audiostream.rst +++ b/classes/class_audiostream.rst @@ -57,6 +57,8 @@ Methods +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_stream_name`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_tags`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_has_loop`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`AudioStreamPlayback` | :ref:`_instantiate_playback`\ (\ ) |virtual| |const| | @@ -148,7 +150,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 +162,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 @@ -178,6 +180,20 @@ Override this method to customize the name assigned to this audio stream. Unused ---- +.. _class_AudioStream_private_method__get_tags: + +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_tags**\ (\ ) |virtual| |const| :ref:`🔗` + +Override this method to customize the tags for this audio stream. Should return a :ref:`Dictionary` of strings with the tag as the key and its content as the value. + +Commonly used tags include ``title``, ``artist``, ``album``, ``tracknumber``, and ``date``. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioStream_private_method__has_loop: .. rst-class:: classref-method @@ -196,7 +212,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 +224,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 @@ -248,7 +264,7 @@ Generates an :ref:`AudioSample` based on the current stream. :ref:`float` **get_length**\ (\ ) |const| :ref:`🔗` -Returns the length of the audio stream in seconds. +Returns the length of the audio stream in seconds. If this stream is an :ref:`AudioStreamRandomizer`, returns the length of the last played stream. If this stream has an indefinite length (such as for :ref:`AudioStreamGenerator` and :ref:`AudioStreamMicrophone`), returns ``0.0``. .. rst-class:: classref-item-separator @@ -260,7 +276,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 @@ -287,6 +303,7 @@ Returns ``true`` if the stream is a collection of other streams, ``false`` other Returns ``true`` if this audio stream only supports one channel (*monophony*), or ``false`` if the audio stream supports two or more channels (*polyphony*). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamgenerator.rst b/classes/class_audiostreamgenerator.rst index f3db3aed482..1533356c91f 100644 --- a/classes/class_audiostreamgenerator.rst +++ b/classes/class_audiostreamgenerator.rst @@ -31,17 +31,17 @@ 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() playback = $AudioStreamPlayer.get_stream_playback() fill_buffer() - + func fill_buffer(): - var phase = 0.0 var increment = pulse_hz / sample_hz var frames_available = playback.get_frames_available() - + for i in range(frames_available): playback.push_frame(Vector2.ONE * sin(phase * TAU)) phase = fmod(phase + increment, 1.0) @@ -49,11 +49,12 @@ Here's a sample on how to use it to generate a sine wave: .. code-tab:: csharp [Export] public AudioStreamPlayer Player { get; set; } - + 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() { if (Player.Stream is AudioStreamGenerator generator) // Type as a generator to access MixRate. @@ -64,13 +65,12 @@ Here's a sample on how to use it to generate a sine wave: FillBuffer(); } } - + public void FillBuffer() { - double phase = 0.0; float increment = _pulseHz / _sampleHz; int framesAvailable = _playback.GetFramesAvailable(); - + for (int i = 0; i < framesAvailable; i++) { _playback.PushFrame(Vector2.One * (float)Mathf.Sin(phase * Mathf.Tau)); @@ -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,7 +199,29 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamgeneratorplayback.rst b/classes/class_audiostreamgeneratorplayback.rst index 99121c1916e..2e768e62d46 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,9 +127,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreaminteractive.rst b/classes/class_audiostreaminteractive.rst index e13f076d001..4c0d4c44228 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 @@ -546,6 +546,7 @@ Set the name of the current clip (for easier identification). Set the :ref:`AudioStream` associated with the current clip. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreammicrophone.rst b/classes/class_audiostreammicrophone.rst index 61faf25b929..20ef49ccafa 100644 --- a/classes/class_audiostreammicrophone.rst +++ b/classes/class_audiostreammicrophone.rst @@ -33,6 +33,7 @@ Tutorials - `Audio Mic Record Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreammp3.rst b/classes/class_audiostreammp3.rst index 982486b2c4b..e1a5b848115 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,7 +199,37 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamoggvorbis.rst b/classes/class_audiostreamoggvorbis.rst index 645d27737da..f349e1ef275 100644 --- a/classes/class_audiostreamoggvorbis.rst +++ b/classes/class_audiostreamoggvorbis.rst @@ -49,6 +49,8 @@ Properties +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`OggPacketSequence` | :ref:`packet_sequence` | | +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`Dictionary` | :ref:`tags` | ``{}`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -58,11 +60,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 @@ -177,6 +179,27 @@ Time in seconds at which the stream starts after being looped. Contains the raw Ogg data for this stream. +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamOggVorbis_property_tags: + +.. rst-class:: classref-property + +:ref:`Dictionary` **tags** = ``{}`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_tags**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_tags**\ (\ ) + +Contains user-defined tags if found in the Ogg Vorbis data. + +Commonly used tags include ``title``, ``artist``, ``album``, ``tracknumber``, and ``date`` (``date`` does not have a standard date format). + +\ **Note:** No tag is *guaranteed* to be present in every file, so make sure to account for the keys not always existing. + .. rst-class:: classref-section-separator ---- @@ -190,9 +213,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,9 +227,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index 5d91093e10c..5854a7d8e23 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -38,45 +38,45 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_loop_count`\ (\ ) |virtual| |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_parameter`\ (\ name\: :ref:`StringName`\ ) |virtual| |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_playback_position`\ (\ ) |virtual| |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_playing`\ (\ ) |virtual| |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_mix`\ (\ buffer\: ``AudioFrame*``, rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_seek`\ (\ position\: :ref:`float`\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_set_parameter`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_start`\ (\ from_pos\: :ref:`float`\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_stop`\ (\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_tag_used_streams`\ (\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_loop_count`\ (\ ) |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_playback_position`\ (\ ) |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioSamplePlayback` | :ref:`get_sample_playback`\ (\ ) |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing`\ (\ ) |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`mix_audio`\ (\ rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`seek`\ (\ time\: :ref:`float` = 0.0\ ) | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_sample_playback`\ (\ playback_sample\: :ref:`AudioSamplePlayback`\ ) | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`start`\ (\ from_pos\: :ref:`float` = 0.0\ ) | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`stop`\ (\ ) | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_loop_count`\ (\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_parameter`\ (\ name\: :ref:`StringName`\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_playback_position`\ (\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_playing`\ (\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_mix`\ (\ buffer\: ``AudioFrame*``, rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) |virtual| |required| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_seek`\ (\ position\: :ref:`float`\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_parameter`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_start`\ (\ from_pos\: :ref:`float`\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_stop`\ (\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_tag_used_streams`\ (\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_loop_count`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playback_position`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioSamplePlayback` | :ref:`get_sample_playback`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`mix_audio`\ (\ rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`seek`\ (\ time\: :ref:`float` = 0.0\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_sample_playback`\ (\ playback_sample\: :ref:`AudioSamplePlayback`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`start`\ (\ from_pos\: :ref:`float` = 0.0\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop`\ (\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -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 @@ -139,7 +139,7 @@ Overridable method. Should return ``true`` if this playback is active and playin .. rst-class:: classref-method -:ref:`int` **_mix**\ (\ buffer\: ``AudioFrame*``, rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) |virtual| :ref:`🔗` +:ref:`int` **_mix**\ (\ buffer\: ``AudioFrame*``, rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) |virtual| |required| :ref:`🔗` Override this method to customize how the audio stream is mixed. This method is called even if the playback is not active. @@ -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 @@ -322,6 +322,7 @@ Starts the stream from the given ``from_pos``, in seconds. Stops the stream. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybackinteractive.rst b/classes/class_audiostreamplaybackinteractive.rst index d51f037faf7..6f3595434c8 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. @@ -90,6 +90,7 @@ Switch to a clip (by index). Switch to a clip (by name). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybackoggvorbis.rst b/classes/class_audiostreamplaybackoggvorbis.rst index 1395e4a01e4..b1eb0e72ad1 100644 --- a/classes/class_audiostreamplaybackoggvorbis.rst +++ b/classes/class_audiostreamplaybackoggvorbis.rst @@ -17,6 +17,7 @@ AudioStreamPlaybackOggVorbis There is currently no description for this class. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybackplaylist.rst b/classes/class_audiostreamplaybackplaylist.rst index 65ed5c94772..15f1fa8377f 100644 --- a/classes/class_audiostreamplaybackplaylist.rst +++ b/classes/class_audiostreamplaybackplaylist.rst @@ -15,6 +15,7 @@ AudioStreamPlaybackPlaylist Playback class used for :ref:`AudioStreamPlaylist`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybackpolyphonic.rst b/classes/class_audiostreamplaybackpolyphonic.rst index 4a4199c9c9c..b9e2b99463d 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,9 +127,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybackresampled.rst b/classes/class_audiostreamplaybackresampled.rst index 8736be21f14..3093d920e07 100644 --- a/classes/class_audiostreamplaybackresampled.rst +++ b/classes/class_audiostreamplaybackresampled.rst @@ -26,13 +26,13 @@ Methods .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_stream_sampling_rate`\ (\ ) |virtual| |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_mix_resampled`\ (\ dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`begin_resample`\ (\ ) | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_stream_sampling_rate`\ (\ ) |virtual| |required| |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_mix_resampled`\ (\ dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| |required| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`begin_resample`\ (\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -47,7 +47,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **_get_stream_sampling_rate**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`float` **_get_stream_sampling_rate**\ (\ ) |virtual| |required| |const| :ref:`🔗` .. container:: contribute @@ -61,7 +61,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int` **_mix_resampled**\ (\ dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| :ref:`🔗` +:ref:`int` **_mix_resampled**\ (\ dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| |required| :ref:`🔗` .. container:: contribute @@ -82,6 +82,7 @@ Method Descriptions There is currently no description for this method. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybacksynchronized.rst b/classes/class_audiostreamplaybacksynchronized.rst index 2164956d539..5ba4dc21420 100644 --- a/classes/class_audiostreamplaybacksynchronized.rst +++ b/classes/class_audiostreamplaybacksynchronized.rst @@ -17,6 +17,7 @@ AudioStreamPlaybackSynchronized There is currently no description for this class. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index 8ec3e96e943..2a9b6694d07 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 @@ -228,7 +228,7 @@ The maximum number of sounds this node can play at the same time. Calling :ref:` - |void| **set_mix_target**\ (\ value\: :ref:`MixTarget`\ ) - :ref:`MixTarget` **get_mix_target**\ (\ ) -The mix target channels, as one of the :ref:`MixTarget` constants. Has no effect when two speakers or less are detected (see :ref:`SpeakerMode`). +The mix target channels. Has no effect when two speakers or less are detected (see :ref:`SpeakerMode`). .. 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 @@ -439,6 +439,7 @@ Restarts all sounds to be played from the given ``to_position``, in seconds. Doe Stops all sounds from this node. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index 089af165b40..71017c7a1e3 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 @@ -441,6 +441,7 @@ Sets the position from which audio will be played, in seconds. Stops the audio. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index e6132685359..93e54e426fe 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 @@ -674,6 +678,7 @@ Sets the position from which audio will be played, in seconds. Stops the audio. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaylist.rst b/classes/class_audiostreamplaylist.rst index 0f2eaf38020..88847b5ff23 100644 --- a/classes/class_audiostreamplaylist.rst +++ b/classes/class_audiostreamplaylist.rst @@ -180,6 +180,7 @@ Returns the stream at playback position index. Sets the stream at playback position index. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreampolyphonic.rst b/classes/class_audiostreampolyphonic.rst index 1ec8d7ccbd2..f04e1b9292c 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 @@ -58,6 +58,7 @@ Property Descriptions Maximum amount of simultaneous streams that can be played. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamrandomizer.rst b/classes/class_audiostreamrandomizer.rst index 915c81abcb9..920ebfe1b71 100644 --- a/classes/class_audiostreamrandomizer.rst +++ b/classes/class_audiostreamrandomizer.rst @@ -265,6 +265,7 @@ Set the AudioStream at the specified index. Set the probability weight of the stream at the specified index. The higher this value, the more likely that the randomizer will choose this stream during random playback modes. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamsynchronized.rst b/classes/class_audiostreamsynchronized.rst index 9095e09e9e0..b619bc3faa2 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 @@ -144,6 +144,7 @@ Set one of the synchronized streams, by index. Set the volume of one of the synchronized streams, by index. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamwav.rst b/classes/class_audiostreamwav.rst index 97cbb5cad5a..be44c6c502f 100644 --- a/classes/class_audiostreamwav.rst +++ b/classes/class_audiostreamwav.rst @@ -53,6 +53,8 @@ Properties +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`stereo` | ``false`` | +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ + | :ref:`Dictionary` | :ref:`tags` | ``{}`` | + +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ .. rst-class:: classref-reftable-group @@ -62,13 +64,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 @@ -202,7 +204,7 @@ Contains the audio data in bytes. - |void| **set_format**\ (\ value\: :ref:`Format`\ ) - :ref:`Format` **get_format**\ (\ ) -Audio format. See :ref:`Format` constants for values. +Audio format. .. rst-class:: classref-item-separator @@ -253,7 +255,7 @@ The loop end point (in number of samples, relative to the beginning of the strea - |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode`\ ) - :ref:`LoopMode` **get_loop_mode**\ (\ ) -The loop mode. See :ref:`LoopMode` constants for values. +The loop mode. .. rst-class:: classref-item-separator @@ -293,6 +295,29 @@ According to the `Nyquist-Shannon sampling theorem ` **tags** = ``{}`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_tags**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_tags**\ (\ ) + +Contains user-defined tags if found in the WAV data. + +Commonly used tags include ``title``, ``artist``, ``album``, ``tracknumber``, and ``date`` (``date`` does not have a standard date format). + +\ **Note:** No tag is *guaranteed* to be present in every file, so make sure to account for the keys not always existing. + +\ **Note:** Only WAV files using a ``LIST`` chunk with an identifier of ``INFO`` to encode the tags are currently supported. + .. rst-class:: classref-section-separator ---- @@ -306,11 +331,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,17 +347,19 @@ 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: :: @onready var audio_player = $AudioStreamPlayer - + func _ready(): get_window().files_dropped.connect(_on_files_dropped) - + func _on_files_dropped(files): if files[0].get_extension() == "wav": audio_player.stream = AudioStreamWAV.load_from_file(files[0], { @@ -356,6 +383,7 @@ Saves the AudioStreamWAV as a WAV file to ``path``. Samples with IMA ADPCM or Qu \ **Note:** A ``.wav`` extension is automatically appended to ``path`` if it is missing. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_backbuffercopy.rst b/classes/class_backbuffercopy.rst index 1a0b88127f9..56fefdd6a07 100644 --- a/classes/class_backbuffercopy.rst +++ b/classes/class_backbuffercopy.rst @@ -103,7 +103,7 @@ Property Descriptions - |void| **set_copy_mode**\ (\ value\: :ref:`CopyMode`\ ) - :ref:`CopyMode` **get_copy_mode**\ (\ ) -Buffer mode. See :ref:`CopyMode` constants. +Buffer mode. .. rst-class:: classref-item-separator @@ -123,6 +123,7 @@ Buffer mode. See :ref:`CopyMode` constants. The area covered by the **BackBufferCopy**. Only used if :ref:`copy_mode` is :ref:`COPY_MODE_RECT`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index bfd8720ed98..295327dd80c 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -231,7 +231,7 @@ Property Descriptions - |void| **set_action_mode**\ (\ value\: :ref:`ActionMode`\ ) - :ref:`ActionMode` **get_action_mode**\ (\ ) -Determines when the button is considered clicked, one of the :ref:`ActionMode` constants. +Determines when the button is considered clicked. .. rst-class:: classref-item-separator @@ -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 @@ -464,6 +464,7 @@ Changes the :ref:`button_pressed` stat \ **Note:** This method doesn't unpress other buttons in :ref:`button_group`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 4c8bcfd14bc..940a3051be2 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -77,6 +77,10 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Texture2D` | :ref:`backlight_texture` | | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`bent_normal_enabled` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Texture2D` | :ref:`bent_normal_texture` | | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`billboard_keep_scale` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`BillboardMode` | :ref:`billboard_mode` | ``0`` | @@ -95,6 +99,8 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`DepthDrawMode` | :ref:`depth_draw_mode` | ``0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`DepthTest` | :ref:`depth_test` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Texture2D` | :ref:`detail_albedo` | | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`BlendMode` | :ref:`detail_blend_mode` | ``0`` | @@ -115,6 +121,8 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`disable_receive_shadows` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`disable_specular_occlusion` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`distance_fade_max_distance` | ``10.0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`distance_fade_min_distance` | ``0.0`` | @@ -137,6 +145,8 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`fixed_size` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`fov_override` | ``75.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`grow` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`float` | :ref:`grow_amount` | ``0.0`` | @@ -221,6 +231,18 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`SpecularMode` | :ref:`specular_mode` | ``0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`Color` | :ref:`stencil_color` | ``Color(0, 0, 0, 1)`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`StencilCompare` | :ref:`stencil_compare` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`stencil_flags` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`StencilMode` | :ref:`stencil_mode` | ``0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`stencil_outline_thickness` | ``0.01`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`int` | :ref:`stencil_reference` | ``1`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`subsurf_scatter_enabled` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`subsurf_scatter_skin_mode` | ``false`` | @@ -245,10 +267,14 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Transparency` | :ref:`transparency` | ``0`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`use_fov_override` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`use_particle_trails` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`use_point_size` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`use_z_clip_scale` | ``false`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Vector3` | :ref:`uv1_offset` | ``Vector3(0, 0, 0)`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`Vector3` | :ref:`uv1_scale` | ``Vector3(1, 1, 1)`` | @@ -273,6 +299,8 @@ Properties +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`vertex_color_use_as_albedo` | ``false`` | +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ + | :ref:`float` | :ref:`z_clip_scale` | ``1.0`` | + +-----------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------+-----------------------+ .. rst-class:: classref-reftable-group @@ -351,6 +379,14 @@ Texture specifying per-pixel emission color. Texture specifying per-pixel normal vector. +.. _class_BaseMaterial3D_constant_TEXTURE_BENT_NORMAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`TextureParam` **TEXTURE_BENT_NORMAL** = ``18`` + +Texture specifying per-pixel bent normal vector. + .. _class_BaseMaterial3D_constant_TEXTURE_RIM: .. rst-class:: classref-enumeration-constant @@ -459,7 +495,7 @@ Texture holding ambient occlusion, roughness, and metallic. .. rst-class:: classref-enumeration-constant -:ref:`TextureParam` **TEXTURE_MAX** = ``18`` +:ref:`TextureParam` **TEXTURE_MAX** = ``19`` Represents the size of the :ref:`TextureParam` enum. @@ -761,11 +797,19 @@ Constant for setting :ref:`refraction_enabled`. +.. _class_BaseMaterial3D_constant_FEATURE_BENT_NORMAL_MAPPING: + +.. rst-class:: classref-enumeration-constant + +:ref:`Feature` **FEATURE_BENT_NORMAL_MAPPING** = ``12`` + +Constant for setting :ref:`bent_normal_enabled`. + .. _class_BaseMaterial3D_constant_FEATURE_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Feature` **FEATURE_MAX** = ``12`` +:ref:`Feature` **FEATURE_MAX** = ``13`` Represents the size of the :ref:`Feature` enum. @@ -893,6 +937,32 @@ Objects will not write their depth to the depth buffer, even during the depth pr ---- +.. _enum_BaseMaterial3D_DepthTest: + +.. rst-class:: classref-enumeration + +enum **DepthTest**: :ref:`🔗` + +.. _class_BaseMaterial3D_constant_DEPTH_TEST_DEFAULT: + +.. rst-class:: classref-enumeration-constant + +:ref:`DepthTest` **DEPTH_TEST_DEFAULT** = ``0`` + +Depth test will discard the pixel if it is behind other pixels. + +.. _class_BaseMaterial3D_constant_DEPTH_TEST_INVERTED: + +.. rst-class:: classref-enumeration-constant + +:ref:`DepthTest` **DEPTH_TEST_INVERTED** = ``1`` + +Depth test will discard the pixel if it is in front of other pixels. Useful for stencil effects. + +.. rst-class:: classref-item-separator + +---- + .. _enum_BaseMaterial3D_CullMode: .. rst-class:: classref-enumeration @@ -1111,11 +1181,35 @@ Enables multichannel signed distance field rendering shader. Disables receiving depth-based or volumetric fog. +.. _class_BaseMaterial3D_constant_FLAG_DISABLE_SPECULAR_OCCLUSION: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_DISABLE_SPECULAR_OCCLUSION** = ``22`` + +Disables specular occlusion. + +.. _class_BaseMaterial3D_constant_FLAG_USE_Z_CLIP_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_USE_Z_CLIP_SCALE** = ``23`` + +Enables using :ref:`z_clip_scale`. + +.. _class_BaseMaterial3D_constant_FLAG_USE_FOV_OVERRIDE: + +.. rst-class:: classref-enumeration-constant + +:ref:`Flags` **FLAG_USE_FOV_OVERRIDE** = ``24`` + +Enables using :ref:`fov_override`. + .. _class_BaseMaterial3D_constant_FLAG_MAX: .. rst-class:: classref-enumeration-constant -:ref:`Flags` **FLAG_MAX** = ``22`` +:ref:`Flags` **FLAG_MAX** = ``25`` Represents the size of the :ref:`Flags` enum. @@ -1179,6 +1273,10 @@ enum **SpecularMode**: :ref:`🔗` Default specular blob. +\ **Note:** Forward+ uses multiscattering for more accurate reflections, although the impact of multiscattering is more noticeable on rough metallic surfaces than on smooth, non-metallic surfaces. + +\ **Note:** Mobile and Compatibility don't perform multiscattering for performance reasons. Instead, they perform single scattering, which means rough metallic surfaces may look slightly darker than intended. + .. _class_BaseMaterial3D_constant_SPECULAR_TOON: .. rst-class:: classref-enumeration-constant @@ -1357,6 +1455,152 @@ Smoothly fades the object out based on each pixel's distance from the camera usi Smoothly fades the object out based on the object's distance from the camera using a dithering approach. Dithering discards pixels based on a set pattern to smoothly fade without enabling transparency. On certain hardware, this can be faster than :ref:`DISTANCE_FADE_PIXEL_ALPHA` and :ref:`DISTANCE_FADE_PIXEL_DITHER`. +.. rst-class:: classref-item-separator + +---- + +.. _enum_BaseMaterial3D_StencilMode: + +.. rst-class:: classref-enumeration + +enum **StencilMode**: :ref:`🔗` + +.. _class_BaseMaterial3D_constant_STENCIL_MODE_DISABLED: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilMode` **STENCIL_MODE_DISABLED** = ``0`` + +Disables stencil operations. + +.. _class_BaseMaterial3D_constant_STENCIL_MODE_OUTLINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilMode` **STENCIL_MODE_OUTLINE** = ``1`` + +Stencil preset which applies an outline to the object. + +\ **Note:** Requires a :ref:`Material.next_pass` material which will be automatically applied. Any manual changes made to :ref:`Material.next_pass` will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a :ref:`Material.next_pass` material on a material that uses stencil presets, use :ref:`GeometryInstance3D.material_overlay` instead. + +.. _class_BaseMaterial3D_constant_STENCIL_MODE_XRAY: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilMode` **STENCIL_MODE_XRAY** = ``2`` + +Stencil preset which shows a silhouette of the object behind walls. + +\ **Note:** Requires a :ref:`Material.next_pass` material which will be automatically applied. Any manual changes made to :ref:`Material.next_pass` will be lost when the stencil properties are modified or the scene is reloaded. To safely apply a :ref:`Material.next_pass` material on a material that uses stencil presets, use :ref:`GeometryInstance3D.material_overlay` instead. + +.. _class_BaseMaterial3D_constant_STENCIL_MODE_CUSTOM: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilMode` **STENCIL_MODE_CUSTOM** = ``3`` + +Enables stencil operations without a preset. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_BaseMaterial3D_StencilFlags: + +.. rst-class:: classref-enumeration + +enum **StencilFlags**: :ref:`🔗` + +.. _class_BaseMaterial3D_constant_STENCIL_FLAG_READ: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilFlags` **STENCIL_FLAG_READ** = ``1`` + +The material will only be rendered where it passes a stencil comparison with existing stencil buffer values. See :ref:`StencilCompare`. + +.. _class_BaseMaterial3D_constant_STENCIL_FLAG_WRITE: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilFlags` **STENCIL_FLAG_WRITE** = ``2`` + +The material will write the reference value to the stencil buffer where it passes the depth test. + +.. _class_BaseMaterial3D_constant_STENCIL_FLAG_WRITE_DEPTH_FAIL: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilFlags` **STENCIL_FLAG_WRITE_DEPTH_FAIL** = ``4`` + +The material will write the reference value to the stencil buffer where it fails the depth test. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_BaseMaterial3D_StencilCompare: + +.. rst-class:: classref-enumeration + +enum **StencilCompare**: :ref:`🔗` + +.. _class_BaseMaterial3D_constant_STENCIL_COMPARE_ALWAYS: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilCompare` **STENCIL_COMPARE_ALWAYS** = ``0`` + +Always passes the stencil test. + +.. _class_BaseMaterial3D_constant_STENCIL_COMPARE_LESS: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilCompare` **STENCIL_COMPARE_LESS** = ``1`` + +Passes the stencil test when the reference value is less than the existing stencil value. + +.. _class_BaseMaterial3D_constant_STENCIL_COMPARE_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilCompare` **STENCIL_COMPARE_EQUAL** = ``2`` + +Passes the stencil test when the reference value is equal to the existing stencil value. + +.. _class_BaseMaterial3D_constant_STENCIL_COMPARE_LESS_OR_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilCompare` **STENCIL_COMPARE_LESS_OR_EQUAL** = ``3`` + +Passes the stencil test when the reference value is less than or equal to the existing stencil value. + +.. _class_BaseMaterial3D_constant_STENCIL_COMPARE_GREATER: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilCompare` **STENCIL_COMPARE_GREATER** = ``4`` + +Passes the stencil test when the reference value is greater than the existing stencil value. + +.. _class_BaseMaterial3D_constant_STENCIL_COMPARE_NOT_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilCompare` **STENCIL_COMPARE_NOT_EQUAL** = ``5`` + +Passes the stencil test when the reference value is not equal to the existing stencil value. + +.. _class_BaseMaterial3D_constant_STENCIL_COMPARE_GREATER_OR_EQUAL: + +.. rst-class:: classref-enumeration-constant + +:ref:`StencilCompare` **STENCIL_COMPARE_GREATER_OR_EQUAL** = ``6`` + +Passes the stencil test when the reference value is greater than or equal to the existing stencil value. + .. rst-class:: classref-section-separator ---- @@ -1468,7 +1712,7 @@ Threshold at which antialiasing will be applied on the alpha channel. - |void| **set_alpha_antialiasing**\ (\ value\: :ref:`AlphaAntiAliasing`\ ) - :ref:`AlphaAntiAliasing` **get_alpha_antialiasing**\ (\ ) -The type of alpha antialiasing to apply. See :ref:`AlphaAntiAliasing`. +The type of alpha antialiasing to apply. .. rst-class:: classref-item-separator @@ -1701,6 +1945,46 @@ Texture used to control the backlight effect per-pixel. Added to :ref:`backlight ---- +.. _class_BaseMaterial3D_property_bent_normal_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **bent_normal_enabled** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_feature**\ (\ feature\: :ref:`Feature`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_feature**\ (\ feature\: :ref:`Feature`\ ) |const| + +If ``true``, the bent normal map is enabled. This allows for more accurate indirect lighting and specular occlusion. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BaseMaterial3D_property_bent_normal_texture: + +.. rst-class:: classref-property + +:ref:`Texture2D` **bent_normal_texture** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) +- :ref:`Texture2D` **get_texture**\ (\ param\: :ref:`TextureParam`\ ) |const| + +Texture that specifies the average direction of incoming ambient light at a given pixel. The :ref:`bent_normal_texture` only uses the red and green channels; the blue and alpha channels are ignored. The normal read from :ref:`bent_normal_texture` is oriented around the surface normal provided by the :ref:`Mesh`. + +\ **Note:** A bent normal map is different from a regular normal map. When baking a bent normal map make sure to use **a cosine distribution** for the bent normal map to work correctly. + +\ **Note:** The mesh must have both normals and tangents defined in its vertex data. Otherwise, the shading produced by the bent normal map will not look correct. 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 bent normal map to use X+, Y+, and Z+ coordinates. See `this page `__ for a comparison of normal map coordinates expected by popular engines. + +.. rst-class:: classref-item-separator + +---- + .. _class_BaseMaterial3D_property_billboard_keep_scale: .. rst-class:: classref-property @@ -1729,7 +2013,7 @@ If ``true``, the shader will keep the scale set for the mesh. Otherwise, the sca - |void| **set_billboard_mode**\ (\ value\: :ref:`BillboardMode`\ ) - :ref:`BillboardMode` **get_billboard_mode**\ (\ ) -Controls how the object faces the camera. See :ref:`BillboardMode`. +Controls how the object faces the camera. \ **Note:** Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See `GitHub issue #41567 `__ for details. @@ -1750,7 +2034,7 @@ Controls how the object faces the camera. See :ref:`BillboardMode`. +\ **Note:** Values other than ``Mix`` force the object into the transparent pipeline. .. rst-class:: classref-item-separator @@ -1837,7 +2121,7 @@ Texture that defines the strength of the clearcoat effect and the glossiness of - |void| **set_cull_mode**\ (\ value\: :ref:`CullMode`\ ) - :ref:`CullMode` **get_cull_mode**\ (\ ) -Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera. See :ref:`CullMode`. +Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera. .. rst-class:: classref-item-separator @@ -1854,7 +2138,28 @@ Determines which side of the triangle to cull depending on whether the triangle - |void| **set_depth_draw_mode**\ (\ value\: :ref:`DepthDrawMode`\ ) - :ref:`DepthDrawMode` **get_depth_draw_mode**\ (\ ) -Determines when depth rendering takes place. See :ref:`DepthDrawMode`. See also :ref:`transparency`. +Determines when depth rendering takes place. See also :ref:`transparency`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BaseMaterial3D_property_depth_test: + +.. rst-class:: classref-property + +:ref:`DepthTest` **depth_test** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_depth_test**\ (\ value\: :ref:`DepthTest`\ ) +- :ref:`DepthTest` **get_depth_test**\ (\ ) + +**Experimental:** May be affected by future rendering pipeline changes. + +Determines which comparison operator is used when testing depth. See :ref:`DepthTest`. + +\ **Note:** Changing :ref:`depth_test` to a non-default value only has a visible effect when used on a transparent material, or a material that has :ref:`depth_draw_mode` set to :ref:`DEPTH_DRAW_DISABLED`. .. rst-class:: classref-item-separator @@ -1890,7 +2195,7 @@ Texture that specifies the color of the detail overlay. :ref:`detail_albedo`\ ) - :ref:`BlendMode` **get_detail_blend_mode**\ (\ ) -Specifies how the :ref:`detail_albedo` should blend with the current ``ALBEDO``. See :ref:`BlendMode` for options. +Specifies how the :ref:`detail_albedo` should blend with the current ``ALBEDO``. .. rst-class:: classref-item-separator @@ -1960,7 +2265,7 @@ Texture that specifies the per-pixel normal of the detail overlay. The :ref:`det - |void| **set_detail_uv**\ (\ value\: :ref:`DetailUV`\ ) - :ref:`DetailUV` **get_detail_uv**\ (\ ) -Specifies whether to use ``UV`` or ``UV2`` for the detail layer. See :ref:`DetailUV` for options. +Specifies whether to use ``UV`` or ``UV2`` for the detail layer. .. rst-class:: classref-item-separator @@ -1977,7 +2282,7 @@ Specifies whether to use ``UV`` or ``UV2`` for the detail layer. See :ref:`Detai - |void| **set_diffuse_mode**\ (\ value\: :ref:`DiffuseMode`\ ) - :ref:`DiffuseMode` **get_diffuse_mode**\ (\ ) -The algorithm used for diffuse light scattering. See :ref:`DiffuseMode`. +The algorithm used for diffuse light scattering. .. rst-class:: classref-item-separator @@ -2034,6 +2339,23 @@ If ``true``, the object receives no shadow that would otherwise be cast onto it. ---- +.. _class_BaseMaterial3D_property_disable_specular_occlusion: + +.. rst-class:: classref-property + +:ref:`bool` **disable_specular_occlusion** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| + +If ``true``, disables specular occlusion even if :ref:`ProjectSettings.rendering/reflections/specular_occlusion/enabled` is ``false``. + +.. rst-class:: classref-item-separator + +---- + .. _class_BaseMaterial3D_property_distance_fade_max_distance: .. rst-class:: classref-property @@ -2185,7 +2507,7 @@ Use ``UV2`` to read from the :ref:`emission_texture`\ ) - :ref:`EmissionOperator` **get_emission_operator**\ (\ ) -Sets how :ref:`emission` interacts with :ref:`emission_texture`. Can either add or multiply. See :ref:`EmissionOperator` for options. +Sets how :ref:`emission` interacts with :ref:`emission_texture`. Can either add or multiply. .. rst-class:: classref-item-separator @@ -2219,7 +2541,26 @@ 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 + +---- + +.. _class_BaseMaterial3D_property_fov_override: + +.. rst-class:: classref-property + +:ref:`float` **fov_override** = ``75.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_fov_override**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_fov_override**\ (\ ) + +Overrides the :ref:`Camera3D`'s field of view angle (in degrees). + +\ **Note:** This behaves as if the field of view is set on a :ref:`Camera3D` with :ref:`Camera3D.keep_aspect` set to :ref:`Camera3D.KEEP_HEIGHT`. Additionally, it may not look correct on a non-perspective camera where the field of view setting is ignored. .. rst-class:: classref-item-separator @@ -2238,7 +2579,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 +2937,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. @@ -2961,7 +3302,7 @@ If ``true``, enables the "shadow to opacity" render mode where lighting modifies - |void| **set_specular_mode**\ (\ value\: :ref:`SpecularMode`\ ) - :ref:`SpecularMode` **get_specular_mode**\ (\ ) -The method for rendering the specular blob. See :ref:`SpecularMode`. +The method for rendering the specular blob. \ **Note:** :ref:`specular_mode` only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, :ref:`VoxelGI`, SDFGI or :ref:`ReflectionProbe`\ s. To disable reflections from these sources as well, set :ref:`metallic_specular` to ``0.0`` instead. @@ -2969,6 +3310,120 @@ The method for rendering the specular blob. See :ref:`SpecularMode` **stencil_color** = ``Color(0, 0, 0, 1)`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_stencil_effect_color**\ (\ value\: :ref:`Color`\ ) +- :ref:`Color` **get_stencil_effect_color**\ (\ ) + +**Experimental:** May be affected by future rendering pipeline changes. + +The primary color of the stencil effect. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BaseMaterial3D_property_stencil_compare: + +.. rst-class:: classref-property + +:ref:`StencilCompare` **stencil_compare** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_stencil_compare**\ (\ value\: :ref:`StencilCompare`\ ) +- :ref:`StencilCompare` **get_stencil_compare**\ (\ ) + +**Experimental:** May be affected by future rendering pipeline changes. + +The comparison operator to use for stencil masking operations. See :ref:`StencilCompare`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BaseMaterial3D_property_stencil_flags: + +.. rst-class:: classref-property + +:ref:`int` **stencil_flags** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_stencil_flags**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_stencil_flags**\ (\ ) + +**Experimental:** May be affected by future rendering pipeline changes. + +The flags dictating how the stencil operation behaves. See :ref:`StencilFlags`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BaseMaterial3D_property_stencil_mode: + +.. rst-class:: classref-property + +:ref:`StencilMode` **stencil_mode** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_stencil_mode**\ (\ value\: :ref:`StencilMode`\ ) +- :ref:`StencilMode` **get_stencil_mode**\ (\ ) + +**Experimental:** May be affected by future rendering pipeline changes. + +The stencil effect mode. See :ref:`StencilMode`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BaseMaterial3D_property_stencil_outline_thickness: + +.. rst-class:: classref-property + +:ref:`float` **stencil_outline_thickness** = ``0.01`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_stencil_effect_outline_thickness**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_stencil_effect_outline_thickness**\ (\ ) + +**Experimental:** May be affected by future rendering pipeline changes. + +The outline thickness for :ref:`STENCIL_MODE_OUTLINE`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BaseMaterial3D_property_stencil_reference: + +.. rst-class:: classref-property + +:ref:`int` **stencil_reference** = ``1`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_stencil_reference**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_stencil_reference**\ (\ ) + +**Experimental:** May be affected by future rendering pipeline changes. + +The stencil reference value (0-255). Typically a power of 2. + +.. rst-class:: classref-item-separator + +---- + .. _class_BaseMaterial3D_property_subsurf_scatter_enabled: .. rst-class:: classref-property @@ -3133,7 +3588,7 @@ The texture to use for multiplying the intensity of the subsurface scattering tr - |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter`\ ) - :ref:`TextureFilter` **get_texture_filter**\ (\ ) -Filter flags for the texture. See :ref:`TextureFilter` for options. +Filter flags for the texture. \ **Note:** :ref:`heightmap_texture` is always sampled with linear filtering, even if nearest-neighbor filtering is selected here. This is to ensure the heightmap effect looks as intended. If you need sharper height transitions between pixels, resize the heightmap texture in an image editor with nearest-neighbor filtering. @@ -3152,7 +3607,7 @@ Filter flags for the texture. See :ref:`TextureFilter`, enable\: :ref:`bool`\ ) - :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| -Repeat flags for the texture. See :ref:`TextureFilter` for options. +If ``true``, the texture repeats when exceeding the texture's size. See :ref:`FLAG_USE_TEXTURE_REPEAT`. .. rst-class:: classref-item-separator @@ -3175,6 +3630,23 @@ The material's transparency mode. Some transparency modes will disable shadow ca ---- +.. _class_BaseMaterial3D_property_use_fov_override: + +.. rst-class:: classref-property + +:ref:`bool` **use_fov_override** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| + +If ``true`` use :ref:`fov_override` to override the :ref:`Camera3D`'s field of view angle. + +.. rst-class:: classref-item-separator + +---- + .. _class_BaseMaterial3D_property_use_particle_trails: .. rst-class:: classref-property @@ -3211,6 +3683,23 @@ If ``true``, render point size can be changed. ---- +.. _class_BaseMaterial3D_property_use_z_clip_scale: + +.. rst-class:: classref-property + +:ref:`bool` **use_z_clip_scale** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) +- :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| + +If ``true`` use :ref:`z_clip_scale` to scale the object being rendered towards the camera to avoid clipping into things like walls. + +.. rst-class:: classref-item-separator + +---- + .. _class_BaseMaterial3D_property_uv1_offset: .. rst-class:: classref-property @@ -3417,6 +3906,23 @@ If ``true``, vertex colors are considered to be stored in sRGB color space and a If ``true``, the vertex color is used as albedo color. +.. rst-class:: classref-item-separator + +---- + +.. _class_BaseMaterial3D_property_z_clip_scale: + +.. rst-class:: classref-property + +:ref:`float` **z_clip_scale** = ``1.0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_z_clip_scale**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_z_clip_scale**\ (\ ) + +Scales the object being rendered towards the camera to avoid clipping into things like walls. This is intended to be used for objects that are fixed with respect to the camera like player arms, tools, etc. Lighting and shadows will continue to work correctly when this setting is adjusted, but screen-space effects like SSAO and SSR may break with lower scales. Therefore, try to keep this setting as close to ``1.0`` as possible. + .. rst-class:: classref-section-separator ---- @@ -3444,7 +3950,7 @@ Returns ``true``, if the specified :ref:`Feature` i :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| :ref:`🔗` -Returns ``true``, if the specified flag is enabled. See :ref:`Flags` enumerator for options. +Returns ``true`` if the specified flag is enabled. .. rst-class:: classref-item-separator @@ -3480,7 +3986,7 @@ If ``true``, enables the specified :ref:`Feature`. |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) :ref:`🔗` -If ``true``, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to ``true``. See :ref:`Flags` enumerator for options. +If ``true``, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to ``true``. .. rst-class:: classref-item-separator @@ -3492,9 +3998,10 @@ If ``true``, enables the specified flag. Flags are optional behavior that can be |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) :ref:`🔗` -Sets the texture for the slot specified by ``param``. See :ref:`TextureParam` for available slots. +Sets the texture for the slot specified by ``param``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_basis.rst b/classes/class_basis.rst index 2b9fe5d168e..3d0076a1338 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. @@ -135,6 +135,8 @@ Methods +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Basis` | :ref:`scaled`\ (\ scale\: :ref:`Vector3`\ ) |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Basis` | :ref:`scaled_local`\ (\ scale\: :ref:`Vector3`\ ) |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Basis` | :ref:`slerp`\ (\ to\: :ref:`Basis`, weight\: :ref:`float`\ ) |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`tdotx`\ (\ with\: :ref:`Vector3`\ ) |const| | @@ -330,7 +332,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 +373,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. @@ -402,19 +404,19 @@ Constructs a new **Basis** that only represents rotation from the given :ref:`Ve # Creates a Basis whose z axis points down. var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0)) - + print(my_basis.z) # Prints (0.0, -1.0, 0.0) .. code-tab:: csharp // Creates a Basis whose z axis points down. var myBasis = Basis.FromEuler(new Vector3(Mathf.Tau / 4.0f, 0.0f, 0.0f)); - + GD.Print(myBasis.Z); // Prints (0, -1, 0) -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 @@ -434,7 +436,7 @@ Constructs a new **Basis** that only represents scale, with no rotation or shear .. code-tab:: gdscript var my_basis = Basis.from_scale(Vector3(2, 4, 8)) - + print(my_basis.x) # Prints (2.0, 0.0, 0.0) print(my_basis.y) # Prints (0.0, 4.0, 0.0) print(my_basis.z) # Prints (0.0, 0.0, 8.0) @@ -442,7 +444,7 @@ Constructs a new **Basis** that only represents scale, with no rotation or shear .. code-tab:: csharp var myBasis = Basis.FromScale(new Vector3(2.0f, 4.0f, 8.0f)); - + GD.Print(myBasis.X); // Prints (2, 0, 0) GD.Print(myBasis.Y); // Prints (0, 4, 0) GD.Print(myBasis.Z); // Prints (0, 0, 8) @@ -469,11 +471,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 +491,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 @@ -516,7 +518,7 @@ Returns the length of each axis of this basis, as a :ref:`Vector3 # Rotating the Basis in any way preserves its scale. my_basis = my_basis.rotated(Vector3.UP, TAU / 2) my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4) - + print(my_basis.get_scale()) # Prints (2.0, 4.0, 8.0) .. code-tab:: csharp @@ -529,12 +531,12 @@ Returns the length of each axis of this basis, as a :ref:`Vector3 // Rotating the Basis in any way preserves its scale. myBasis = myBasis.Rotated(Vector3.Up, Mathf.Tau / 2.0f); myBasis = myBasis.Rotated(Vector3.Right, Mathf.Tau / 4.0f); - + GD.Print(myBasis.Scale); // Prints (2, 4, 8) -\ **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 +572,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 +584,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 +600,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 @@ -623,7 +627,6 @@ It is often useful to call this method to avoid rounding errors on a rotating ba func _process(delta): basis = basis.rotated(Vector3.UP, TAU * delta) basis = basis.rotated(Vector3.RIGHT, TAU * delta) - basis = basis.orthonormalized() .. code-tab:: csharp @@ -632,8 +635,8 @@ It is often useful to call this method to avoid rounding errors on a rotating ba public override void _Process(double delta) { Basis = Basis.Rotated(Vector3.Up, Mathf.Tau * (float)delta) - .Rotated(Vector3.Right, Mathf.Tau * (float)delta) - .Orthonormalized(); + .Rotated(Vector3.Right, Mathf.Tau * (float)delta) + .Orthonormalized(); } @@ -650,7 +653,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:: @@ -659,7 +662,7 @@ The ``axis`` must be a normalized vector (see :ref:`Vector3.normalized` **scaled_local**\ (\ scale\: :ref:`Vector3`\ ) |const| :ref:`🔗` + +Returns this basis with each axis scaled by the corresponding component in the given ``scale``. + +The basis matrix's columns are multiplied by ``scale``'s components. This operation is a local scale (relative to self). + + +.. tabs:: + + .. code-tab:: gdscript + + var my_basis = Basis( + Vector3(1, 1, 1), + Vector3(2, 2, 2), + Vector3(3, 3, 3) + ) + my_basis = my_basis.scaled_local(Vector3(0, 2, -2)) + + print(my_basis.x) # Prints (0.0, 0.0, 0.0) + print(my_basis.y) # Prints (4.0, 4.0, 4.0) + print(my_basis.z) # Prints (-6.0, -6.0, -6.0) + + .. code-tab:: csharp + + var myBasis = new Basis( + new Vector3(1.0f, 1.0f, 1.0f), + new Vector3(2.0f, 2.0f, 2.0f), + new Vector3(3.0f, 3.0f, 3.0f) + ); + myBasis = myBasis.ScaledLocal(new Vector3(0.0f, 2.0f, -2.0f)); + + GD.Print(myBasis.X); // Prints (0, 0, 0) + GD.Print(myBasis.Y); // Prints (4, 4, 4) + GD.Print(myBasis.Z); // Prints (-6, -6, -6) + + + .. rst-class:: classref-item-separator ---- @@ -738,10 +786,10 @@ Performs a spherical-linear interpolation with the ``to`` basis, given a ``weigh var start_basis = Basis.IDENTITY var target_basis = Basis.IDENTITY.rotated(Vector3.UP, TAU / 2) - + func _ready(): create_tween().tween_method(interpolate, 0.0, 1.0, 5.0).set_trans(Tween.TRANS_EXPO) - + func interpolate(weight): basis = start_basis.slerp(target_basis, weight) @@ -755,7 +803,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 +817,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 +831,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)``. @@ -810,7 +858,7 @@ Returns the transposed version of this basis. This turns the basis matrix's colu Vector3(7, 8, 9) ) my_basis = my_basis.transposed() - + print(my_basis.x) # Prints (1.0, 4.0, 7.0) print(my_basis.y) # Prints (2.0, 5.0, 8.0) print(my_basis.z) # Prints (3.0, 6.0, 9.0) @@ -823,7 +871,7 @@ Returns the transposed version of this basis. This turns the basis matrix's colu new Vector3(7.0f, 8.0f, 9.0f) ); myBasis = myBasis.Transposed(); - + GD.Print(myBasis.X); // Prints (1, 4, 7) GD.Print(myBasis.Y); // Prints (2, 5, 8) GD.Print(myBasis.Z); // Prints (3, 6, 9) @@ -847,7 +895,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 +1000,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 @@ -969,6 +1017,7 @@ Accesses each axis (column) of this basis by their index. Index ``0`` is the sam \ **Note:** In C++, this operator accesses the rows of the basis matrix, *not* the columns. For the same behavior as scripting languages, use the ``set_column`` and ``get_column`` methods. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_bitmap.rst b/classes/class_bitmap.rst index 4ca893127ec..30555c73482 100644 --- a/classes/class_bitmap.rst +++ b/classes/class_bitmap.rst @@ -72,7 +72,7 @@ Method Descriptions :ref:`Image` **convert_to_image**\ (\ ) |const| :ref:`🔗` -Returns an image of the same size as the bitmap and with a :ref:`Format` of type :ref:`Image.FORMAT_L8`. ``true`` bits of the bitmap are being converted into white pixels, and ``false`` bits into black. +Returns an image of the same size as the bitmap and with an :ref:`Format` of type :ref:`Image.FORMAT_L8`. ``true`` bits of the bitmap are being converted into white pixels, and ``false`` bits into black. .. rst-class:: classref-item-separator @@ -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 @@ -227,6 +227,7 @@ Sets a rectangular portion of the bitmap to the specified value. Sets the bitmap's element at the specified position, to the specified value. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_bone2d.rst b/classes/class_bone2d.rst index f13c36ac33f..8d9c7fc3fee 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 @@ -207,6 +207,7 @@ Sets the bone angle for the **Bone2D**. This is typically set to the rotation fr Sets the length of the bone in the **Bone2D**. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_boneattachment3d.rst b/classes/class_boneattachment3d.rst index f006a15a40c..2ff1622d682 100644 --- a/classes/class_boneattachment3d.rst +++ b/classes/class_boneattachment3d.rst @@ -32,13 +32,19 @@ 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:`NodePath` | :ref:`external_skeleton` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`override_pose` | ``false`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_external_skeleton` | ``false`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -48,19 +54,11 @@ Methods .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`get_external_skeleton`\ (\ ) |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Skeleton3D` | :ref:`get_skeleton`\ (\ ) | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_use_external_skeleton`\ (\ ) |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`on_skeleton_update`\ (\ ) | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_external_skeleton`\ (\ external_skeleton\: :ref:`NodePath`\ ) | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_use_external_skeleton`\ (\ use_external_skeleton\: :ref:`bool`\ ) | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-----------------------------------------------------------------------------------+ + | :ref:`Skeleton3D` | :ref:`get_skeleton`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------+ + | |void| | :ref:`on_skeleton_update`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -105,99 +103,86 @@ The name of the attached bone. ---- -.. _class_BoneAttachment3D_property_override_pose: +.. _class_BoneAttachment3D_property_external_skeleton: .. rst-class:: classref-property -:ref:`bool` **override_pose** = ``false`` :ref:`🔗` +:ref:`NodePath` **external_skeleton** :ref:`🔗` .. rst-class:: classref-property-setget -- |void| **set_override_pose**\ (\ value\: :ref:`bool`\ ) -- :ref:`bool` **get_override_pose**\ (\ ) +- |void| **set_external_skeleton**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_external_skeleton**\ (\ ) -Whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to ``true``, the BoneAttachment3D node can change the pose of the bone. When set to ``false``, the BoneAttachment3D will always be set to the bone's transform. +The :ref:`NodePath` to the external :ref:`Skeleton3D` node. -\ **Note:** This override performs interruptively in the skeleton update process using signals due to the old design. It may cause unintended behavior when used at the same time with :ref:`SkeletonModifier3D`. - -.. rst-class:: classref-section-separator +.. rst-class:: classref-item-separator ---- -.. rst-class:: classref-descriptions-group - -Method Descriptions -------------------- - -.. _class_BoneAttachment3D_method_get_external_skeleton: - -.. rst-class:: classref-method - -:ref:`NodePath` **get_external_skeleton**\ (\ ) |const| :ref:`🔗` - -Returns the :ref:`NodePath` to the external :ref:`Skeleton3D` node, if one has been set. +.. _class_BoneAttachment3D_property_override_pose: -.. rst-class:: classref-item-separator +.. rst-class:: classref-property ----- +:ref:`bool` **override_pose** = ``false`` :ref:`🔗` -.. _class_BoneAttachment3D_method_get_skeleton: +.. rst-class:: classref-property-setget -.. rst-class:: classref-method +- |void| **set_override_pose**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_override_pose**\ (\ ) -:ref:`Skeleton3D` **get_skeleton**\ (\ ) :ref:`🔗` +Whether the **BoneAttachment3D** node will override the bone pose of the bone it is attached to. When set to ``true``, the **BoneAttachment3D** node can change the pose of the bone. When set to ``false``, the **BoneAttachment3D** will always be set to the bone's transform. -Get parent or external :ref:`Skeleton3D` node if found. +\ **Note:** This override performs interruptively in the skeleton update process using signals due to the old design. It may cause unintended behavior when used at the same time with :ref:`SkeletonModifier3D`. .. rst-class:: classref-item-separator ---- -.. _class_BoneAttachment3D_method_get_use_external_skeleton: +.. _class_BoneAttachment3D_property_use_external_skeleton: -.. rst-class:: classref-method - -:ref:`bool` **get_use_external_skeleton**\ (\ ) |const| :ref:`🔗` +.. rst-class:: classref-property -Returns whether the BoneAttachment3D node is using an external :ref:`Skeleton3D` rather than attempting to use its parent node as the :ref:`Skeleton3D`. +:ref:`bool` **use_external_skeleton** = ``false`` :ref:`🔗` -.. rst-class:: classref-item-separator - ----- +.. rst-class:: classref-property-setget -.. _class_BoneAttachment3D_method_on_skeleton_update: +- |void| **set_use_external_skeleton**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_use_external_skeleton**\ (\ ) -.. rst-class:: classref-method +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:`external_skeleton`. -|void| **on_skeleton_update**\ (\ ) :ref:`🔗` +.. rst-class:: classref-section-separator -A function that is called automatically when the :ref:`Skeleton3D` is updated. This function is where the **BoneAttachment3D** node updates its position so it is correctly bound when it is *not* set to override the bone pose. +---- -.. rst-class:: classref-item-separator +.. rst-class:: classref-descriptions-group ----- +Method Descriptions +------------------- -.. _class_BoneAttachment3D_method_set_external_skeleton: +.. _class_BoneAttachment3D_method_get_skeleton: .. rst-class:: classref-method -|void| **set_external_skeleton**\ (\ external_skeleton\: :ref:`NodePath`\ ) :ref:`🔗` +:ref:`Skeleton3D` **get_skeleton**\ (\ ) :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. +Returns the parent or external :ref:`Skeleton3D` node if it exists, otherwise returns ``null``. .. rst-class:: classref-item-separator ---- -.. _class_BoneAttachment3D_method_set_use_external_skeleton: +.. _class_BoneAttachment3D_method_on_skeleton_update: .. rst-class:: classref-method -|void| **set_use_external_skeleton**\ (\ use_external_skeleton\: :ref:`bool`\ ) :ref:`🔗` +|void| **on_skeleton_update**\ (\ ) :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`. +A function that is called automatically when the :ref:`Skeleton3D` is updated. This function is where the **BoneAttachment3D** node updates its position so it is correctly bound when it is *not* set to override the bone pose. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_boneconstraint3d.rst b/classes/class_boneconstraint3d.rst new file mode 100644 index 00000000000..87824ca67c3 --- /dev/null +++ b/classes/class_boneconstraint3d.rst @@ -0,0 +1,239 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/BoneConstraint3D.xml. + +.. _class_BoneConstraint3D: + +BoneConstraint3D +================ + +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`AimModifier3D`, :ref:`ConvertTransformModifier3D`, :ref:`CopyTransformModifier3D` + +A node that may modify Skeleton3D's bone with associating the two bones. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class of :ref:`SkeletonModifier3D` that modifies the bone set in :ref:`set_apply_bone()` based on the transform of the bone retrieved by :ref:`get_reference_bone()`. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_setting`\ (\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_amount`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_apply_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_apply_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_reference_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_reference_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_setting_count`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_amount`\ (\ index\: :ref:`int`, amount\: :ref:`float`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_setting_count`\ (\ count\: :ref:`int`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_BoneConstraint3D_method_clear_setting: + +.. rst-class:: classref-method + +|void| **clear_setting**\ (\ ) :ref:`🔗` + +Clear all settings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_amount: + +.. rst-class:: classref-method + +:ref:`float` **get_amount**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the apply amount of the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_apply_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_apply_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the apply bone of the setting at ``index``. This bone will be modified. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_apply_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_apply_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the apply bone name of the setting at ``index``. This bone will be modified. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_reference_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_reference_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the reference bone of the setting at ``index``. + +This bone will be only referenced and not modified by this modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_reference_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_reference_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the reference bone name of the setting at ``index``. + +This bone will be only referenced and not modified by this modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_setting_count: + +.. rst-class:: classref-method + +:ref:`int` **get_setting_count**\ (\ ) |const| :ref:`🔗` + +Returns the number of settings in the modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_amount: + +.. rst-class:: classref-method + +|void| **set_amount**\ (\ index\: :ref:`int`, amount\: :ref:`float`\ ) :ref:`🔗` + +Sets the apply amount of the setting at ``index`` to ``amount``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_apply_bone: + +.. rst-class:: classref-method + +|void| **set_apply_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the apply bone of the setting at ``index`` to ``bone``. This bone will be modified. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_apply_bone_name: + +.. rst-class:: classref-method + +|void| **set_apply_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the apply bone of the setting at ``index`` to ``bone_name``. This bone will be modified. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_reference_bone: + +.. rst-class:: classref-method + +|void| **set_reference_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the reference bone of the setting at ``index`` to ``bone``. + +This bone will be only referenced and not modified by this modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_reference_bone_name: + +.. rst-class:: classref-method + +|void| **set_reference_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the reference bone of the setting at ``index`` to ``bone_name``. + +This bone will be only referenced and not modified by this modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_setting_count: + +.. rst-class:: classref-method + +|void| **set_setting_count**\ (\ count\: :ref:`int`\ ) :ref:`🔗` + +Sets the number of settings in the modifier. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` +.. |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.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_bonemap.rst b/classes/class_bonemap.rst index b2dca3e5080..afd921e0e2f 100644 --- a/classes/class_bonemap.rst +++ b/classes/class_bonemap.rst @@ -157,6 +157,7 @@ Maps a skeleton bone name to ``profile_bone_name``. In the retargeting process, the setting bone name is the bone name of the source skeleton. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_bool.rst b/classes/class_bool.rst index d8b4e0b19f9..5d2f1368d20 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -51,7 +51,7 @@ Booleans can be combined with the logical operators ``and``, ``or``, ``not`` to if bullets > 0 and not is_reloading(): launch_bullet() - + if bullets == 0 or is_reloading(): play_clack_sound() @@ -61,7 +61,7 @@ Booleans can be combined with the logical operators ``and``, ``or``, ``not`` to { LaunchBullet(); } - + if (bullets == 0 || IsReloading()) { PlayClackSound(); @@ -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 @@ -210,6 +210,7 @@ Returns ``true`` if the two booleans are equal. That is, both are ``true`` or bo Returns ``true`` if the left operand is ``true`` and the right operand is ``false``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst index 83c10b9c1ad..f8be4edc5ee 100644 --- a/classes/class_boxcontainer.rst +++ b/classes/class_boxcontainer.rst @@ -183,6 +183,7 @@ Theme Property Descriptions The space between the **BoxContainer**'s elements, in pixels. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_boxmesh.rst b/classes/class_boxmesh.rst index 3fcbdccc4b8..df7d51b19f5 100644 --- a/classes/class_boxmesh.rst +++ b/classes/class_boxmesh.rst @@ -117,6 +117,7 @@ Number of extra edge loops inserted along the Y axis. Number of extra edge loops inserted along the X axis. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_boxoccluder3d.rst b/classes/class_boxoccluder3d.rst index 15c8a76c077..f5de50607d0 100644 --- a/classes/class_boxoccluder3d.rst +++ b/classes/class_boxoccluder3d.rst @@ -65,6 +65,7 @@ Property Descriptions The box's size in 3D units. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_boxshape3d.rst b/classes/class_boxshape3d.rst index 0a57f3f20a5..4ec510f6a6c 100644 --- a/classes/class_boxshape3d.rst +++ b/classes/class_boxshape3d.rst @@ -69,6 +69,7 @@ Property Descriptions The box's width, height and depth. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_button.rst b/classes/class_button.rst index 82b5b4476b9..ff9dd671253 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -35,7 +35,7 @@ Description button.text = "Click me" button.pressed.connect(_button_pressed) add_child(button) - + func _button_pressed(): print("Hello world!") @@ -48,7 +48,7 @@ Description button.Pressed += ButtonPressed; AddChild(button); } - + private void ButtonPressed() { GD.Print("Hello world!"); @@ -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`` | @@ -197,7 +199,7 @@ Property Descriptions - |void| **set_text_alignment**\ (\ value\: :ref:`HorizontalAlignment`\ ) - :ref:`HorizontalAlignment` **get_text_alignment**\ (\ ) -Text alignment policy for the button's text, use one of the :ref:`HorizontalAlignment` constants. +Text alignment policy for the button's text. .. rst-class:: classref-item-separator @@ -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 @@ -369,7 +388,7 @@ Base text writing direction. - |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior`\ ) - :ref:`OverrunBehavior` **get_text_overrun_behavior**\ (\ ) -Sets the clipping behavior when the text exceeds the node's bounding rectangle. See :ref:`OverrunBehavior` for a description of all modes. +Sets the clipping behavior when the text exceeds the node's bounding rectangle. .. rst-class:: classref-item-separator @@ -780,6 +799,7 @@ Default :ref:`StyleBox` for the **Button** (for right-to-left la :ref:`StyleBox` used when the **Button** is being pressed (for right-to-left layouts). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_buttongroup.rst b/classes/class_buttongroup.rst index 628670a0f03..040ca26b0f3 100644 --- a/classes/class_buttongroup.rst +++ b/classes/class_buttongroup.rst @@ -120,6 +120,7 @@ Returns an :ref:`Array` of :ref:`Button`\ s who have Returns the current pressed button. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_callable.rst b/classes/class_callable.rst index 7a027e9b2fc..9cfbbd6e4fc 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:: @@ -26,11 +26,11 @@ Description func print_args(arg1, arg2, arg3 = ""): prints(arg1, arg2, arg3) - + 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 @@ -40,29 +40,29 @@ Description { GD.PrintS(arg1, arg2, arg3); } - + public void Test() { // 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()`. :: func _init(): 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. button_pressed.connect(func(): print("Attack!")) @@ -78,11 +78,11 @@ In GDScript, you can access methods and global functions as **Callable**\ s: :: - var dictionary = {"hello": "world"} - + var dictionary = { "hello": "world" } + # This will not work, `clear` is treated as a key. tween.tween_callback(dictionary.clear) - + # This will work. tween.tween_callback(Callable.create(dictionary, "clear")) @@ -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. @@ -557,6 +557,7 @@ Returns ``true`` if both **Callable**\ s invoke different targets. Returns ``true`` if both **Callable**\ s invoke the same custom target. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_callbacktweener.rst b/classes/class_callbacktweener.rst index 3a4a337c54b..c476fb6bc1a 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: :: @@ -62,6 +62,7 @@ Makes the callback call delayed by given time in seconds. tween.tween_callback(queue_free).set_delay(2) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index f8ccb5c3ae0..2db3c068e38 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 :ref:`Node2D.global_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. Same for the node's :ref:`Node2D.global_rotation` which may be different due to applied rotation smoothing. You can use :ref:`get_screen_rotation()` to get the current rotation of the screen. .. 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`` | @@ -119,6 +121,8 @@ Methods +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_screen_center_position`\ (\ ) |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_screen_rotation`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_target_position`\ (\ ) |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_current`\ (\ ) |const| | @@ -209,7 +213,7 @@ Property Descriptions - |void| **set_anchor_mode**\ (\ value\: :ref:`AnchorMode`\ ) - :ref:`AnchorMode` **get_anchor_mode**\ (\ ) -The Camera2D's anchor point. See :ref:`AnchorMode` constants. +The Camera2D's anchor point. .. rst-class:: classref-item-separator @@ -434,7 +438,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 +480,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 +546,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 @@ -610,7 +631,7 @@ Speed in pixels per second of the camera's smoothing effect when :ref:`position_ - |void| **set_process_callback**\ (\ value\: :ref:`Camera2DProcessCallback`\ ) - :ref:`Camera2DProcessCallback` **get_process_callback**\ (\ ) -The camera's process callback. See :ref:`Camera2DProcessCallback`. +The camera's process callback. .. rst-class:: classref-item-separator @@ -663,7 +684,7 @@ The angular, asymptotic speed of the camera's rotation smoothing effect when :re - |void| **set_zoom**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_zoom**\ (\ ) -The camera's zoom. A zoom of ``Vector(2, 2)`` doubles the size seen in the viewport. A zoom of ``Vector(0.5, 0.5)`` halves the size seen in the viewport. +The camera's zoom. Higher values are more zoomed in. For example, a zoom of ``Vector2(2.0, 2.0)`` will be twice as zoomed in on each axis (the view covers an area four times smaller). In contrast, a zoom of ``Vector2(0.5, 0.5)`` will be twice as zoomed out on each axis (the view covers an area four times larger). The X and Y components should generally always be set to the same value, unless you wish to stretch the camera view. \ **Note:** :ref:`FontFile.oversampling` does *not* take **Camera2D** zoom into account. This means that zooming in/out will cause bitmap fonts and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated unless the font is part of a :ref:`CanvasLayer` that makes it ignore camera zoom. To ensure text remains crisp regardless of zoom, you can enable MSDF font rendering by enabling :ref:`ProjectSettings.gui/theme/default_font_multichannel_signed_distance_field` (applies to the default project font only), or enabling **Multichannel Signed Distance Field** in the import options of a DynamicFont for custom fonts. On system fonts, :ref:`SystemFont.multichannel_signed_distance_field` can be enabled in the inspector. @@ -732,7 +753,21 @@ 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 + +---- + +.. _class_Camera2D_method_get_screen_rotation: + +.. rst-class:: classref-method + +:ref:`float` **get_screen_rotation**\ (\ ) |const| :ref:`🔗` + +Returns the current screen rotation from this camera's point of view. + +\ **Note:** The screen rotation can be different from :ref:`Node2D.global_rotation` if the camera is rotating smoothly due to :ref:`rotation_smoothing_enabled`. .. rst-class:: classref-item-separator @@ -746,7 +781,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 +793,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 @@ -811,6 +846,7 @@ Sets the specified :ref:`Side`'s margin. See also :ref:` Sets the camera limit for the specified :ref:`Side`. See also :ref:`limit_bottom`, :ref:`limit_top`, :ref:`limit_left`, and :ref:`limit_right`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_camera3d.rst b/classes/class_camera3d.rst index a3649be8a13..0f75912a71b 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. @@ -313,7 +313,7 @@ If multiple cameras are in the scene, one will always be made current. For examp - |void| **set_doppler_tracking**\ (\ value\: :ref:`DopplerTracking`\ ) - :ref:`DopplerTracking` **get_doppler_tracking**\ (\ ) -If not :ref:`DOPPLER_TRACKING_DISABLED`, this camera will simulate the `Doppler effect `__ for objects changed in particular ``_process`` methods. See :ref:`DopplerTracking` for possible values. +If not :ref:`DOPPLER_TRACKING_DISABLED`, this camera will simulate the `Doppler effect `__ for objects changed in particular ``_process`` methods. .. rst-class:: classref-item-separator @@ -706,7 +706,9 @@ Sets the camera projection to frustum mode (see :ref:`PROJECTION_FRUSTUM`, z_near\: :ref:`float`, z_far\: :ref:`float`\ ) :ref:`🔗` -Sets the camera projection to orthogonal mode (see :ref:`PROJECTION_ORTHOGONAL`), by specifying a ``size``, and the ``z_near`` and ``z_far`` clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.) +Sets the camera projection to orthogonal mode (see :ref:`PROJECTION_ORTHOGONAL`), by specifying a ``size``, and the ``z_near`` and ``z_far`` clip planes in world space units. + +As a hint, 3D games that look 2D often use this projection, with ``size`` specified in pixels. .. rst-class:: classref-item-separator @@ -732,7 +734,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: :: @@ -742,6 +744,7 @@ Returns the 2D coordinate in the :ref:`Viewport` rectangle that control.position = get_viewport().get_camera_3d().unproject_position(global_transform.origin) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cameraattributes.rst b/classes/class_cameraattributes.rst index 9e2f95fc631..d79914732cc 100644 --- a/classes/class_cameraattributes.rst +++ b/classes/class_cameraattributes.rst @@ -144,6 +144,7 @@ If :ref:`auto_exposure_enabled` is enabled. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cameraattributesphysical.rst b/classes/class_cameraattributesphysical.rst index eeb4e4925b6..529fd930152 100644 --- a/classes/class_cameraattributesphysical.rst +++ b/classes/class_cameraattributesphysical.rst @@ -235,6 +235,7 @@ Method Descriptions Returns the vertical field of view that corresponds to the :ref:`frustum_focal_length`. This value is calculated internally whenever :ref:`frustum_focal_length` is changed. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cameraattributespractical.rst b/classes/class_cameraattributespractical.rst index b00d77cc505..6165549637a 100644 --- a/classes/class_cameraattributespractical.rst +++ b/classes/class_cameraattributespractical.rst @@ -214,6 +214,7 @@ Enables depth of field blur for objects closer than :ref:`dof_blur_near_distance When positive, distance over which blur effect will scale from 0 to :ref:`dof_blur_amount`, ending at :ref:`dof_blur_near_distance`. When negative, uses physically-based scaling so depth of field effect will scale from 0 at :ref:`dof_blur_near_distance` and will increase in a physically accurate way as objects get closer to the :ref:`Camera3D`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_camerafeed.rst b/classes/class_camerafeed.rst index 99d331c9a8c..6637b690928 100644 --- a/classes/class_camerafeed.rst +++ b/classes/class_camerafeed.rst @@ -23,7 +23,7 @@ A camera feed gives you access to a single physical camera attached to your devi \ **Note:** Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Redot does this automatically for you if you set the environment to show the camera image in the background. -\ **Note:** This class is currently only implemented on Linux, macOS, and iOS. On other platforms no **CameraFeed**\ s will be available. To get a **CameraFeed** on iOS, the camera plugin from `godot-ios-plugins `__ is required. +\ **Note:** This class is currently only implemented on Linux, Android, macOS, and iOS. On other platforms no **CameraFeed**\ s will be available. To get a **CameraFeed** on iOS, the camera plugin from `godot-ios-plugins `__ is required. .. rst-class:: classref-reftable-group @@ -361,13 +361,13 @@ Sets the feed as external feed provided by another library. :ref:`bool` **set_format**\ (\ index\: :ref:`int`, parameters\: :ref:`Dictionary`\ ) :ref:`🔗` -Sets the feed format parameters for the given index in the :ref:`formats` array. Returns ``true`` on success. By default YUYV encoded stream is transformed to FEED_RGB. YUYV encoded stream output format can be changed with ``parameters``.output value: +Sets the feed format parameters for the given ``index`` in the :ref:`formats` array. Returns ``true`` on success. By default, the YUYV encoded stream is transformed to :ref:`FEED_RGB`. The YUYV encoded stream output format can be changed by setting ``parameters``'s ``output`` entry to one of the following: -\ ``separate`` will result in FEED_YCBCR_SEP +- ``"separate"`` will result in :ref:`FEED_YCBCR_SEP`; -\ ``grayscale`` will result in desaturated FEED_RGB +- ``"grayscale"`` will result in desaturated :ref:`FEED_RGB`; -\ ``copy`` will result in FEED_YCBCR +- ``"copy"`` will result in :ref:`FEED_YCBCR`. .. rst-class:: classref-item-separator @@ -418,6 +418,7 @@ Sets RGB image for this feed. Sets YCbCr image for this feed. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cameraserver.rst b/classes/class_cameraserver.rst index c5542f95298..d99179808b7 100644 --- a/classes/class_cameraserver.rst +++ b/classes/class_cameraserver.rst @@ -23,7 +23,19 @@ The **CameraServer** keeps track of different cameras accessible in Redot. These It is notably used to provide AR modules with a video feed from the camera. -\ **Note:** This class is currently only implemented on Linux, macOS, and iOS. On other platforms no :ref:`CameraFeed`\ s will be available. To get a :ref:`CameraFeed` on iOS, the camera plugin from `godot-ios-plugins `__ is required. +\ **Note:** This class is currently only implemented on Linux, Android, macOS, and iOS. On other platforms no :ref:`CameraFeed`\ s will be available. To get a :ref:`CameraFeed` on iOS, the camera plugin from `godot-ios-plugins `__ is required. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-------------------------+-----------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`monitoring_feeds` | ``false`` | + +-------------------------+-----------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -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 ------------------- @@ -187,6 +223,7 @@ Returns the number of :ref:`CameraFeed`\ s registered. Removes the specified camera ``feed``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cameratexture.rst b/classes/class_cameratexture.rst index ae522406b4f..f81dcbf4f16 100644 --- a/classes/class_cameratexture.rst +++ b/classes/class_cameratexture.rst @@ -98,6 +98,7 @@ Convenience property that gives access to the active property of the :ref:`Camer Which image within the :ref:`CameraFeed` we want access to, important if the camera image is split in a Y and CbCr component. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvasgroup.rst b/classes/class_canvasgroup.rst index 1160ec85751..422e3946a1e 100644 --- a/classes/class_canvasgroup.rst +++ b/classes/class_canvasgroup.rst @@ -27,16 +27,16 @@ Child :ref:`CanvasItem` nodes of a **CanvasGroup** are drawn a shader_type canvas_item; render_mode unshaded; - + uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest; - + void fragment() { vec4 c = textureLod(screen_texture, SCREEN_UV, 0.0); - + if (c.a > 0.0001) { c.rgb /= c.a; } - + COLOR *= c; } @@ -115,6 +115,7 @@ Sets the size of a margin used to expand the drawable rect of this **CanvasGroup If ``true``, calculates mipmaps for the backbuffer before drawing the **CanvasGroup** so that mipmaps can be used in a custom :ref:`ShaderMaterial` attached to the **CanvasGroup**. Generating mipmaps has a performance cost so this should not be enabled unless required. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 54e0b6f33e8..5d66304e9e4 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. Sampling the texture outside its extents will result in "stretching" of the edge pixels. You can avoid this by ensuring a 1-pixel fully transparent border on each side of the texture. .. _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,9 @@ 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). It affects what happens when the texture is sampled outside its extents, for example by setting a :ref:`Sprite2D.region_rect` that is larger than the texture or assigning :ref:`Polygon2D` UV points outside the texture. + +\ **Note:** :ref:`TextureRect` is not affected by :ref:`texture_repeat`, as it uses its own texture repeating implementation. .. rst-class:: classref-item-separator @@ -688,7 +698,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 +732,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 +772,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 +791,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 +810,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 +836,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 +850,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 +862,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 +876,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 +896,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 +910,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 +930,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 +963,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``. @@ -975,7 +989,7 @@ Draws a :ref:`Mesh` in 2D, using the provided texture. See :ref:`Mes |void| **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\ ) :ref:`🔗` -Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. See :ref:`FontFile.multichannel_signed_distance_field` for more information and caveats about MSDF font rendering. +Draws a textured rectangle region of the multichannel signed distance field texture at a given position, optionally modulated by a color. See :ref:`FontFile.multichannel_signed_distance_field` for more information and caveats about MSDF font rendering. If ``outline`` is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the ``outline`` radius. @@ -991,7 +1005,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 +1021,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 +1035,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 +1047,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 +1073,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 +1087,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 +1101,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 +1115,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 +1127,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 +1171,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 +1200,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 +1210,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 +1248,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 +1260,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 +1272,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 +1286,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 +1298,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 +1322,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 +1334,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 +1398,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 +1410,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 +1422,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 +1434,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 +1446,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 +1458,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 +1484,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 +1496,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 +1508,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 +1526,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 +1542,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 +1554,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 +1566,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 +1578,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 +1594,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 +1608,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,9 +1634,12 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvasitemmaterial.rst b/classes/class_canvasitemmaterial.rst index c0bd9c53bf2..0b2825aed87 100644 --- a/classes/class_canvasitemmaterial.rst +++ b/classes/class_canvasitemmaterial.rst @@ -248,6 +248,7 @@ If ``true``, enable spritesheet-based animation features when assigned to :ref:` This property (and other ``particles_anim_*`` properties that depend on it) has no effect on other types of nodes. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index f95e14b7137..c06f7b315bc 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. @@ -180,6 +180,8 @@ Layer index for draw order. Lower values are drawn behind higher values. \ **Note:** If multiple CanvasLayers have the same layer index, :ref:`CanvasItem` children of one CanvasLayer are drawn behind the :ref:`CanvasItem` children of the other CanvasLayer. Which CanvasLayer is drawn in front is non-deterministic. +\ **Note:** The layer index should be between :ref:`RenderingServer.CANVAS_LAYER_MIN` and :ref:`RenderingServer.CANVAS_LAYER_MAX` (inclusive). Any other value will wrap around. + .. rst-class:: classref-item-separator ---- @@ -321,6 +323,7 @@ Hides any :ref:`CanvasItem` under this **CanvasLayer**. This i Shows any :ref:`CanvasItem` under this **CanvasLayer**. This is equivalent to setting :ref:`visible` to ``true``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvasmodulate.rst b/classes/class_canvasmodulate.rst index 14c596d2137..dbaca465200 100644 --- a/classes/class_canvasmodulate.rst +++ b/classes/class_canvasmodulate.rst @@ -66,6 +66,7 @@ Property Descriptions The tint color to apply. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvastexture.rst b/classes/class_canvastexture.rst index cf7ec2d5e5f..40184b32228 100644 --- a/classes/class_canvastexture.rst +++ b/classes/class_canvastexture.rst @@ -183,6 +183,7 @@ The texture filtering mode to use when drawing this **CanvasTexture**. The texture repeat mode to use when drawing this **CanvasTexture**. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_capsulemesh.rst b/classes/class_capsulemesh.rst index 66b23551b9d..b03e3899994 100644 --- a/classes/class_capsulemesh.rst +++ b/classes/class_capsulemesh.rst @@ -61,6 +61,8 @@ Property Descriptions Total height of the capsule mesh (including the hemispherical ends). +\ **Note:** The :ref:`height` of a capsule must be at least twice its :ref:`radius`. Otherwise, the capsule becomes a circle. If the :ref:`height` is less than twice the :ref:`radius`, the properties adjust to a valid value. + .. rst-class:: classref-item-separator ---- @@ -95,6 +97,8 @@ Number of radial segments on the capsule mesh. Radius of the capsule mesh. +\ **Note:** The :ref:`radius` of a capsule cannot be greater than half of its :ref:`height`. Otherwise, the capsule becomes a circle. If the :ref:`radius` is greater than half of the :ref:`height`, the properties adjust to a valid value. + .. rst-class:: classref-item-separator ---- @@ -113,6 +117,7 @@ Radius of the capsule mesh. Number of rings along the height of the capsule. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_capsuleshape2d.rst b/classes/class_capsuleshape2d.rst index 8ec56803b03..d34f88743eb 100644 --- a/classes/class_capsuleshape2d.rst +++ b/classes/class_capsuleshape2d.rst @@ -31,11 +31,13 @@ Properties .. table:: :widths: auto - +---------------------------+-----------------------------------------------------+----------+ - | :ref:`float` | :ref:`height` | ``30.0`` | - +---------------------------+-----------------------------------------------------+----------+ - | :ref:`float` | :ref:`radius` | ``10.0`` | - +---------------------------+-----------------------------------------------------+----------+ + +---------------------------+-------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`height` | ``30.0`` | + +---------------------------+-------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`mid_height` | | + +---------------------------+-------------------------------------------------------------+----------+ + | :ref:`float` | :ref:`radius` | ``10.0`` | + +---------------------------+-------------------------------------------------------------+----------+ .. rst-class:: classref-section-separator @@ -57,7 +59,26 @@ Property Descriptions - |void| **set_height**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_height**\ (\ ) -The capsule's height. +The capsule's full height, including the semicircles. + +\ **Note:** The :ref:`height` of a capsule must be at least twice its :ref:`radius`. Otherwise, the capsule becomes a circle. If the :ref:`height` is less than twice the :ref:`radius`, the properties adjust to a valid value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CapsuleShape2D_property_mid_height: + +.. rst-class:: classref-property + +:ref:`float` **mid_height** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mid_height**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mid_height**\ (\ ) + +The capsule's height, excluding the semicircles. This is the height of the central rectangular part in the middle of the capsule, and is the distance between the centers of the two semicircles. This is a wrapper for :ref:`height`. .. rst-class:: classref-item-separator @@ -76,7 +97,10 @@ The capsule's height. The capsule's radius. +\ **Note:** The :ref:`radius` of a capsule cannot be greater than half of its :ref:`height`. Otherwise, the capsule becomes a circle. If the :ref:`radius` is greater than half of the :ref:`height`, the properties adjust to a valid value. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_capsuleshape3d.rst b/classes/class_capsuleshape3d.rst index db98edb0eb7..27507f4742e 100644 --- a/classes/class_capsuleshape3d.rst +++ b/classes/class_capsuleshape3d.rst @@ -38,11 +38,13 @@ Properties .. table:: :widths: auto - +---------------------------+-----------------------------------------------------+---------+ - | :ref:`float` | :ref:`height` | ``2.0`` | - +---------------------------+-----------------------------------------------------+---------+ - | :ref:`float` | :ref:`radius` | ``0.5`` | - +---------------------------+-----------------------------------------------------+---------+ + +---------------------------+-------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`height` | ``2.0`` | + +---------------------------+-------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`mid_height` | | + +---------------------------+-------------------------------------------------------------+---------+ + | :ref:`float` | :ref:`radius` | ``0.5`` | + +---------------------------+-------------------------------------------------------------+---------+ .. rst-class:: classref-section-separator @@ -64,7 +66,26 @@ Property Descriptions - |void| **set_height**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_height**\ (\ ) -The capsule's height. +The capsule's full height, including the hemispheres. + +\ **Note:** The :ref:`height` of a capsule must be at least twice its :ref:`radius`. Otherwise, the capsule becomes a sphere. If the :ref:`height` is less than twice the :ref:`radius`, the properties adjust to a valid value. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CapsuleShape3D_property_mid_height: + +.. rst-class:: classref-property + +:ref:`float` **mid_height** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_mid_height**\ (\ value\: :ref:`float`\ ) +- :ref:`float` **get_mid_height**\ (\ ) + +The capsule's height, excluding the hemispheres. This is the height of the central cylindrical part in the middle of the capsule, and is the distance between the centers of the two hemispheres. This is a wrapper for :ref:`height`. .. rst-class:: classref-item-separator @@ -83,7 +104,10 @@ The capsule's height. The capsule's radius. +\ **Note:** The :ref:`radius` of a capsule cannot be greater than half of its :ref:`height`. Otherwise, the capsule becomes a sphere. If the :ref:`radius` is greater than half of the :ref:`height`, the properties adjust to a valid value. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_centercontainer.rst b/classes/class_centercontainer.rst index cfa2e1df3da..ce8fd635e86 100644 --- a/classes/class_centercontainer.rst +++ b/classes/class_centercontainer.rst @@ -63,6 +63,7 @@ Property Descriptions If ``true``, centers children relative to the **CenterContainer**'s top left corner. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index 574000152c6..f704ade9319 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. @@ -49,7 +49,7 @@ Properties +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ | :ref:`bool` | :ref:`floor_constant_speed` | ``false`` | +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`floor_max_angle` | ``0.785398`` | + | :ref:`float` | :ref:`floor_max_angle` | ``0.7853982`` | +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ | :ref:`float` | :ref:`floor_snap_length` | ``1.0`` | +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ @@ -73,7 +73,7 @@ Properties +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ | :ref:`Vector2` | :ref:`velocity` | ``Vector2(0, 0)`` | +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ - | :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | + | :ref:`float` | :ref:`wall_min_slide_angle` | ``0.2617994`` | +--------------------------------------------------------------+------------------------------------------------------------------------------------+--------------------+ .. rst-class:: classref-reftable-group @@ -236,14 +236,14 @@ If ``true``, the body will always move at the same speed on the ground no matter .. rst-class:: classref-property -:ref:`float` **floor_max_angle** = ``0.785398`` :ref:`🔗` +:ref:`float` **floor_max_angle** = ``0.7853982`` :ref:`🔗` .. rst-class:: classref-property-setget - |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()`. .. rst-class:: classref-item-separator @@ -349,7 +349,7 @@ Collision layers that will be included for detecting floor bodies that will act - |void| **set_platform_on_leave**\ (\ value\: :ref:`PlatformOnLeave`\ ) - :ref:`PlatformOnLeave` **get_platform_on_leave**\ (\ ) -Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See :ref:`PlatformOnLeave` constants for available behavior. +Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. .. 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 @@ -450,14 +450,14 @@ Current velocity vector in pixels per second, used and modified during calls to .. rst-class:: classref-property -:ref:`float` **wall_min_slide_angle** = ``0.261799`` :ref:`🔗` +:ref:`float` **wall_min_slide_angle** = ``0.2617994`` :ref:`🔗` .. rst-class:: classref-property-setget - |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. @@ -714,6 +714,7 @@ The general behavior and available properties change according to the :ref:`moti Returns ``true`` if the body collided, otherwise, returns ``false``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index 019cbf75829..c683b17275c 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. @@ -51,7 +51,7 @@ Properties +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ | :ref:`bool` | :ref:`floor_constant_speed` | ``false`` | +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ - | :ref:`float` | :ref:`floor_max_angle` | ``0.785398`` | + | :ref:`float` | :ref:`floor_max_angle` | ``0.7853982`` | +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ | :ref:`float` | :ref:`floor_snap_length` | ``0.1`` | +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ @@ -75,7 +75,7 @@ Properties +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ | :ref:`Vector3` | :ref:`velocity` | ``Vector3(0, 0, 0)`` | +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ - | :ref:`float` | :ref:`wall_min_slide_angle` | ``0.261799`` | + | :ref:`float` | :ref:`wall_min_slide_angle` | ``0.2617994`` | +--------------------------------------------------------------+------------------------------------------------------------------------------------+----------------------+ .. rst-class:: classref-reftable-group @@ -240,14 +240,14 @@ If ``true``, the body will always move at the same speed on the ground no matter .. rst-class:: classref-property -:ref:`float` **floor_max_angle** = ``0.785398`` :ref:`🔗` +:ref:`float` **floor_max_angle** = ``0.7853982`` :ref:`🔗` .. rst-class:: classref-property-setget - |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()`. .. rst-class:: classref-item-separator @@ -353,7 +353,7 @@ Collision layers that will be included for detecting floor bodies that will act - |void| **set_platform_on_leave**\ (\ value\: :ref:`PlatformOnLeave`\ ) - :ref:`PlatformOnLeave` **get_platform_on_leave**\ (\ ) -Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See :ref:`PlatformOnLeave` constants for available behavior. +Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. .. 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 @@ -454,14 +454,14 @@ Current velocity vector (typically meters per second), used and modified during .. rst-class:: classref-property -:ref:`float` **wall_min_slide_angle** = ``0.261799`` :ref:`🔗` +:ref:`float` **wall_min_slide_angle** = ``0.2617994`` :ref:`🔗` .. rst-class:: classref-property-setget - |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,13 +700,14 @@ 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. Returns ``true`` if the body collided, otherwise, returns ``false``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_charfxtransform.rst b/classes/class_charfxtransform.rst index 9f5e4d814eb..371c539231c 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 @@ -299,6 +311,7 @@ The current transform of the current glyph. It can be overridden (for example, b If ``true``, the character will be drawn. If ``false``, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their :ref:`color` to ``Color(1, 1, 1, 0)`` instead. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index f1f07e62f47..f4f4f5a7639 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 @@ -181,6 +209,7 @@ The check icon to display when the **CheckBox** is unchecked. The check icon to display when the **CheckBox** is unchecked and is disabled. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst index 3247231a914..712defd84f9 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 @@ -179,6 +207,7 @@ The icon to display when the **CheckButton** is unchecked and disabled (for righ The icon to display when the **CheckButton** is unchecked (for right-to-left layouts). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_circleshape2d.rst b/classes/class_circleshape2d.rst index 13eb16dbdf9..e615bdf7b51 100644 --- a/classes/class_circleshape2d.rst +++ b/classes/class_circleshape2d.rst @@ -58,6 +58,7 @@ Property Descriptions The circle's radius. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index fe22f5ca677..f46f83b355d 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -197,7 +197,7 @@ Returns whether the specified ``class`` is available or not. :ref:`APIType` **class_get_api_type**\ (\ class\: :ref:`StringName`\ ) |const| :ref:`🔗` -Returns the API type of ``class``. See :ref:`APIType`. +Returns the API type of the specified ``class``. .. rst-class:: classref-item-separator @@ -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 @@ -514,6 +514,7 @@ Returns whether ``class`` (or its ancestor classes if ``no_inheritance`` is ``fa Returns whether ``inherits`` is an ancestor of ``class`` or not. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index 9fd7cea2690..a6ab1d935c4 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 an :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. @@ -2084,6 +2084,7 @@ Sets a custom :ref:`Texture2D` to draw at the end of a folded l :ref:`StyleBox` for the code completion popup. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_codehighlighter.rst b/classes/class_codehighlighter.rst index 3642db6358f..f680a9c7a67 100644 --- a/classes/class_codehighlighter.rst +++ b/classes/class_codehighlighter.rst @@ -389,6 +389,7 @@ Removes the keyword. Removes the member keyword. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index 99aef5b6645..7e04033fde6 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 @@ -300,7 +300,7 @@ The priority used to solve colliding when occurring penetration. The higher the - |void| **set_disable_mode**\ (\ value\: :ref:`DisableMode`\ ) - :ref:`DisableMode` **get_disable_mode**\ (\ ) -Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. See :ref:`DisableMode` for more details about the different modes. +Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. .. 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 @@ -675,6 +675,7 @@ Sets the ``one_way_collision_margin`` of the shape owner identified by given ``o Sets the :ref:`Transform2D` of the given shape owner. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionobject3d.rst b/classes/class_collisionobject3d.rst index 6fc0ad981ef..17711701f2c 100644 --- a/classes/class_collisionobject3d.rst +++ b/classes/class_collisionobject3d.rst @@ -266,7 +266,7 @@ The priority used to solve colliding when occurring penetration. The higher the - |void| **set_disable_mode**\ (\ value\: :ref:`DisableMode`\ ) - :ref:`DisableMode` **get_disable_mode**\ (\ ) -Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. See :ref:`DisableMode` for more details about the different modes. +Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. .. rst-class:: classref-item-separator @@ -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 @@ -586,6 +586,7 @@ If ``true``, disables the given shape owner. Sets the :ref:`Transform3D` of the given shape owner. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index 53510d3dc51..3c6cf7aa3a3 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 @@ -94,7 +94,7 @@ Property Descriptions - |void| **set_build_mode**\ (\ value\: :ref:`BuildMode`\ ) - :ref:`BuildMode` **get_build_mode**\ (\ ) -Collision build mode. Use one of the :ref:`BuildMode` constants. +Collision build mode. .. rst-class:: classref-item-separator @@ -111,7 +111,7 @@ Collision build mode. Use one of the :ref:`BuildMode`\ ) - :ref:`bool` **is_disabled**\ (\ ) -If ``true``, no collisions will be detected. +If ``true``, no collisions will be detected. This property should be changed with :ref:`Object.set_deferred()`. .. rst-class:: classref-item-separator @@ -171,6 +171,7 @@ The polygon's list of vertices. Each point will be connected to the next, and th **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionpolygon3d.rst b/classes/class_collisionpolygon3d.rst index 578f53fe51f..aa4ca8b9bbc 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 @@ -78,7 +118,7 @@ Length that the resulting collision extends in either direction perpendicular to - |void| **set_disabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_disabled**\ (\ ) -If ``true``, no collision will be produced. +If ``true``, no collision will be produced. This property should be changed with :ref:`Object.set_deferred()`. .. rst-class:: classref-item-separator @@ -117,6 +157,7 @@ Array of vertices which define the 2D polygon in the local XY plane. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index 69abc486149..7fc51fc8b2b 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 @@ -149,6 +149,7 @@ The margin used for one-way collision (in pixels). Higher values will make the s The actual shape owned by this collision shape. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionshape3d.rst b/classes/class_collisionshape3d.rst index b8b337ab08f..9b039901fb7 100644 --- a/classes/class_collisionshape3d.rst +++ b/classes/class_collisionshape3d.rst @@ -124,7 +124,7 @@ If ``true``, when the shape is displayed, it will show a solid fill color in add - |void| **set_disabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_disabled**\ (\ ) -A disabled collision shape has no effect in the world. +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 @@ -175,6 +175,7 @@ Sets the collision shape's shape to the addition of all its convexed :ref:`MeshI This method does nothing. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_color.rst b/classes/class_color.rst index 09fbc3e1caf..daf3b9c2ddb 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| | @@ -211,7 +215,7 @@ Constants .. rst-class:: classref-constant -**ALICE_BLUE** = ``Color(0.941176, 0.972549, 1, 1)`` :ref:`🔗` +**ALICE_BLUE** = ``Color(0.9411765, 0.972549, 1, 1)`` :ref:`🔗` Alice blue color. @@ -219,7 +223,7 @@ Alice blue color. .. rst-class:: classref-constant -**ANTIQUE_WHITE** = ``Color(0.980392, 0.921569, 0.843137, 1)`` :ref:`🔗` +**ANTIQUE_WHITE** = ``Color(0.98039216, 0.92156863, 0.84313726, 1)`` :ref:`🔗` Antique white color. @@ -235,7 +239,7 @@ Aqua color. .. rst-class:: classref-constant -**AQUAMARINE** = ``Color(0.498039, 1, 0.831373, 1)`` :ref:`🔗` +**AQUAMARINE** = ``Color(0.49803922, 1, 0.83137256, 1)`` :ref:`🔗` Aquamarine color. @@ -243,7 +247,7 @@ Aquamarine color. .. rst-class:: classref-constant -**AZURE** = ``Color(0.941176, 1, 1, 1)`` :ref:`🔗` +**AZURE** = ``Color(0.9411765, 1, 1, 1)`` :ref:`🔗` Azure color. @@ -251,7 +255,7 @@ Azure color. .. rst-class:: classref-constant -**BEIGE** = ``Color(0.960784, 0.960784, 0.862745, 1)`` :ref:`🔗` +**BEIGE** = ``Color(0.9607843, 0.9607843, 0.8627451, 1)`` :ref:`🔗` Beige color. @@ -259,7 +263,7 @@ Beige color. .. rst-class:: classref-constant -**BISQUE** = ``Color(1, 0.894118, 0.768627, 1)`` :ref:`🔗` +**BISQUE** = ``Color(1, 0.89411765, 0.76862746, 1)`` :ref:`🔗` Bisque color. @@ -275,7 +279,7 @@ Black color. In GDScript, this is the default value of any color. .. rst-class:: classref-constant -**BLANCHED_ALMOND** = ``Color(1, 0.921569, 0.803922, 1)`` :ref:`🔗` +**BLANCHED_ALMOND** = ``Color(1, 0.92156863, 0.8039216, 1)`` :ref:`🔗` Blanched almond color. @@ -291,7 +295,7 @@ Blue color. .. rst-class:: classref-constant -**BLUE_VIOLET** = ``Color(0.541176, 0.168627, 0.886275, 1)`` :ref:`🔗` +**BLUE_VIOLET** = ``Color(0.5411765, 0.16862746, 0.8862745, 1)`` :ref:`🔗` Blue violet color. @@ -299,7 +303,7 @@ Blue violet color. .. rst-class:: classref-constant -**BROWN** = ``Color(0.647059, 0.164706, 0.164706, 1)`` :ref:`🔗` +**BROWN** = ``Color(0.64705884, 0.16470589, 0.16470589, 1)`` :ref:`🔗` Brown color. @@ -307,7 +311,7 @@ Brown color. .. rst-class:: classref-constant -**BURLYWOOD** = ``Color(0.870588, 0.721569, 0.529412, 1)`` :ref:`🔗` +**BURLYWOOD** = ``Color(0.87058824, 0.72156864, 0.5294118, 1)`` :ref:`🔗` Burlywood color. @@ -315,7 +319,7 @@ Burlywood color. .. rst-class:: classref-constant -**CADET_BLUE** = ``Color(0.372549, 0.619608, 0.627451, 1)`` :ref:`🔗` +**CADET_BLUE** = ``Color(0.37254903, 0.61960787, 0.627451, 1)`` :ref:`🔗` Cadet blue color. @@ -323,7 +327,7 @@ Cadet blue color. .. rst-class:: classref-constant -**CHARTREUSE** = ``Color(0.498039, 1, 0, 1)`` :ref:`🔗` +**CHARTREUSE** = ``Color(0.49803922, 1, 0, 1)`` :ref:`🔗` Chartreuse color. @@ -331,7 +335,7 @@ Chartreuse color. .. rst-class:: classref-constant -**CHOCOLATE** = ``Color(0.823529, 0.411765, 0.117647, 1)`` :ref:`🔗` +**CHOCOLATE** = ``Color(0.8235294, 0.4117647, 0.11764706, 1)`` :ref:`🔗` Chocolate color. @@ -339,7 +343,7 @@ Chocolate color. .. rst-class:: classref-constant -**CORAL** = ``Color(1, 0.498039, 0.313726, 1)`` :ref:`🔗` +**CORAL** = ``Color(1, 0.49803922, 0.3137255, 1)`` :ref:`🔗` Coral color. @@ -347,7 +351,7 @@ Coral color. .. rst-class:: classref-constant -**CORNFLOWER_BLUE** = ``Color(0.392157, 0.584314, 0.929412, 1)`` :ref:`🔗` +**CORNFLOWER_BLUE** = ``Color(0.39215687, 0.58431375, 0.92941177, 1)`` :ref:`🔗` Cornflower blue color. @@ -355,7 +359,7 @@ Cornflower blue color. .. rst-class:: classref-constant -**CORNSILK** = ``Color(1, 0.972549, 0.862745, 1)`` :ref:`🔗` +**CORNSILK** = ``Color(1, 0.972549, 0.8627451, 1)`` :ref:`🔗` Cornsilk color. @@ -363,7 +367,7 @@ Cornsilk color. .. rst-class:: classref-constant -**CRIMSON** = ``Color(0.862745, 0.0784314, 0.235294, 1)`` :ref:`🔗` +**CRIMSON** = ``Color(0.8627451, 0.078431375, 0.23529412, 1)`` :ref:`🔗` Crimson color. @@ -379,7 +383,7 @@ Cyan color. .. rst-class:: classref-constant -**DARK_BLUE** = ``Color(0, 0, 0.545098, 1)`` :ref:`🔗` +**DARK_BLUE** = ``Color(0, 0, 0.54509807, 1)`` :ref:`🔗` Dark blue color. @@ -387,7 +391,7 @@ Dark blue color. .. rst-class:: classref-constant -**DARK_CYAN** = ``Color(0, 0.545098, 0.545098, 1)`` :ref:`🔗` +**DARK_CYAN** = ``Color(0, 0.54509807, 0.54509807, 1)`` :ref:`🔗` Dark cyan color. @@ -395,7 +399,7 @@ Dark cyan color. .. rst-class:: classref-constant -**DARK_GOLDENROD** = ``Color(0.721569, 0.52549, 0.0431373, 1)`` :ref:`🔗` +**DARK_GOLDENROD** = ``Color(0.72156864, 0.5254902, 0.043137256, 1)`` :ref:`🔗` Dark goldenrod color. @@ -403,7 +407,7 @@ Dark goldenrod color. .. rst-class:: classref-constant -**DARK_GRAY** = ``Color(0.662745, 0.662745, 0.662745, 1)`` :ref:`🔗` +**DARK_GRAY** = ``Color(0.6627451, 0.6627451, 0.6627451, 1)`` :ref:`🔗` Dark gray color. @@ -411,7 +415,7 @@ Dark gray color. .. rst-class:: classref-constant -**DARK_GREEN** = ``Color(0, 0.392157, 0, 1)`` :ref:`🔗` +**DARK_GREEN** = ``Color(0, 0.39215687, 0, 1)`` :ref:`🔗` Dark green color. @@ -419,7 +423,7 @@ Dark green color. .. rst-class:: classref-constant -**DARK_KHAKI** = ``Color(0.741176, 0.717647, 0.419608, 1)`` :ref:`🔗` +**DARK_KHAKI** = ``Color(0.7411765, 0.7176471, 0.41960785, 1)`` :ref:`🔗` Dark khaki color. @@ -427,7 +431,7 @@ Dark khaki color. .. rst-class:: classref-constant -**DARK_MAGENTA** = ``Color(0.545098, 0, 0.545098, 1)`` :ref:`🔗` +**DARK_MAGENTA** = ``Color(0.54509807, 0, 0.54509807, 1)`` :ref:`🔗` Dark magenta color. @@ -435,7 +439,7 @@ Dark magenta color. .. rst-class:: classref-constant -**DARK_OLIVE_GREEN** = ``Color(0.333333, 0.419608, 0.184314, 1)`` :ref:`🔗` +**DARK_OLIVE_GREEN** = ``Color(0.33333334, 0.41960785, 0.18431373, 1)`` :ref:`🔗` Dark olive green color. @@ -443,7 +447,7 @@ Dark olive green color. .. rst-class:: classref-constant -**DARK_ORANGE** = ``Color(1, 0.54902, 0, 1)`` :ref:`🔗` +**DARK_ORANGE** = ``Color(1, 0.54901963, 0, 1)`` :ref:`🔗` Dark orange color. @@ -451,7 +455,7 @@ Dark orange color. .. rst-class:: classref-constant -**DARK_ORCHID** = ``Color(0.6, 0.196078, 0.8, 1)`` :ref:`🔗` +**DARK_ORCHID** = ``Color(0.6, 0.19607843, 0.8, 1)`` :ref:`🔗` Dark orchid color. @@ -459,7 +463,7 @@ Dark orchid color. .. rst-class:: classref-constant -**DARK_RED** = ``Color(0.545098, 0, 0, 1)`` :ref:`🔗` +**DARK_RED** = ``Color(0.54509807, 0, 0, 1)`` :ref:`🔗` Dark red color. @@ -467,7 +471,7 @@ Dark red color. .. rst-class:: classref-constant -**DARK_SALMON** = ``Color(0.913725, 0.588235, 0.478431, 1)`` :ref:`🔗` +**DARK_SALMON** = ``Color(0.9137255, 0.5882353, 0.47843137, 1)`` :ref:`🔗` Dark salmon color. @@ -475,7 +479,7 @@ Dark salmon color. .. rst-class:: classref-constant -**DARK_SEA_GREEN** = ``Color(0.560784, 0.737255, 0.560784, 1)`` :ref:`🔗` +**DARK_SEA_GREEN** = ``Color(0.56078434, 0.7372549, 0.56078434, 1)`` :ref:`🔗` Dark sea green color. @@ -483,7 +487,7 @@ Dark sea green color. .. rst-class:: classref-constant -**DARK_SLATE_BLUE** = ``Color(0.282353, 0.239216, 0.545098, 1)`` :ref:`🔗` +**DARK_SLATE_BLUE** = ``Color(0.28235295, 0.23921569, 0.54509807, 1)`` :ref:`🔗` Dark slate blue color. @@ -491,7 +495,7 @@ Dark slate blue color. .. rst-class:: classref-constant -**DARK_SLATE_GRAY** = ``Color(0.184314, 0.309804, 0.309804, 1)`` :ref:`🔗` +**DARK_SLATE_GRAY** = ``Color(0.18431373, 0.30980393, 0.30980393, 1)`` :ref:`🔗` Dark slate gray color. @@ -499,7 +503,7 @@ Dark slate gray color. .. rst-class:: classref-constant -**DARK_TURQUOISE** = ``Color(0, 0.807843, 0.819608, 1)`` :ref:`🔗` +**DARK_TURQUOISE** = ``Color(0, 0.80784315, 0.81960785, 1)`` :ref:`🔗` Dark turquoise color. @@ -507,7 +511,7 @@ Dark turquoise color. .. rst-class:: classref-constant -**DARK_VIOLET** = ``Color(0.580392, 0, 0.827451, 1)`` :ref:`🔗` +**DARK_VIOLET** = ``Color(0.5803922, 0, 0.827451, 1)`` :ref:`🔗` Dark violet color. @@ -515,7 +519,7 @@ Dark violet color. .. rst-class:: classref-constant -**DEEP_PINK** = ``Color(1, 0.0784314, 0.576471, 1)`` :ref:`🔗` +**DEEP_PINK** = ``Color(1, 0.078431375, 0.5764706, 1)`` :ref:`🔗` Deep pink color. @@ -523,7 +527,7 @@ Deep pink color. .. rst-class:: classref-constant -**DEEP_SKY_BLUE** = ``Color(0, 0.74902, 1, 1)`` :ref:`🔗` +**DEEP_SKY_BLUE** = ``Color(0, 0.7490196, 1, 1)`` :ref:`🔗` Deep sky blue color. @@ -531,7 +535,7 @@ Deep sky blue color. .. rst-class:: classref-constant -**DIM_GRAY** = ``Color(0.411765, 0.411765, 0.411765, 1)`` :ref:`🔗` +**DIM_GRAY** = ``Color(0.4117647, 0.4117647, 0.4117647, 1)`` :ref:`🔗` Dim gray color. @@ -539,7 +543,7 @@ Dim gray color. .. rst-class:: classref-constant -**DODGER_BLUE** = ``Color(0.117647, 0.564706, 1, 1)`` :ref:`🔗` +**DODGER_BLUE** = ``Color(0.11764706, 0.5647059, 1, 1)`` :ref:`🔗` Dodger blue color. @@ -547,7 +551,7 @@ Dodger blue color. .. rst-class:: classref-constant -**FIREBRICK** = ``Color(0.698039, 0.133333, 0.133333, 1)`` :ref:`🔗` +**FIREBRICK** = ``Color(0.69803923, 0.13333334, 0.13333334, 1)`` :ref:`🔗` Firebrick color. @@ -555,7 +559,7 @@ Firebrick color. .. rst-class:: classref-constant -**FLORAL_WHITE** = ``Color(1, 0.980392, 0.941176, 1)`` :ref:`🔗` +**FLORAL_WHITE** = ``Color(1, 0.98039216, 0.9411765, 1)`` :ref:`🔗` Floral white color. @@ -563,7 +567,7 @@ Floral white color. .. rst-class:: classref-constant -**FOREST_GREEN** = ``Color(0.133333, 0.545098, 0.133333, 1)`` :ref:`🔗` +**FOREST_GREEN** = ``Color(0.13333334, 0.54509807, 0.13333334, 1)`` :ref:`🔗` Forest green color. @@ -579,7 +583,7 @@ Fuchsia color. .. rst-class:: classref-constant -**GAINSBORO** = ``Color(0.862745, 0.862745, 0.862745, 1)`` :ref:`🔗` +**GAINSBORO** = ``Color(0.8627451, 0.8627451, 0.8627451, 1)`` :ref:`🔗` Gainsboro color. @@ -595,7 +599,7 @@ Ghost white color. .. rst-class:: classref-constant -**GOLD** = ``Color(1, 0.843137, 0, 1)`` :ref:`🔗` +**GOLD** = ``Color(1, 0.84313726, 0, 1)`` :ref:`🔗` Gold color. @@ -603,7 +607,7 @@ Gold color. .. rst-class:: classref-constant -**GOLDENROD** = ``Color(0.854902, 0.647059, 0.12549, 1)`` :ref:`🔗` +**GOLDENROD** = ``Color(0.85490197, 0.64705884, 0.1254902, 1)`` :ref:`🔗` Goldenrod color. @@ -611,7 +615,7 @@ Goldenrod color. .. rst-class:: classref-constant -**GRAY** = ``Color(0.745098, 0.745098, 0.745098, 1)`` :ref:`🔗` +**GRAY** = ``Color(0.74509805, 0.74509805, 0.74509805, 1)`` :ref:`🔗` Gray color. @@ -627,7 +631,7 @@ Green color. .. rst-class:: classref-constant -**GREEN_YELLOW** = ``Color(0.678431, 1, 0.184314, 1)`` :ref:`🔗` +**GREEN_YELLOW** = ``Color(0.6784314, 1, 0.18431373, 1)`` :ref:`🔗` Green yellow color. @@ -635,7 +639,7 @@ Green yellow color. .. rst-class:: classref-constant -**HONEYDEW** = ``Color(0.941176, 1, 0.941176, 1)`` :ref:`🔗` +**HONEYDEW** = ``Color(0.9411765, 1, 0.9411765, 1)`` :ref:`🔗` Honeydew color. @@ -643,7 +647,7 @@ Honeydew color. .. rst-class:: classref-constant -**HOT_PINK** = ``Color(1, 0.411765, 0.705882, 1)`` :ref:`🔗` +**HOT_PINK** = ``Color(1, 0.4117647, 0.7058824, 1)`` :ref:`🔗` Hot pink color. @@ -651,7 +655,7 @@ Hot pink color. .. rst-class:: classref-constant -**INDIAN_RED** = ``Color(0.803922, 0.360784, 0.360784, 1)`` :ref:`🔗` +**INDIAN_RED** = ``Color(0.8039216, 0.36078432, 0.36078432, 1)`` :ref:`🔗` Indian red color. @@ -659,7 +663,7 @@ Indian red color. .. rst-class:: classref-constant -**INDIGO** = ``Color(0.294118, 0, 0.509804, 1)`` :ref:`🔗` +**INDIGO** = ``Color(0.29411766, 0, 0.50980395, 1)`` :ref:`🔗` Indigo color. @@ -667,7 +671,7 @@ Indigo color. .. rst-class:: classref-constant -**IVORY** = ``Color(1, 1, 0.941176, 1)`` :ref:`🔗` +**IVORY** = ``Color(1, 1, 0.9411765, 1)`` :ref:`🔗` Ivory color. @@ -675,7 +679,7 @@ Ivory color. .. rst-class:: classref-constant -**KHAKI** = ``Color(0.941176, 0.901961, 0.54902, 1)`` :ref:`🔗` +**KHAKI** = ``Color(0.9411765, 0.9019608, 0.54901963, 1)`` :ref:`🔗` Khaki color. @@ -683,7 +687,7 @@ Khaki color. .. rst-class:: classref-constant -**LAVENDER** = ``Color(0.901961, 0.901961, 0.980392, 1)`` :ref:`🔗` +**LAVENDER** = ``Color(0.9019608, 0.9019608, 0.98039216, 1)`` :ref:`🔗` Lavender color. @@ -691,7 +695,7 @@ Lavender color. .. rst-class:: classref-constant -**LAVENDER_BLUSH** = ``Color(1, 0.941176, 0.960784, 1)`` :ref:`🔗` +**LAVENDER_BLUSH** = ``Color(1, 0.9411765, 0.9607843, 1)`` :ref:`🔗` Lavender blush color. @@ -699,7 +703,7 @@ Lavender blush color. .. rst-class:: classref-constant -**LAWN_GREEN** = ``Color(0.486275, 0.988235, 0, 1)`` :ref:`🔗` +**LAWN_GREEN** = ``Color(0.4862745, 0.9882353, 0, 1)`` :ref:`🔗` Lawn green color. @@ -707,7 +711,7 @@ Lawn green color. .. rst-class:: classref-constant -**LEMON_CHIFFON** = ``Color(1, 0.980392, 0.803922, 1)`` :ref:`🔗` +**LEMON_CHIFFON** = ``Color(1, 0.98039216, 0.8039216, 1)`` :ref:`🔗` Lemon chiffon color. @@ -715,7 +719,7 @@ Lemon chiffon color. .. rst-class:: classref-constant -**LIGHT_BLUE** = ``Color(0.678431, 0.847059, 0.901961, 1)`` :ref:`🔗` +**LIGHT_BLUE** = ``Color(0.6784314, 0.84705883, 0.9019608, 1)`` :ref:`🔗` Light blue color. @@ -723,7 +727,7 @@ Light blue color. .. rst-class:: classref-constant -**LIGHT_CORAL** = ``Color(0.941176, 0.501961, 0.501961, 1)`` :ref:`🔗` +**LIGHT_CORAL** = ``Color(0.9411765, 0.5019608, 0.5019608, 1)`` :ref:`🔗` Light coral color. @@ -731,7 +735,7 @@ Light coral color. .. rst-class:: classref-constant -**LIGHT_CYAN** = ``Color(0.878431, 1, 1, 1)`` :ref:`🔗` +**LIGHT_CYAN** = ``Color(0.8784314, 1, 1, 1)`` :ref:`🔗` Light cyan color. @@ -739,7 +743,7 @@ Light cyan color. .. rst-class:: classref-constant -**LIGHT_GOLDENROD** = ``Color(0.980392, 0.980392, 0.823529, 1)`` :ref:`🔗` +**LIGHT_GOLDENROD** = ``Color(0.98039216, 0.98039216, 0.8235294, 1)`` :ref:`🔗` Light goldenrod color. @@ -755,7 +759,7 @@ Light gray color. .. rst-class:: classref-constant -**LIGHT_GREEN** = ``Color(0.564706, 0.933333, 0.564706, 1)`` :ref:`🔗` +**LIGHT_GREEN** = ``Color(0.5647059, 0.93333334, 0.5647059, 1)`` :ref:`🔗` Light green color. @@ -763,7 +767,7 @@ Light green color. .. rst-class:: classref-constant -**LIGHT_PINK** = ``Color(1, 0.713726, 0.756863, 1)`` :ref:`🔗` +**LIGHT_PINK** = ``Color(1, 0.7137255, 0.75686276, 1)`` :ref:`🔗` Light pink color. @@ -771,7 +775,7 @@ Light pink color. .. rst-class:: classref-constant -**LIGHT_SALMON** = ``Color(1, 0.627451, 0.478431, 1)`` :ref:`🔗` +**LIGHT_SALMON** = ``Color(1, 0.627451, 0.47843137, 1)`` :ref:`🔗` Light salmon color. @@ -779,7 +783,7 @@ Light salmon color. .. rst-class:: classref-constant -**LIGHT_SEA_GREEN** = ``Color(0.12549, 0.698039, 0.666667, 1)`` :ref:`🔗` +**LIGHT_SEA_GREEN** = ``Color(0.1254902, 0.69803923, 0.6666667, 1)`` :ref:`🔗` Light sea green color. @@ -787,7 +791,7 @@ Light sea green color. .. rst-class:: classref-constant -**LIGHT_SKY_BLUE** = ``Color(0.529412, 0.807843, 0.980392, 1)`` :ref:`🔗` +**LIGHT_SKY_BLUE** = ``Color(0.5294118, 0.80784315, 0.98039216, 1)`` :ref:`🔗` Light sky blue color. @@ -795,7 +799,7 @@ Light sky blue color. .. rst-class:: classref-constant -**LIGHT_SLATE_GRAY** = ``Color(0.466667, 0.533333, 0.6, 1)`` :ref:`🔗` +**LIGHT_SLATE_GRAY** = ``Color(0.46666667, 0.53333336, 0.6, 1)`` :ref:`🔗` Light slate gray color. @@ -803,7 +807,7 @@ Light slate gray color. .. rst-class:: classref-constant -**LIGHT_STEEL_BLUE** = ``Color(0.690196, 0.768627, 0.870588, 1)`` :ref:`🔗` +**LIGHT_STEEL_BLUE** = ``Color(0.6901961, 0.76862746, 0.87058824, 1)`` :ref:`🔗` Light steel blue color. @@ -811,7 +815,7 @@ Light steel blue color. .. rst-class:: classref-constant -**LIGHT_YELLOW** = ``Color(1, 1, 0.878431, 1)`` :ref:`🔗` +**LIGHT_YELLOW** = ``Color(1, 1, 0.8784314, 1)`` :ref:`🔗` Light yellow color. @@ -827,7 +831,7 @@ Lime color. .. rst-class:: classref-constant -**LIME_GREEN** = ``Color(0.196078, 0.803922, 0.196078, 1)`` :ref:`🔗` +**LIME_GREEN** = ``Color(0.19607843, 0.8039216, 0.19607843, 1)`` :ref:`🔗` Lime green color. @@ -835,7 +839,7 @@ Lime green color. .. rst-class:: classref-constant -**LINEN** = ``Color(0.980392, 0.941176, 0.901961, 1)`` :ref:`🔗` +**LINEN** = ``Color(0.98039216, 0.9411765, 0.9019608, 1)`` :ref:`🔗` Linen color. @@ -851,7 +855,7 @@ Magenta color. .. rst-class:: classref-constant -**MAROON** = ``Color(0.690196, 0.188235, 0.376471, 1)`` :ref:`🔗` +**MAROON** = ``Color(0.6901961, 0.1882353, 0.3764706, 1)`` :ref:`🔗` Maroon color. @@ -859,7 +863,7 @@ Maroon color. .. rst-class:: classref-constant -**MEDIUM_AQUAMARINE** = ``Color(0.4, 0.803922, 0.666667, 1)`` :ref:`🔗` +**MEDIUM_AQUAMARINE** = ``Color(0.4, 0.8039216, 0.6666667, 1)`` :ref:`🔗` Medium aquamarine color. @@ -867,7 +871,7 @@ Medium aquamarine color. .. rst-class:: classref-constant -**MEDIUM_BLUE** = ``Color(0, 0, 0.803922, 1)`` :ref:`🔗` +**MEDIUM_BLUE** = ``Color(0, 0, 0.8039216, 1)`` :ref:`🔗` Medium blue color. @@ -875,7 +879,7 @@ Medium blue color. .. rst-class:: classref-constant -**MEDIUM_ORCHID** = ``Color(0.729412, 0.333333, 0.827451, 1)`` :ref:`🔗` +**MEDIUM_ORCHID** = ``Color(0.7294118, 0.33333334, 0.827451, 1)`` :ref:`🔗` Medium orchid color. @@ -883,7 +887,7 @@ Medium orchid color. .. rst-class:: classref-constant -**MEDIUM_PURPLE** = ``Color(0.576471, 0.439216, 0.858824, 1)`` :ref:`🔗` +**MEDIUM_PURPLE** = ``Color(0.5764706, 0.4392157, 0.85882354, 1)`` :ref:`🔗` Medium purple color. @@ -891,7 +895,7 @@ Medium purple color. .. rst-class:: classref-constant -**MEDIUM_SEA_GREEN** = ``Color(0.235294, 0.701961, 0.443137, 1)`` :ref:`🔗` +**MEDIUM_SEA_GREEN** = ``Color(0.23529412, 0.7019608, 0.44313726, 1)`` :ref:`🔗` Medium sea green color. @@ -899,7 +903,7 @@ Medium sea green color. .. rst-class:: classref-constant -**MEDIUM_SLATE_BLUE** = ``Color(0.482353, 0.407843, 0.933333, 1)`` :ref:`🔗` +**MEDIUM_SLATE_BLUE** = ``Color(0.48235294, 0.40784314, 0.93333334, 1)`` :ref:`🔗` Medium slate blue color. @@ -907,7 +911,7 @@ Medium slate blue color. .. rst-class:: classref-constant -**MEDIUM_SPRING_GREEN** = ``Color(0, 0.980392, 0.603922, 1)`` :ref:`🔗` +**MEDIUM_SPRING_GREEN** = ``Color(0, 0.98039216, 0.6039216, 1)`` :ref:`🔗` Medium spring green color. @@ -915,7 +919,7 @@ Medium spring green color. .. rst-class:: classref-constant -**MEDIUM_TURQUOISE** = ``Color(0.282353, 0.819608, 0.8, 1)`` :ref:`🔗` +**MEDIUM_TURQUOISE** = ``Color(0.28235295, 0.81960785, 0.8, 1)`` :ref:`🔗` Medium turquoise color. @@ -923,7 +927,7 @@ Medium turquoise color. .. rst-class:: classref-constant -**MEDIUM_VIOLET_RED** = ``Color(0.780392, 0.0823529, 0.521569, 1)`` :ref:`🔗` +**MEDIUM_VIOLET_RED** = ``Color(0.78039217, 0.08235294, 0.52156866, 1)`` :ref:`🔗` Medium violet red color. @@ -931,7 +935,7 @@ Medium violet red color. .. rst-class:: classref-constant -**MIDNIGHT_BLUE** = ``Color(0.0980392, 0.0980392, 0.439216, 1)`` :ref:`🔗` +**MIDNIGHT_BLUE** = ``Color(0.09803922, 0.09803922, 0.4392157, 1)`` :ref:`🔗` Midnight blue color. @@ -939,7 +943,7 @@ Midnight blue color. .. rst-class:: classref-constant -**MINT_CREAM** = ``Color(0.960784, 1, 0.980392, 1)`` :ref:`🔗` +**MINT_CREAM** = ``Color(0.9607843, 1, 0.98039216, 1)`` :ref:`🔗` Mint cream color. @@ -947,7 +951,7 @@ Mint cream color. .. rst-class:: classref-constant -**MISTY_ROSE** = ``Color(1, 0.894118, 0.882353, 1)`` :ref:`🔗` +**MISTY_ROSE** = ``Color(1, 0.89411765, 0.88235295, 1)`` :ref:`🔗` Misty rose color. @@ -955,7 +959,7 @@ Misty rose color. .. rst-class:: classref-constant -**MOCCASIN** = ``Color(1, 0.894118, 0.709804, 1)`` :ref:`🔗` +**MOCCASIN** = ``Color(1, 0.89411765, 0.70980394, 1)`` :ref:`🔗` Moccasin color. @@ -963,7 +967,7 @@ Moccasin color. .. rst-class:: classref-constant -**NAVAJO_WHITE** = ``Color(1, 0.870588, 0.678431, 1)`` :ref:`🔗` +**NAVAJO_WHITE** = ``Color(1, 0.87058824, 0.6784314, 1)`` :ref:`🔗` Navajo white color. @@ -971,7 +975,7 @@ Navajo white color. .. rst-class:: classref-constant -**NAVY_BLUE** = ``Color(0, 0, 0.501961, 1)`` :ref:`🔗` +**NAVY_BLUE** = ``Color(0, 0, 0.5019608, 1)`` :ref:`🔗` Navy blue color. @@ -979,7 +983,7 @@ Navy blue color. .. rst-class:: classref-constant -**OLD_LACE** = ``Color(0.992157, 0.960784, 0.901961, 1)`` :ref:`🔗` +**OLD_LACE** = ``Color(0.99215686, 0.9607843, 0.9019608, 1)`` :ref:`🔗` Old lace color. @@ -987,7 +991,7 @@ Old lace color. .. rst-class:: classref-constant -**OLIVE** = ``Color(0.501961, 0.501961, 0, 1)`` :ref:`🔗` +**OLIVE** = ``Color(0.5019608, 0.5019608, 0, 1)`` :ref:`🔗` Olive color. @@ -995,7 +999,7 @@ Olive color. .. rst-class:: classref-constant -**OLIVE_DRAB** = ``Color(0.419608, 0.556863, 0.137255, 1)`` :ref:`🔗` +**OLIVE_DRAB** = ``Color(0.41960785, 0.5568628, 0.13725491, 1)`` :ref:`🔗` Olive drab color. @@ -1003,7 +1007,7 @@ Olive drab color. .. rst-class:: classref-constant -**ORANGE** = ``Color(1, 0.647059, 0, 1)`` :ref:`🔗` +**ORANGE** = ``Color(1, 0.64705884, 0, 1)`` :ref:`🔗` Orange color. @@ -1011,7 +1015,7 @@ Orange color. .. rst-class:: classref-constant -**ORANGE_RED** = ``Color(1, 0.270588, 0, 1)`` :ref:`🔗` +**ORANGE_RED** = ``Color(1, 0.27058825, 0, 1)`` :ref:`🔗` Orange red color. @@ -1019,7 +1023,7 @@ Orange red color. .. rst-class:: classref-constant -**ORCHID** = ``Color(0.854902, 0.439216, 0.839216, 1)`` :ref:`🔗` +**ORCHID** = ``Color(0.85490197, 0.4392157, 0.8392157, 1)`` :ref:`🔗` Orchid color. @@ -1027,7 +1031,7 @@ Orchid color. .. rst-class:: classref-constant -**PALE_GOLDENROD** = ``Color(0.933333, 0.909804, 0.666667, 1)`` :ref:`🔗` +**PALE_GOLDENROD** = ``Color(0.93333334, 0.9098039, 0.6666667, 1)`` :ref:`🔗` Pale goldenrod color. @@ -1035,7 +1039,7 @@ Pale goldenrod color. .. rst-class:: classref-constant -**PALE_GREEN** = ``Color(0.596078, 0.984314, 0.596078, 1)`` :ref:`🔗` +**PALE_GREEN** = ``Color(0.59607846, 0.9843137, 0.59607846, 1)`` :ref:`🔗` Pale green color. @@ -1043,7 +1047,7 @@ Pale green color. .. rst-class:: classref-constant -**PALE_TURQUOISE** = ``Color(0.686275, 0.933333, 0.933333, 1)`` :ref:`🔗` +**PALE_TURQUOISE** = ``Color(0.6862745, 0.93333334, 0.93333334, 1)`` :ref:`🔗` Pale turquoise color. @@ -1051,7 +1055,7 @@ Pale turquoise color. .. rst-class:: classref-constant -**PALE_VIOLET_RED** = ``Color(0.858824, 0.439216, 0.576471, 1)`` :ref:`🔗` +**PALE_VIOLET_RED** = ``Color(0.85882354, 0.4392157, 0.5764706, 1)`` :ref:`🔗` Pale violet red color. @@ -1059,7 +1063,7 @@ Pale violet red color. .. rst-class:: classref-constant -**PAPAYA_WHIP** = ``Color(1, 0.937255, 0.835294, 1)`` :ref:`🔗` +**PAPAYA_WHIP** = ``Color(1, 0.9372549, 0.8352941, 1)`` :ref:`🔗` Papaya whip color. @@ -1067,7 +1071,7 @@ Papaya whip color. .. rst-class:: classref-constant -**PEACH_PUFF** = ``Color(1, 0.854902, 0.72549, 1)`` :ref:`🔗` +**PEACH_PUFF** = ``Color(1, 0.85490197, 0.7254902, 1)`` :ref:`🔗` Peach puff color. @@ -1075,7 +1079,7 @@ Peach puff color. .. rst-class:: classref-constant -**PERU** = ``Color(0.803922, 0.521569, 0.247059, 1)`` :ref:`🔗` +**PERU** = ``Color(0.8039216, 0.52156866, 0.24705882, 1)`` :ref:`🔗` Peru color. @@ -1083,7 +1087,7 @@ Peru color. .. rst-class:: classref-constant -**PINK** = ``Color(1, 0.752941, 0.796078, 1)`` :ref:`🔗` +**PINK** = ``Color(1, 0.7529412, 0.79607844, 1)`` :ref:`🔗` Pink color. @@ -1091,7 +1095,7 @@ Pink color. .. rst-class:: classref-constant -**PLUM** = ``Color(0.866667, 0.627451, 0.866667, 1)`` :ref:`🔗` +**PLUM** = ``Color(0.8666667, 0.627451, 0.8666667, 1)`` :ref:`🔗` Plum color. @@ -1099,7 +1103,7 @@ Plum color. .. rst-class:: classref-constant -**POWDER_BLUE** = ``Color(0.690196, 0.878431, 0.901961, 1)`` :ref:`🔗` +**POWDER_BLUE** = ``Color(0.6901961, 0.8784314, 0.9019608, 1)`` :ref:`🔗` Powder blue color. @@ -1107,7 +1111,7 @@ Powder blue color. .. rst-class:: classref-constant -**PURPLE** = ``Color(0.627451, 0.12549, 0.941176, 1)`` :ref:`🔗` +**PURPLE** = ``Color(0.627451, 0.1254902, 0.9411765, 1)`` :ref:`🔗` Purple color. @@ -1131,7 +1135,7 @@ Red color. .. rst-class:: classref-constant -**ROSY_BROWN** = ``Color(0.737255, 0.560784, 0.560784, 1)`` :ref:`🔗` +**ROSY_BROWN** = ``Color(0.7372549, 0.56078434, 0.56078434, 1)`` :ref:`🔗` Rosy brown color. @@ -1139,7 +1143,7 @@ Rosy brown color. .. rst-class:: classref-constant -**ROYAL_BLUE** = ``Color(0.254902, 0.411765, 0.882353, 1)`` :ref:`🔗` +**ROYAL_BLUE** = ``Color(0.25490198, 0.4117647, 0.88235295, 1)`` :ref:`🔗` Royal blue color. @@ -1147,7 +1151,7 @@ Royal blue color. .. rst-class:: classref-constant -**SADDLE_BROWN** = ``Color(0.545098, 0.270588, 0.0745098, 1)`` :ref:`🔗` +**SADDLE_BROWN** = ``Color(0.54509807, 0.27058825, 0.07450981, 1)`` :ref:`🔗` Saddle brown color. @@ -1155,7 +1159,7 @@ Saddle brown color. .. rst-class:: classref-constant -**SALMON** = ``Color(0.980392, 0.501961, 0.447059, 1)`` :ref:`🔗` +**SALMON** = ``Color(0.98039216, 0.5019608, 0.44705883, 1)`` :ref:`🔗` Salmon color. @@ -1163,7 +1167,7 @@ Salmon color. .. rst-class:: classref-constant -**SANDY_BROWN** = ``Color(0.956863, 0.643137, 0.376471, 1)`` :ref:`🔗` +**SANDY_BROWN** = ``Color(0.95686275, 0.6431373, 0.3764706, 1)`` :ref:`🔗` Sandy brown color. @@ -1171,7 +1175,7 @@ Sandy brown color. .. rst-class:: classref-constant -**SEA_GREEN** = ``Color(0.180392, 0.545098, 0.341176, 1)`` :ref:`🔗` +**SEA_GREEN** = ``Color(0.18039216, 0.54509807, 0.34117648, 1)`` :ref:`🔗` Sea green color. @@ -1179,7 +1183,7 @@ Sea green color. .. rst-class:: classref-constant -**SEASHELL** = ``Color(1, 0.960784, 0.933333, 1)`` :ref:`🔗` +**SEASHELL** = ``Color(1, 0.9607843, 0.93333334, 1)`` :ref:`🔗` Seashell color. @@ -1187,7 +1191,7 @@ Seashell color. .. rst-class:: classref-constant -**SIENNA** = ``Color(0.627451, 0.321569, 0.176471, 1)`` :ref:`🔗` +**SIENNA** = ``Color(0.627451, 0.32156864, 0.1764706, 1)`` :ref:`🔗` Sienna color. @@ -1195,7 +1199,7 @@ Sienna color. .. rst-class:: classref-constant -**SILVER** = ``Color(0.752941, 0.752941, 0.752941, 1)`` :ref:`🔗` +**SILVER** = ``Color(0.7529412, 0.7529412, 0.7529412, 1)`` :ref:`🔗` Silver color. @@ -1203,7 +1207,7 @@ Silver color. .. rst-class:: classref-constant -**SKY_BLUE** = ``Color(0.529412, 0.807843, 0.921569, 1)`` :ref:`🔗` +**SKY_BLUE** = ``Color(0.5294118, 0.80784315, 0.92156863, 1)`` :ref:`🔗` Sky blue color. @@ -1211,7 +1215,7 @@ Sky blue color. .. rst-class:: classref-constant -**SLATE_BLUE** = ``Color(0.415686, 0.352941, 0.803922, 1)`` :ref:`🔗` +**SLATE_BLUE** = ``Color(0.41568628, 0.3529412, 0.8039216, 1)`` :ref:`🔗` Slate blue color. @@ -1219,7 +1223,7 @@ Slate blue color. .. rst-class:: classref-constant -**SLATE_GRAY** = ``Color(0.439216, 0.501961, 0.564706, 1)`` :ref:`🔗` +**SLATE_GRAY** = ``Color(0.4392157, 0.5019608, 0.5647059, 1)`` :ref:`🔗` Slate gray color. @@ -1227,7 +1231,7 @@ Slate gray color. .. rst-class:: classref-constant -**SNOW** = ``Color(1, 0.980392, 0.980392, 1)`` :ref:`🔗` +**SNOW** = ``Color(1, 0.98039216, 0.98039216, 1)`` :ref:`🔗` Snow color. @@ -1235,7 +1239,7 @@ Snow color. .. rst-class:: classref-constant -**SPRING_GREEN** = ``Color(0, 1, 0.498039, 1)`` :ref:`🔗` +**SPRING_GREEN** = ``Color(0, 1, 0.49803922, 1)`` :ref:`🔗` Spring green color. @@ -1243,7 +1247,7 @@ Spring green color. .. rst-class:: classref-constant -**STEEL_BLUE** = ``Color(0.27451, 0.509804, 0.705882, 1)`` :ref:`🔗` +**STEEL_BLUE** = ``Color(0.27450982, 0.50980395, 0.7058824, 1)`` :ref:`🔗` Steel blue color. @@ -1251,7 +1255,7 @@ Steel blue color. .. rst-class:: classref-constant -**TAN** = ``Color(0.823529, 0.705882, 0.54902, 1)`` :ref:`🔗` +**TAN** = ``Color(0.8235294, 0.7058824, 0.54901963, 1)`` :ref:`🔗` Tan color. @@ -1259,7 +1263,7 @@ Tan color. .. rst-class:: classref-constant -**TEAL** = ``Color(0, 0.501961, 0.501961, 1)`` :ref:`🔗` +**TEAL** = ``Color(0, 0.5019608, 0.5019608, 1)`` :ref:`🔗` Teal color. @@ -1267,7 +1271,7 @@ Teal color. .. rst-class:: classref-constant -**THISTLE** = ``Color(0.847059, 0.74902, 0.847059, 1)`` :ref:`🔗` +**THISTLE** = ``Color(0.84705883, 0.7490196, 0.84705883, 1)`` :ref:`🔗` Thistle color. @@ -1275,7 +1279,7 @@ Thistle color. .. rst-class:: classref-constant -**TOMATO** = ``Color(1, 0.388235, 0.278431, 1)`` :ref:`🔗` +**TOMATO** = ``Color(1, 0.3882353, 0.2784314, 1)`` :ref:`🔗` Tomato color. @@ -1291,7 +1295,7 @@ Transparent color (white with zero alpha). .. rst-class:: classref-constant -**TURQUOISE** = ``Color(0.25098, 0.878431, 0.815686, 1)`` :ref:`🔗` +**TURQUOISE** = ``Color(0.2509804, 0.8784314, 0.8156863, 1)`` :ref:`🔗` Turquoise color. @@ -1299,7 +1303,7 @@ Turquoise color. .. rst-class:: classref-constant -**VIOLET** = ``Color(0.933333, 0.509804, 0.933333, 1)`` :ref:`🔗` +**VIOLET** = ``Color(0.93333334, 0.50980395, 0.93333334, 1)`` :ref:`🔗` Violet color. @@ -1307,7 +1311,7 @@ Violet color. .. rst-class:: classref-constant -**WEB_GRAY** = ``Color(0.501961, 0.501961, 0.501961, 1)`` :ref:`🔗` +**WEB_GRAY** = ``Color(0.5019608, 0.5019608, 0.5019608, 1)`` :ref:`🔗` Web gray color. @@ -1315,7 +1319,7 @@ Web gray color. .. rst-class:: classref-constant -**WEB_GREEN** = ``Color(0, 0.501961, 0, 1)`` :ref:`🔗` +**WEB_GREEN** = ``Color(0, 0.5019608, 0, 1)`` :ref:`🔗` Web green color. @@ -1323,7 +1327,7 @@ Web green color. .. rst-class:: classref-constant -**WEB_MAROON** = ``Color(0.501961, 0, 0, 1)`` :ref:`🔗` +**WEB_MAROON** = ``Color(0.5019608, 0, 0, 1)`` :ref:`🔗` Web maroon color. @@ -1331,7 +1335,7 @@ Web maroon color. .. rst-class:: classref-constant -**WEB_PURPLE** = ``Color(0.501961, 0, 0.501961, 1)`` :ref:`🔗` +**WEB_PURPLE** = ``Color(0.5019608, 0, 0.5019608, 1)`` :ref:`🔗` Web purple color. @@ -1339,7 +1343,7 @@ Web purple color. .. rst-class:: classref-constant -**WHEAT** = ``Color(0.960784, 0.870588, 0.701961, 1)`` :ref:`🔗` +**WHEAT** = ``Color(0.9607843, 0.87058824, 0.7019608, 1)`` :ref:`🔗` Wheat color. @@ -1355,7 +1359,7 @@ White color. .. rst-class:: classref-constant -**WHITE_SMOKE** = ``Color(0.960784, 0.960784, 0.960784, 1)`` :ref:`🔗` +**WHITE_SMOKE** = ``Color(0.9607843, 0.9607843, 0.9607843, 1)`` :ref:`🔗` White smoke color. @@ -1371,7 +1375,7 @@ Yellow color. .. rst-class:: classref-constant -**YELLOW_GREEN** = ``Color(0.603922, 0.803922, 0.196078, 1)`` :ref:`🔗` +**YELLOW_GREEN** = ``Color(0.6039216, 0.8039216, 0.19607843, 1)`` :ref:`🔗` Yellow green color. @@ -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:: @@ -1928,7 +1954,7 @@ Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The stri Color.html_is_valid("#55AAFF20") # Returns true Color.html_is_valid("55AAFF") # Returns true Color.html_is_valid("#F2C") # Returns true - + Color.html_is_valid("#AABBC") # Returns false Color.html_is_valid("#55aaFF5") # Returns false @@ -1938,7 +1964,7 @@ Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The stri Color.HtmlIsValid("#55AAFF20"); // Returns true Color.HtmlIsValid("55AAFF"); // Returns true Color.HtmlIsValid("#F2C"); // Returns true - + Color.HtmlIsValid("#AABBC"); // Returns false Color.HtmlIsValid("#55aaFF5"); // Returns false @@ -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:: @@ -2004,7 +2030,7 @@ Returns the linear interpolation between this color's components and ``to``'s co var red = Color(1.0, 0.0, 0.0) var aqua = Color(0.0, 1.0, 0.8) - + red.lerp(aqua, 0.2) # Returns Color(0.8, 0.2, 0.16) red.lerp(aqua, 0.5) # Returns Color(0.5, 0.5, 0.4) red.lerp(aqua, 1.0) # Returns Color(0.0, 1.0, 0.8) @@ -2013,7 +2039,7 @@ Returns the linear interpolation between this color's components and ``to``'s co var red = new Color(1.0f, 0.0f, 0.0f); var aqua = new Color(0.0f, 1.0f, 0.8f); - + red.Lerp(aqua, 0.2f); // Returns Color(0.8f, 0.2f, 0.16f) red.Lerp(aqua, 0.5f); // Returns Color(0.5f, 0.5f, 0.4f) red.Lerp(aqua, 1.0f); // Returns Color(0.0f, 1.0f, 0.8f) @@ -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,9 +2457,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_colorpalette.rst b/classes/class_colorpalette.rst index 2f1d086b5f0..ef88f305eea 100644 --- a/classes/class_colorpalette.rst +++ b/classes/class_colorpalette.rst @@ -58,6 +58,7 @@ A :ref:`PackedColorArray` containing the colors in the p **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index 56c8d995a2e..bf14c54d487 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -53,6 +53,8 @@ Properties +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`edit_alpha` | ``true`` | +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ + | :ref:`bool` | :ref:`edit_intensity` | ``true`` | + +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`hex_visible` | ``true`` | +----------------------------------------------------------+----------------------------------------------------------------------------+-----------------------+ | :ref:`Color` | :ref:`old_color` | ``Color(0, 0, 0, 1)`` | @@ -96,51 +98,61 @@ 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:`color_script` | | + +-----------------------------------+---------------------------------------------------------------------------------------------------------+---------------------------+ + | :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 @@ -204,7 +216,7 @@ enum **ColorModeType**: :ref:`🔗` :ref:`ColorModeType` **MODE_RGB** = ``0`` -Allows editing the color with Red/Green/Blue sliders. +Allows editing the color with Red/Green/Blue sliders in sRGB color space. .. _class_ColorPicker_constant_MODE_HSV: @@ -220,7 +232,17 @@ Allows editing the color with Hue/Saturation/Value sliders. :ref:`ColorModeType` **MODE_RAW** = ``2`` -Allows the color R, G, B component values to go beyond 1.0, which can be used for certain special operations that require it (like tinting without darkening or rendering sprites in HDR). +**Deprecated:** This is replaced by :ref:`MODE_LINEAR`. + + + +.. _class_ColorPicker_constant_MODE_LINEAR: + +.. rst-class:: classref-enumeration-constant + +:ref:`ColorModeType` **MODE_LINEAR** = ``2`` + +Allows editing the color with Red/Green/Blue sliders in linear color space. .. _class_ColorPicker_constant_MODE_OKHSL: @@ -284,6 +306,22 @@ HSL OK Color Model circle color space. The color space shape and the shape select button are hidden. Can't be selected from the shapes popup. +.. _class_ColorPicker_constant_SHAPE_OK_HS_RECTANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PickerShapeType` **SHAPE_OK_HS_RECTANGLE** = ``5`` + +OKHSL Color Model rectangle with constant lightness. + +.. _class_ColorPicker_constant_SHAPE_OK_HL_RECTANGLE: + +.. rst-class:: classref-enumeration-constant + +:ref:`PickerShapeType` **SHAPE_OK_HL_RECTANGLE** = ``6`` + +OKHSL Color Model rectangle with constant saturation. + .. rst-class:: classref-section-separator ---- @@ -338,7 +376,7 @@ The currently selected color. - |void| **set_color_mode**\ (\ value\: :ref:`ColorModeType`\ ) - :ref:`ColorModeType` **get_color_mode**\ (\ ) -The currently selected color mode. See :ref:`ColorModeType`. +The currently selected color mode. .. rst-class:: classref-item-separator @@ -412,6 +450,23 @@ If ``true``, shows an alpha channel slider (opacity). ---- +.. _class_ColorPicker_property_edit_intensity: + +.. rst-class:: classref-property + +:ref:`bool` **edit_intensity** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_edit_intensity**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_editing_intensity**\ (\ ) + +If ``true``, shows an intensity slider. The intensity is applied as follows: multiply the color by ``2 ** intensity`` in linear RGB space, and then convert it back to sRGB. + +.. rst-class:: classref-item-separator + +---- + .. _class_ColorPicker_property_hex_visible: .. rst-class:: classref-property @@ -457,7 +512,7 @@ The currently stored old color. See also :ref:`display_old_color`\ ) - :ref:`PickerShapeType` **get_picker_shape**\ (\ ) -The shape of the color space view. See :ref:`PickerShapeType`. +The shape of the color space view. .. rst-class:: classref-item-separator @@ -600,6 +655,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,13 +775,13 @@ Custom texture for the hue selection slider on the right. ---- -.. _class_ColorPicker_theme_icon_color_okhsl_hue: +.. _class_ColorPicker_theme_icon_color_script: .. rst-class:: classref-themeproperty -:ref:`Texture2D` **color_okhsl_hue** :ref:`🔗` +:ref:`Texture2D` **color_script** :ref:`🔗` -Custom texture for the H slider in the OKHSL color mode. +The icon for the button that switches color text to hexadecimal. .. rst-class:: classref-item-separator @@ -780,6 +847,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,7 +939,44 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst index 17e80aa54e6..6d6f16f7f91 100644 --- a/classes/class_colorpickerbutton.rst +++ b/classes/class_colorpickerbutton.rst @@ -42,13 +42,15 @@ Properties .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`color` | ``Color(0, 0, 0, 1)`` | - +---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`edit_alpha` | ``true`` | - +---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | - +---------------------------+----------------------------------------------------------------+-------------------------------------------------------------------------------+ + +---------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(0, 0, 0, 1)`` | + +---------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`edit_alpha` | ``true`` | + +---------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`edit_intensity` | ``true`` | + +---------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | toggle_mode | ``true`` (overrides :ref:`BaseButton`) | + +---------------------------+------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -156,6 +158,23 @@ The currently selected color. If ``true``, the alpha channel in the displayed :ref:`ColorPicker` will be visible. +.. rst-class:: classref-item-separator + +---- + +.. _class_ColorPickerButton_property_edit_intensity: + +.. rst-class:: classref-property + +:ref:`bool` **edit_intensity** = ``true`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_edit_intensity**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_editing_intensity**\ (\ ) + +If ``true``, the intensity slider in the displayed :ref:`ColorPicker` will be visible. + .. rst-class:: classref-section-separator ---- @@ -207,6 +226,7 @@ Theme Property Descriptions The background of the color preview rect on the button. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_colorrect.rst b/classes/class_colorrect.rst index 3fdcc4fe82c..49489a6ae7f 100644 --- a/classes/class_colorrect.rst +++ b/classes/class_colorrect.rst @@ -63,6 +63,7 @@ Property Descriptions The fill color of the rectangle. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compositor.rst b/classes/class_compositor.rst index f0a727c3437..6a6f708ca78 100644 --- a/classes/class_compositor.rst +++ b/classes/class_compositor.rst @@ -65,6 +65,7 @@ Property Descriptions The custom :ref:`CompositorEffect`\ s that are applied during rendering of viewports using this compositor. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compositoreffect.rst b/classes/class_compositoreffect.rst index d0191447b80..88492917fd5 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: :: @@ -312,6 +312,7 @@ Method Descriptions Implement this function with your custom rendering code. ``effect_callback_type`` should always match the effect callback type you've specified in :ref:`effect_callback_type`. ``render_data`` provides access to the rendering state, it is only valid during rendering and should not be stored. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedcubemap.rst b/classes/class_compressedcubemap.rst index 56a0d5d51a6..b137adf7782 100644 --- a/classes/class_compressedcubemap.rst +++ b/classes/class_compressedcubemap.rst @@ -38,6 +38,7 @@ Using **VRAM Compressed** also improves loading times, as VRAM-compressed textur See :ref:`Cubemap` for a general description of cubemaps. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedcubemaparray.rst b/classes/class_compressedcubemaparray.rst index d742ee18a9c..fb943e2f21a 100644 --- a/classes/class_compressedcubemaparray.rst +++ b/classes/class_compressedcubemaparray.rst @@ -38,6 +38,7 @@ Using **VRAM Compressed** also improves loading times, as VRAM-compressed textur See :ref:`CubemapArray` for a general description of cubemap arrays. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedtexture2d.rst b/classes/class_compressedtexture2d.rst index 375930bab76..f083cc89927 100644 --- a/classes/class_compressedtexture2d.rst +++ b/classes/class_compressedtexture2d.rst @@ -101,6 +101,7 @@ Method Descriptions Loads the texture from the specified ``path``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedtexture2darray.rst b/classes/class_compressedtexture2darray.rst index 7115b4c31d2..b2c77650674 100644 --- a/classes/class_compressedtexture2darray.rst +++ b/classes/class_compressedtexture2darray.rst @@ -38,6 +38,7 @@ Using **VRAM Compressed** also improves loading times, as VRAM-compressed textur See :ref:`Texture2DArray` for a general description of texture arrays. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedtexture3d.rst b/classes/class_compressedtexture3d.rst index c3816cc1b35..802f233a6b4 100644 --- a/classes/class_compressedtexture3d.rst +++ b/classes/class_compressedtexture3d.rst @@ -89,6 +89,7 @@ Method Descriptions Loads the texture from the specified ``path``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedtexturelayered.rst b/classes/class_compressedtexturelayered.rst index 12279438b8c..6d43948f345 100644 --- a/classes/class_compressedtexturelayered.rst +++ b/classes/class_compressedtexturelayered.rst @@ -87,6 +87,7 @@ Method Descriptions Loads the texture at ``path``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index ba2bbb0db8a..65a7777d0d6 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -66,6 +66,7 @@ The array of points that make up the **ConcavePolygonShape2D**'s line segments. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_concavepolygonshape3d.rst b/classes/class_concavepolygonshape3d.rst index cf1eb3ca3be..eead3b9f192 100644 --- a/classes/class_concavepolygonshape3d.rst +++ b/classes/class_concavepolygonshape3d.rst @@ -114,6 +114,7 @@ Returns the faces of the trimesh shape as an array of vertices. The array (of le Sets the faces of the trimesh shape from an array of vertices. The ``faces`` array should be composed of triples such that each triple of vertices defines a triangle. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_conetwistjoint3d.rst b/classes/class_conetwistjoint3d.rst index 7c223b8d65a..17f85cff781 100644 --- a/classes/class_conetwistjoint3d.rst +++ b/classes/class_conetwistjoint3d.rst @@ -29,17 +29,17 @@ Properties .. table:: :widths: auto - +---------------------------+---------------------------------------------------------------+--------------+ - | :ref:`float` | :ref:`bias` | ``0.3`` | - +---------------------------+---------------------------------------------------------------+--------------+ - | :ref:`float` | :ref:`relaxation` | ``1.0`` | - +---------------------------+---------------------------------------------------------------+--------------+ - | :ref:`float` | :ref:`softness` | ``0.8`` | - +---------------------------+---------------------------------------------------------------+--------------+ - | :ref:`float` | :ref:`swing_span` | ``0.785398`` | - +---------------------------+---------------------------------------------------------------+--------------+ - | :ref:`float` | :ref:`twist_span` | ``3.14159`` | - +---------------------------+---------------------------------------------------------------+--------------+ + +---------------------------+---------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`bias` | ``0.3`` | + +---------------------------+---------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`relaxation` | ``1.0`` | + +---------------------------+---------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`softness` | ``0.8`` | + +---------------------------+---------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`swing_span` | ``0.7853982`` | + +---------------------------+---------------------------------------------------------------+---------------+ + | :ref:`float` | :ref:`twist_span` | ``3.1415927`` | + +---------------------------+---------------------------------------------------------------+---------------+ .. rst-class:: classref-reftable-group @@ -194,7 +194,7 @@ The ease with which the joint starts to twist. If it's too low, it takes more fo .. rst-class:: classref-property -:ref:`float` **swing_span** = ``0.785398`` :ref:`🔗` +:ref:`float` **swing_span** = ``0.7853982`` :ref:`🔗` .. rst-class:: classref-property-setget @@ -217,7 +217,7 @@ If below 0.05, this behavior is locked. .. rst-class:: classref-property -:ref:`float` **twist_span** = ``3.14159`` :ref:`🔗` +:ref:`float` **twist_span** = ``3.1415927`` :ref:`🔗` .. rst-class:: classref-property-setget @@ -258,6 +258,7 @@ Returns the value of the specified parameter. Sets the value of the specified parameter. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index 775b2b149fc..e794b8f8f13 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -39,13 +39,13 @@ The following example shows how to create a simple **ConfigFile** and save it on # Create new ConfigFile object. var config = ConfigFile.new() - + # Store some values. config.set_value("Player1", "player_name", "Steve") config.set_value("Player1", "best_score", 10) config.set_value("Player2", "player_name", "V3geta") config.set_value("Player2", "best_score", 9001) - + # Save it to a file (overwrite if already exists). config.save("user://scores.cfg") @@ -53,13 +53,13 @@ The following example shows how to create a simple **ConfigFile** and save it on // Create new ConfigFile object. var config = new ConfigFile(); - + // Store some values. config.SetValue("Player1", "player_name", "Steve"); config.SetValue("Player1", "best_score", 10); config.SetValue("Player2", "player_name", "V3geta"); config.SetValue("Player2", "best_score", 9001); - + // Save it to a file (overwrite if already exists). config.Save("user://scores.cfg"); @@ -74,14 +74,14 @@ This example shows how the above file could be loaded: var score_data = {} var config = ConfigFile.new() - + # Load data from a file. var err = config.load("user://scores.cfg") - + # If the file didn't load, ignore it. if err != OK: return - + # Iterate over all sections. for player in config.get_sections(): # Fetch the data for each section. @@ -93,16 +93,16 @@ This example shows how the above file could be loaded: var score_data = new Godot.Collections.Dictionary(); var config = new ConfigFile(); - + // Load data from a file. Error err = config.Load("user://scores.cfg"); - + // If the file didn't load, ignore it. if (err != Error.Ok) { return; } - + // Iterate over all sections. foreach (String player in config.GetSections()) { @@ -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. @@ -390,6 +390,7 @@ Returns :ref:`@GlobalScope.OK` on success, or on Assigns a value to the specified key of the specified section. If either the section or the key do not exist, they are created. Passing a ``null`` value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_confirmationdialog.rst b/classes/class_confirmationdialog.rst index 07d76d6ee8c..3f18f17eb71 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 @@ -110,6 +110,7 @@ Returns the cancel button. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible` property. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_container.rst b/classes/class_container.rst index cc63da1412a..fd64a118f07 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. @@ -172,6 +172,7 @@ Fit a child control in a given rect. This is mainly a helper for creating custom Queue resort of the contained children. This is called automatically anyway, but can be called upon request. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_control.rst b/classes/class_control.rst index 3f4f20b3ba4..25ea7931122 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 @@ -66,89 +66,107 @@ Properties .. table:: :widths: auto - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`anchor_bottom` | ``0.0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`anchor_left` | ``0.0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`anchor_right` | ``0.0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`anchor_top` | ``0.0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`auto_translate` | | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`clip_contents` | ``false`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`custom_minimum_size` | ``Vector2(0, 0)`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`FocusMode` | :ref:`focus_mode` | ``0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_bottom` | ``NodePath("")`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_left` | ``NodePath("")`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_right` | ``NodePath("")`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`focus_neighbor_top` | ``NodePath("")`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`focus_next` | ``NodePath("")`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`focus_previous` | ``NodePath("")`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`global_position` | | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`GrowDirection` | :ref:`grow_horizontal` | ``1`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`GrowDirection` | :ref:`grow_vertical` | ``1`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`LayoutDirection` | :ref:`layout_direction` | ``0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`localize_numeral_system` | ``true`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`CursorShape` | :ref:`mouse_default_cursor_shape` | ``0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`MouseFilter` | :ref:`mouse_filter` | ``0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`mouse_force_pass_scroll_events` | ``true`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`offset_bottom` | ``0.0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`offset_left` | ``0.0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`offset_right` | ``0.0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`offset_top` | ``0.0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`pivot_offset` | ``Vector2(0, 0)`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`rotation` | ``0.0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`rotation_degrees` | | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`shortcut_context` | | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | |bitfield|\[:ref:`SizeFlags`\] | :ref:`size_flags_horizontal` | ``1`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`size_flags_stretch_ratio` | ``1.0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | |bitfield|\[:ref:`SizeFlags`\] | :ref:`size_flags_vertical` | ``1`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`Theme` | :ref:`theme` | | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`AutoTranslateMode` | :ref:`tooltip_auto_translate_mode` | ``0`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`tooltip_text` | ``""`` | - +---------------------------------------------------------------------+----------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`NodePath`\] | :ref:`accessibility_controls_nodes` | ``[]`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`NodePath`\] | :ref:`accessibility_described_by_nodes` | ``[]`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`accessibility_description` | ``""`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`NodePath`\] | :ref:`accessibility_flow_to_nodes` | ``[]`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`NodePath`\] | :ref:`accessibility_labeled_by_nodes` | ``[]`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`AccessibilityLiveMode` | :ref:`accessibility_live` | ``0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`accessibility_name` | ``""`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_bottom` | ``0.0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_left` | ``0.0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_right` | ``0.0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`anchor_top` | ``0.0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`auto_translate` | | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`clip_contents` | ``false`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :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("")`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_neighbor_left` | ``NodePath("")`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_neighbor_right` | ``NodePath("")`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_neighbor_top` | ``NodePath("")`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_next` | ``NodePath("")`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`focus_previous` | ``NodePath("")`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`global_position` | | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`GrowDirection` | :ref:`grow_horizontal` | ``1`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`GrowDirection` | :ref:`grow_vertical` | ``1`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`LayoutDirection` | :ref:`layout_direction` | ``0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :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`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`mouse_force_pass_scroll_events` | ``true`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_bottom` | ``0.0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_left` | ``0.0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_right` | ``0.0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`offset_top` | ``0.0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`pivot_offset` | ``Vector2(0, 0)`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`position` | ``Vector2(0, 0)`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rotation` | ``0.0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`rotation_degrees` | | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`scale` | ``Vector2(1, 1)`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Node` | :ref:`shortcut_context` | | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`size` | ``Vector2(0, 0)`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`SizeFlags`\] | :ref:`size_flags_horizontal` | ``1`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`size_flags_stretch_ratio` | ``1.0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`SizeFlags`\] | :ref:`size_flags_vertical` | ``1`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`Theme` | :ref:`theme` | | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`StringName` | :ref:`theme_type_variation` | ``&""`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`AutoTranslateMode` | :ref:`tooltip_auto_translate_mode` | ``0`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`tooltip_text` | ``""`` | + +------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -158,11 +176,15 @@ 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| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_drop_data`\ (\ at_position\: :ref:`Vector2`, data\: :ref:`Variant`\ ) |virtual| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_accessibility_container_name`\ (\ node\: :ref:`Node`\ ) |virtual| |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`_get_drag_data`\ (\ at_position\: :ref:`Vector2`\ ) |virtual| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`_get_minimum_size`\ (\ ) |virtual| |const| | @@ -179,6 +201,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 +239,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 +526,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 +764,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 +772,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 +780,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 +788,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 +796,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 +804,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 +812,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 +820,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 +828,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 +836,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 +844,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 +852,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 +860,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 +868,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 +876,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 +884,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 +1004,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 +1012,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 +1022,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 +1076,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 +1084,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 +1110,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 +1134,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 +1299,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 +1335,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 @@ -1240,6 +1346,125 @@ Sent when control layout direction is changed. Property Descriptions --------------------- +.. _class_Control_property_accessibility_controls_nodes: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`NodePath`\] **accessibility_controls_nodes** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_accessibility_controls_nodes**\ (\ value\: :ref:`Array`\[:ref:`NodePath`\]\ ) +- :ref:`Array`\[:ref:`NodePath`\] **get_accessibility_controls_nodes**\ (\ ) + +The paths to the nodes which are controlled by this node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Control_property_accessibility_described_by_nodes: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`NodePath`\] **accessibility_described_by_nodes** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_accessibility_described_by_nodes**\ (\ value\: :ref:`Array`\[:ref:`NodePath`\]\ ) +- :ref:`Array`\[:ref:`NodePath`\] **get_accessibility_described_by_nodes**\ (\ ) + +The paths to the nodes which are describing this node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Control_property_accessibility_description: + +.. rst-class:: classref-property + +:ref:`String` **accessibility_description** = ``""`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_accessibility_description**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_accessibility_description**\ (\ ) + +The human-readable node description that is reported to assistive apps. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Control_property_accessibility_flow_to_nodes: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`NodePath`\] **accessibility_flow_to_nodes** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_accessibility_flow_to_nodes**\ (\ value\: :ref:`Array`\[:ref:`NodePath`\]\ ) +- :ref:`Array`\[:ref:`NodePath`\] **get_accessibility_flow_to_nodes**\ (\ ) + +The paths to the nodes which this node flows into. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Control_property_accessibility_labeled_by_nodes: + +.. rst-class:: classref-property + +:ref:`Array`\[:ref:`NodePath`\] **accessibility_labeled_by_nodes** = ``[]`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_accessibility_labeled_by_nodes**\ (\ value\: :ref:`Array`\[:ref:`NodePath`\]\ ) +- :ref:`Array`\[:ref:`NodePath`\] **get_accessibility_labeled_by_nodes**\ (\ ) + +The paths to the nodes which label this node. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Control_property_accessibility_live: + +.. rst-class:: classref-property + +:ref:`AccessibilityLiveMode` **accessibility_live** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_accessibility_live**\ (\ value\: :ref:`AccessibilityLiveMode`\ ) +- :ref:`AccessibilityLiveMode` **get_accessibility_live**\ (\ ) + +The mode with which a live region updates. A live region is a :ref:`Node` that is updated as a result of an external event when the user's focus may be elsewhere. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Control_property_accessibility_name: + +.. rst-class:: classref-property + +:ref:`String` **accessibility_name** = ``""`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_accessibility_name**\ (\ value\: :ref:`String`\ ) +- :ref:`String` **get_accessibility_name**\ (\ ) + +The human-readable node name that is reported to assistive apps. + +.. rst-class:: classref-item-separator + +---- + .. _class_Control_property_anchor_bottom: .. rst-class:: classref-property @@ -1315,7 +1540,7 @@ Anchors the top edge of the node to the origin, the center or the end of its par - |void| **set_auto_translate**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_auto_translating**\ (\ ) -**Deprecated:** Use :ref:`Node.auto_translate_mode` instead. +**Deprecated:** Use :ref:`Node.auto_translate_mode` and :ref:`Node.can_auto_translate()` instead. Toggles if any text should automatically change to its translated version depending on the current locale. @@ -1351,7 +1576,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 +1610,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 +1783,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 +1802,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 +1855,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 +1872,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. @@ -1779,7 +2038,7 @@ Helper property to access :ref:`rotation` in de - |void| **set_scale**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_scale**\ (\ ) -The node's scale, relative to its :ref:`size`. Change this property to scale the node around its :ref:`pivot_offset`. The Control's :ref:`tooltip_text` will also scale according to this value. +The node's scale, relative to its :ref:`size`. Change this property to scale the node around its :ref:`pivot_offset`. The Control's tooltip will also scale according to this value. \ **Note:** This property is mainly intended to be used for animation purposes. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the :doc:`documentation <../tutorials/rendering/multiple_resolutions>` instead of scaling Controls individually. @@ -1907,7 +2166,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 +2189,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 +2208,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 +2244,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 the drag was initiated by a keyboard shortcut or :ref:`accessibility_drag()`, ``at_position`` is set to :ref:`Vector2.INF`, and the currently selected item/text position should be used as the drop position. .. tabs:: @@ -2026,7 +2299,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 the drag was initiated by a keyboard shortcut or :ref:`accessibility_drag()`, ``at_position`` is set to :ref:`Vector2.INF`, and the currently selected item/text position should be used as the drop position. .. tabs:: @@ -2035,7 +2310,7 @@ Redot calls this method to pass you the ``data`` from a control's :ref:`_get_dra func _can_drop_data(position, data): return typeof(data) == TYPE_DICTIONARY and data.has("color") - + func _drop_data(position, data): var color = data["color"] @@ -2045,7 +2320,7 @@ Redot calls this method to pass you the ``data`` from a control's :ref:`_get_dra { return data.VariantType == Variant.Type.Dictionary && data.AsGodotDictionary().ContainsKey("color"); } - + public override void _DropData(Vector2 atPosition, Variant data) { Color color = data.AsGodotDictionary()["color"].AsColor(); @@ -2053,6 +2328,18 @@ Redot calls this method to pass you the ``data`` from a control's :ref:`_get_dra +.. rst-class:: classref-item-separator + +---- + +.. _class_Control_private_method__get_accessibility_container_name: + +.. rst-class:: classref-method + +:ref:`String` **_get_accessibility_container_name**\ (\ node\: :ref:`Node`\ ) |virtual| |const| :ref:`🔗` + +Override this method to return a human-readable description of the position of the child ``node`` in the custom container, added to the :ref:`accessibility_name`. + .. rst-class:: classref-item-separator ---- @@ -2063,9 +2350,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 the drag was initiated by a keyboard shortcut or :ref:`accessibility_drag()`, ``at_position`` is set to :ref:`Vector2.INF`, and the currently selected item/text position should be used as the drag position. .. tabs:: @@ -2114,9 +2403,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 +2417,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 +2456,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 +2486,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 +2568,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 +2576,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 +2645,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 +2659,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 +2673,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 +2687,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 +2701,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 +2746,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 +2758,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 +2796,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 +2808,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 +2846,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 +2858,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. .. rst-class:: classref-item-separator @@ -2563,6 +2876,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 +2896,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 +2930,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 +3024,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 +3061,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 +3075,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 +3089,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 +3103,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 +3117,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 +3131,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 +3145,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 +3159,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 +3173,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 +3218,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 +3244,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 +3258,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 +3272,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 +3286,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 +3300,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 +3314,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 +3328,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 +3342,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 +3356,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 +3370,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 +3384,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 +3398,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 +3410,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 +3424,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 +3448,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 +3460,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 +3472,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 +3484,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 +3496,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 +3508,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 +3520,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 +3548,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 +3560,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 +3602,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 +3618,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:: @@ -3289,7 +3626,7 @@ Shows the given control at the mouse pointer. A good time to call this method is .. code-tab:: gdscript @export var color = Color(1, 0, 0, 1) - + func _get_drag_data(position): # Use a control that is not in the tree var cpb = ColorPickerButton.new() @@ -3302,7 +3639,7 @@ Shows the given control at the mouse pointer. A good time to call this method is [Export] private Color _color = new Color(1, 0, 0, 1); - + public override Variant _GetDragData(Vector2 atPosition) { // Use a control that is not in the tree @@ -3419,7 +3756,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,9 +3770,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_converttransformmodifier3d.rst b/classes/class_converttransformmodifier3d.rst new file mode 100644 index 00000000000..94058ab2e9d --- /dev/null +++ b/classes/class_converttransformmodifier3d.rst @@ -0,0 +1,426 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/ConvertTransformModifier3D.xml. + +.. _class_ConvertTransformModifier3D: + +ConvertTransformModifier3D +========================== + +**Inherits:** :ref:`BoneConstraint3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +A :ref:`SkeletonModifier3D` that apply transform to the bone which converted from reference. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Apply the copied transform of the bone set by :ref:`BoneConstraint3D.set_reference_bone()` to the bone set by :ref:`BoneConstraint3D.set_apply_bone()` about the specific axis with remapping it with some options. + +There are 4 ways to apply the transform, depending on the combination of :ref:`set_relative()` and :ref:`set_additive()`. + +\ **Relative + Additive:**\ + +- Extract reference pose relative to the rest and add it to the apply bone's pose. + +\ **Relative + Not Additive:**\ + +- Extract reference pose relative to the rest and add it to the apply bone's rest. + +\ **Not Relative + Additive:**\ + +- Extract reference pose absolutely and add it to the apply bone's pose. + +\ **Not Relative + Not Additive:**\ + +- Extract reference pose absolutely and the apply bone's pose is replaced with it. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+-------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`setting_count` | ``0`` | + +-----------------------+-------------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Axis` | :ref:`get_apply_axis`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_apply_range_max`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_apply_range_min`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransformMode` | :ref:`get_apply_transform_mode`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Axis` | :ref:`get_reference_axis`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_reference_range_max`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_reference_range_min`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransformMode` | :ref:`get_reference_transform_mode`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_additive`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_relative`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additive`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_axis`\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_range_max`\ (\ index\: :ref:`int`, range_max\: :ref:`float`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_range_min`\ (\ index\: :ref:`int`, range_min\: :ref:`float`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_transform_mode`\ (\ index\: :ref:`int`, transform_mode\: :ref:`TransformMode`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_axis`\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_range_max`\ (\ index\: :ref:`int`, range_max\: :ref:`float`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_range_min`\ (\ index\: :ref:`int`, range_min\: :ref:`float`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_transform_mode`\ (\ index\: :ref:`int`, transform_mode\: :ref:`TransformMode`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_relative`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_ConvertTransformModifier3D_TransformMode: + +.. rst-class:: classref-enumeration + +enum **TransformMode**: :ref:`🔗` + +.. _class_ConvertTransformModifier3D_constant_TRANSFORM_MODE_POSITION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformMode` **TRANSFORM_MODE_POSITION** = ``0`` + +Convert with position. Transfer the difference. + +.. _class_ConvertTransformModifier3D_constant_TRANSFORM_MODE_ROTATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformMode` **TRANSFORM_MODE_ROTATION** = ``1`` + +Convert with rotation. The angle is the roll for the specified axis. + +.. _class_ConvertTransformModifier3D_constant_TRANSFORM_MODE_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformMode` **TRANSFORM_MODE_SCALE** = ``2`` + +Convert with scale. Transfers the ratio, not the difference. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_ConvertTransformModifier3D_property_setting_count: + +.. rst-class:: classref-property + +:ref:`int` **setting_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_setting_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_setting_count**\ (\ ) + +The number of settings in the modifier. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_ConvertTransformModifier3D_method_get_apply_axis: + +.. rst-class:: classref-method + +:ref:`Axis` **get_apply_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the axis of the remapping destination transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_apply_range_max: + +.. rst-class:: classref-method + +:ref:`float` **get_apply_range_max**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the maximum value of the remapping destination range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_apply_range_min: + +.. rst-class:: classref-method + +:ref:`float` **get_apply_range_min**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the minimum value of the remapping destination range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_apply_transform_mode: + +.. rst-class:: classref-method + +:ref:`TransformMode` **get_apply_transform_mode**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the operation of the remapping destination transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_reference_axis: + +.. rst-class:: classref-method + +:ref:`Axis` **get_reference_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the axis of the remapping source transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_reference_range_max: + +.. rst-class:: classref-method + +:ref:`float` **get_reference_range_max**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the maximum value of the remapping source range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_reference_range_min: + +.. rst-class:: classref-method + +:ref:`float` **get_reference_range_min**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the minimum value of the remapping source range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_reference_transform_mode: + +.. rst-class:: classref-method + +:ref:`TransformMode` **get_reference_transform_mode**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the operation of the remapping source transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_is_additive: + +.. rst-class:: classref-method + +:ref:`bool` **is_additive**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the additive option is enabled in the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_is_relative: + +.. rst-class:: classref-method + +:ref:`bool` **is_relative**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the relative option is enabled in the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_additive: + +.. rst-class:: classref-method + +|void| **set_additive**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +Sets additive option in the setting at ``index`` to ``enabled``. This mainly affects the process of applying transform to the :ref:`BoneConstraint3D.set_apply_bone()`. + +If sets ``enabled`` to ``true``, the processed transform is added to the pose of the current apply bone. + +If sets ``enabled`` to ``false``, the pose of the current apply bone is replaced with the processed transform. However, if set :ref:`set_relative()` to ``true``, the transform is relative to rest. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_apply_axis: + +.. rst-class:: classref-method + +|void| **set_apply_axis**\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) :ref:`🔗` + +Sets the axis of the remapping destination transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_apply_range_max: + +.. rst-class:: classref-method + +|void| **set_apply_range_max**\ (\ index\: :ref:`int`, range_max\: :ref:`float`\ ) :ref:`🔗` + +Sets the maximum value of the remapping destination range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_apply_range_min: + +.. rst-class:: classref-method + +|void| **set_apply_range_min**\ (\ index\: :ref:`int`, range_min\: :ref:`float`\ ) :ref:`🔗` + +Sets the minimum value of the remapping destination range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_apply_transform_mode: + +.. rst-class:: classref-method + +|void| **set_apply_transform_mode**\ (\ index\: :ref:`int`, transform_mode\: :ref:`TransformMode`\ ) :ref:`🔗` + +Sets the operation of the remapping destination transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_reference_axis: + +.. rst-class:: classref-method + +|void| **set_reference_axis**\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) :ref:`🔗` + +Sets the axis of the remapping source transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_reference_range_max: + +.. rst-class:: classref-method + +|void| **set_reference_range_max**\ (\ index\: :ref:`int`, range_max\: :ref:`float`\ ) :ref:`🔗` + +Sets the maximum value of the remapping source range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_reference_range_min: + +.. rst-class:: classref-method + +|void| **set_reference_range_min**\ (\ index\: :ref:`int`, range_min\: :ref:`float`\ ) :ref:`🔗` + +Sets the minimum value of the remapping source range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_reference_transform_mode: + +.. rst-class:: classref-method + +|void| **set_reference_transform_mode**\ (\ index\: :ref:`int`, transform_mode\: :ref:`TransformMode`\ ) :ref:`🔗` + +Sets the operation of the remapping source transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_relative: + +.. rst-class:: classref-method + +|void| **set_relative**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +Sets relative option in the setting at ``index`` to ``enabled``. + +If sets ``enabled`` to ``true``, the extracted and applying transform is relative to the rest. + +If sets ``enabled`` to ``false``, the extracted transform is absolute. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` +.. |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.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index 255b84a079a..b155cbb858d 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,9 +92,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_convexpolygonshape3d.rst b/classes/class_convexpolygonshape3d.rst index 6da2de6adf9..33781b61eb7 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. @@ -71,6 +71,7 @@ The list of 3D points forming the convex polygon shape. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_copytransformmodifier3d.rst b/classes/class_copytransformmodifier3d.rst new file mode 100644 index 00000000000..a299e191ff1 --- /dev/null +++ b/classes/class_copytransformmodifier3d.rst @@ -0,0 +1,594 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/doc/classes/CopyTransformModifier3D.xml. + +.. _class_CopyTransformModifier3D: + +CopyTransformModifier3D +======================= + +**Inherits:** :ref:`BoneConstraint3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +A :ref:`SkeletonModifier3D` that apply transform to the bone which copied from reference. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Apply the copied transform of the bone set by :ref:`BoneConstraint3D.set_reference_bone()` to the bone set by :ref:`BoneConstraint3D.set_apply_bone()` with processing it with some masks and options. + +There are 4 ways to apply the transform, depending on the combination of :ref:`set_relative()` and :ref:`set_additive()`. + +\ **Relative + Additive:**\ + +- Extract reference pose relative to the rest and add it to the apply bone's pose. + +\ **Relative + Not Additive:**\ + +- Extract reference pose relative to the rest and add it to the apply bone's rest. + +\ **Not Relative + Additive:**\ + +- Extract reference pose absolutely and add it to the apply bone's pose. + +\ **Not Relative + Not Additive:**\ + +- Extract reference pose absolutely and the apply bone's pose is replaced with it. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`setting_count` | ``0`` | + +-----------------------+----------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`AxisFlag`\] | :ref:`get_axis_flags`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`TransformFlag`\] | :ref:`get_copy_flags`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`AxisFlag`\] | :ref:`get_invert_flags`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_additive`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_x_enabled`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_x_inverted`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_y_enabled`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_y_inverted`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_z_enabled`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_z_inverted`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_position_copying`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_relative`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_rotation_copying`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_scale_copying`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additive`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_flags`\ (\ index\: :ref:`int`, axis_flags\: |bitfield|\[:ref:`AxisFlag`\]\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_x_enabled`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_x_inverted`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_y_enabled`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_y_inverted`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_z_enabled`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_z_inverted`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_copy_flags`\ (\ index\: :ref:`int`, copy_flags\: |bitfield|\[:ref:`TransformFlag`\]\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_copy_position`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_copy_rotation`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_copy_scale`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_invert_flags`\ (\ index\: :ref:`int`, axis_flags\: |bitfield|\[:ref:`AxisFlag`\]\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_relative`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_CopyTransformModifier3D_TransformFlag: + +.. rst-class:: classref-enumeration + +flags **TransformFlag**: :ref:`🔗` + +.. _class_CopyTransformModifier3D_constant_TRANSFORM_FLAG_POSITION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformFlag` **TRANSFORM_FLAG_POSITION** = ``1`` + +If set, allows to copy the position. + +.. _class_CopyTransformModifier3D_constant_TRANSFORM_FLAG_ROTATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformFlag` **TRANSFORM_FLAG_ROTATION** = ``2`` + +If set, allows to copy the rotation. + +.. _class_CopyTransformModifier3D_constant_TRANSFORM_FLAG_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformFlag` **TRANSFORM_FLAG_SCALE** = ``4`` + +If set, allows to copy the scale. + +.. _class_CopyTransformModifier3D_constant_TRANSFORM_FLAG_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformFlag` **TRANSFORM_FLAG_ALL** = ``7`` + +If set, allows to copy the position/rotation/scale. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_CopyTransformModifier3D_AxisFlag: + +.. rst-class:: classref-enumeration + +flags **AxisFlag**: :ref:`🔗` + +.. _class_CopyTransformModifier3D_constant_AXIS_FLAG_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisFlag` **AXIS_FLAG_X** = ``1`` + +If set, allows to process the X-axis. + +.. _class_CopyTransformModifier3D_constant_AXIS_FLAG_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisFlag` **AXIS_FLAG_Y** = ``2`` + +If set, allows to process the Y-axis. + +.. _class_CopyTransformModifier3D_constant_AXIS_FLAG_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisFlag` **AXIS_FLAG_Z** = ``4`` + +If set, allows to process the Z-axis. + +.. _class_CopyTransformModifier3D_constant_AXIS_FLAG_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisFlag` **AXIS_FLAG_ALL** = ``7`` + +If set, allows to process the all axes. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_CopyTransformModifier3D_property_setting_count: + +.. rst-class:: classref-property + +:ref:`int` **setting_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_setting_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_setting_count**\ (\ ) + +The number of settings in the modifier. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_CopyTransformModifier3D_method_get_axis_flags: + +.. rst-class:: classref-method + +|bitfield|\[:ref:`AxisFlag`\] **get_axis_flags**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the axis flags of the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_get_copy_flags: + +.. rst-class:: classref-method + +|bitfield|\[:ref:`TransformFlag`\] **get_copy_flags**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the copy flags of the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_get_invert_flags: + +.. rst-class:: classref-method + +|bitfield|\[:ref:`AxisFlag`\] **get_invert_flags**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the invert flags of the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_additive: + +.. rst-class:: classref-method + +:ref:`bool` **is_additive**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the additive option is enabled in the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_x_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_x_enabled**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the enable flags has the flag for the X-axis in the setting at ``index``. See also :ref:`set_axis_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_x_inverted: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_x_inverted**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the invert flags has the flag for the X-axis in the setting at ``index``. See also :ref:`set_invert_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_y_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_y_enabled**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the enable flags has the flag for the Y-axis in the setting at ``index``. See also :ref:`set_axis_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_y_inverted: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_y_inverted**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the invert flags has the flag for the Y-axis in the setting at ``index``. See also :ref:`set_invert_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_z_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_z_enabled**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the enable flags has the flag for the Z-axis in the setting at ``index``. See also :ref:`set_axis_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_z_inverted: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_z_inverted**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the invert flags has the flag for the Z-axis in the setting at ``index``. See also :ref:`set_invert_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_position_copying: + +.. rst-class:: classref-method + +:ref:`bool` **is_position_copying**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the copy flags has the flag for the position in the setting at ``index``. See also :ref:`set_copy_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_relative: + +.. rst-class:: classref-method + +:ref:`bool` **is_relative**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the relative option is enabled in the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_rotation_copying: + +.. rst-class:: classref-method + +:ref:`bool` **is_rotation_copying**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the copy flags has the flag for the rotation in the setting at ``index``. See also :ref:`set_copy_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_scale_copying: + +.. rst-class:: classref-method + +:ref:`bool` **is_scale_copying**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the copy flags has the flag for the scale in the setting at ``index``. See also :ref:`set_copy_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_additive: + +.. rst-class:: classref-method + +|void| **set_additive**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +Sets additive option in the setting at ``index`` to ``enabled``. This mainly affects the process of applying transform to the :ref:`BoneConstraint3D.set_apply_bone()`. + +If sets ``enabled`` to ``true``, the processed transform is added to the pose of the current apply bone. + +If sets ``enabled`` to ``false``, the pose of the current apply bone is replaced with the processed transform. However, if set :ref:`set_relative()` to ``true``, the transform is relative to rest. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_flags: + +.. rst-class:: classref-method + +|void| **set_axis_flags**\ (\ index\: :ref:`int`, axis_flags\: |bitfield|\[:ref:`AxisFlag`\]\ ) :ref:`🔗` + +Sets the flags to copy axes. If the flag is valid, the axis is copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_x_enabled: + +.. rst-class:: classref-method + +|void| **set_axis_x_enabled**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the X-axis will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_x_inverted: + +.. rst-class:: classref-method + +|void| **set_axis_x_inverted**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the X-axis will be inverted. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_y_enabled: + +.. rst-class:: classref-method + +|void| **set_axis_y_enabled**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the Y-axis will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_y_inverted: + +.. rst-class:: classref-method + +|void| **set_axis_y_inverted**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the Y-axis will be inverted. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_z_enabled: + +.. rst-class:: classref-method + +|void| **set_axis_z_enabled**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the Z-axis will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_z_inverted: + +.. rst-class:: classref-method + +|void| **set_axis_z_inverted**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the Z-axis will be inverted. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_copy_flags: + +.. rst-class:: classref-method + +|void| **set_copy_flags**\ (\ index\: :ref:`int`, copy_flags\: |bitfield|\[:ref:`TransformFlag`\]\ ) :ref:`🔗` + +Sets the flags to process the transform operations. If the flag is valid, the transform operation is processed. + +\ **Note:** If the rotation is valid for only one axis, it respects the roll of the valid axis. If the rotation is valid for two axes, it discards the roll of the invalid axis. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_copy_position: + +.. rst-class:: classref-method + +|void| **set_copy_position**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the position will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_copy_rotation: + +.. rst-class:: classref-method + +|void| **set_copy_rotation**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the rotation will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_copy_scale: + +.. rst-class:: classref-method + +|void| **set_copy_scale**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the scale will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_invert_flags: + +.. rst-class:: classref-method + +|void| **set_invert_flags**\ (\ index\: :ref:`int`, axis_flags\: |bitfield|\[:ref:`AxisFlag`\]\ ) :ref:`🔗` + +Sets the flags to inverte axes. If the flag is valid, the axis is copied. + +\ **Note:** An inverted scale means an inverse number, not a negative scale. For example, inverting ``2.0`` means ``0.5``. + +\ **Note:** An inverted rotation flips the elements of the quaternion. For example, a two-axis inversion will flip the roll of each axis, and a three-axis inversion will flip the final orientation. However, be aware that flipping only one axis may cause unintended rotation by the unflipped axes, due to the characteristics of the quaternion. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_relative: + +.. rst-class:: classref-method + +|void| **set_relative**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +Sets relative option in the setting at ``index`` to ``enabled``. + +If sets ``enabled`` to ``true``, the extracted and applying transform is relative to the rest. + +If sets ``enabled`` to ``false``, the extracted transform is absolute. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` +.. |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.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index 1a772e52267..f6a83108a7c 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 @@ -832,7 +840,7 @@ Unit vector specifying the particles' emission direction. - |void| **set_draw_order**\ (\ value\: :ref:`DrawOrder`\ ) - :ref:`DrawOrder` **get_draw_order**\ (\ ) -Particle draw order. Uses :ref:`DrawOrder` values. +Particle draw order. .. rst-class:: classref-item-separator @@ -923,7 +931,7 @@ The rectangle's extents if :ref:`emission_shape`\ ) - :ref:`EmissionShape` **get_emission_shape**\ (\ ) -Particles will be emitted inside this region. See :ref:`EmissionShape` for possible values. +Particles will be emitted inside this region. .. 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 ---- @@ -1655,7 +1697,21 @@ Returns the minimum value range for the given parameter. :ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| :ref:`🔗` -Returns the enabled state of the given particle flag (see :ref:`ParticleFlags` for options). +Returns the enabled state of the given particle flag. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CPUParticles2D_method_request_particles_process: + +.. rst-class:: classref-method + +|void| **request_particles_process**\ (\ process_time\: :ref:`float`\ ) :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 @@ -1665,10 +1721,12 @@ Returns the enabled state of the given particle flag (see :ref:`ParticleFlags` +|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 ---- @@ -1715,9 +1773,10 @@ Sets the minimum value for the given parameter. |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) :ref:`🔗` -Enables or disables the given flag (see :ref:`ParticleFlags` for options). +Enables or disables the given particle flag. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index 99418a53cb4..ed836ccd0a6 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. @@ -874,7 +880,7 @@ Unit vector specifying the particles' emission direction. - |void| **set_draw_order**\ (\ value\: :ref:`DrawOrder`\ ) - :ref:`DrawOrder` **get_draw_order**\ (\ ) -Particle draw order. Uses :ref:`DrawOrder` values. +Particle draw order. .. rst-class:: classref-item-separator @@ -1054,7 +1060,7 @@ The radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`\ ) - :ref:`EmissionShape` **get_emission_shape**\ (\ ) -Particles will be emitted inside this region. See :ref:`EmissionShape` for possible values. +Particles will be emitted inside this region. .. rst-class:: classref-item-separator @@ -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 @@ -1881,7 +1921,21 @@ Returns the minimum value range for the given parameter. :ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| :ref:`🔗` -Returns the enabled state of the given particle flag (see :ref:`ParticleFlags` for options). +Returns the enabled state of the given particle flag. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CPUParticles3D_method_request_particles_process: + +.. rst-class:: classref-method + +|void| **request_particles_process**\ (\ process_time\: :ref:`float`\ ) :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 @@ -1891,10 +1945,12 @@ Returns the enabled state of the given particle flag (see :ref:`ParticleFlags` +|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 ---- @@ -1941,9 +1997,10 @@ Sets the minimum value for the given parameter. |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) :ref:`🔗` -Enables or disables the given particle flag (see :ref:`ParticleFlags` for options). +Enables or disables the given particle flag. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_crypto.rst b/classes/class_crypto.rst index cb33d1c874b..ed570837c08 100644 --- a/classes/class_crypto.rst +++ b/classes/class_crypto.rst @@ -29,30 +29,30 @@ Currently, this includes asymmetric key encryption/decryption, signing/verificat .. code-tab:: gdscript var crypto = Crypto.new() - + # Generate new RSA key. var key = crypto.generate_rsa(4096) - + # Generate new self-signed certificate with the given key. var cert = crypto.generate_self_signed_certificate(key, "CN=mydomain.com,O=My Game Company,C=IT") - + # Save key and certificate in the user folder. key.save("user://generated.key") cert.save("user://generated.crt") - + # Encryption var data = "Some data" var encrypted = crypto.encrypt(key, data.to_utf8_buffer()) - + # Decryption var decrypted = crypto.decrypt(key, encrypted) - + # Signing var signature = crypto.sign(HashingContext.HASH_SHA256, data.sha256_buffer(), key) - + # Verifying var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key) - + # Checks assert(verified) assert(data.to_utf8_buffer() == decrypted) @@ -61,32 +61,32 @@ Currently, this includes asymmetric key encryption/decryption, signing/verificat using Godot; using System.Diagnostics; - + Crypto crypto = new Crypto(); - + // Generate new RSA key. CryptoKey key = crypto.GenerateRsa(4096); - + // Generate new self-signed certificate with the given key. X509Certificate cert = crypto.GenerateSelfSignedCertificate(key, "CN=mydomain.com,O=My Game Company,C=IT"); - + // Save key and certificate in the user folder. key.Save("user://generated.key"); cert.Save("user://generated.crt"); - + // Encryption string data = "Some data"; byte[] encrypted = crypto.Encrypt(key, data.ToUtf8Buffer()); - + // Decryption byte[] decrypted = crypto.Decrypt(key, encrypted); - + // Signing byte[] signature = crypto.Sign(HashingContext.HashType.Sha256, Data.Sha256Buffer(), key); - + // Verifying bool verified = crypto.Verify(HashingContext.HashType.Sha256, Data.Sha256Buffer(), signature, key); - + // Checks Debug.Assert(verified); Debug.Assert(data.ToUtf8Buffer() == decrypted); @@ -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 @@ -266,6 +266,7 @@ Sign a given ``hash`` of type ``hash_type`` with the provided private ``key``. Verify that a given ``signature`` for ``hash`` of type ``hash_type`` against the provided public ``key``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cryptokey.rst b/classes/class_cryptokey.rst index 6ec058b5633..042acb70702 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 @@ -120,6 +120,7 @@ Saves a key to the given ``path``. If ``public_only`` is ``true``, only the publ Returns a string containing the key in PEM format. If ``public_only`` is ``true``, only the public key will be included. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgbox3d.rst b/classes/class_csgbox3d.rst index 5ec4e41775a..83491b7a93c 100644 --- a/classes/class_csgbox3d.rst +++ b/classes/class_csgbox3d.rst @@ -84,6 +84,7 @@ The material used to render the box. The box's width, height and depth. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgcombiner3d.rst b/classes/class_csgcombiner3d.rst index 033110579d6..140fe409b5e 100644 --- a/classes/class_csgcombiner3d.rst +++ b/classes/class_csgcombiner3d.rst @@ -31,6 +31,7 @@ Tutorials - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgcylinder3d.rst b/classes/class_csgcylinder3d.rst index 122d5e31103..29ea52fa08c 100644 --- a/classes/class_csgcylinder3d.rst +++ b/classes/class_csgcylinder3d.rst @@ -160,6 +160,7 @@ The number of sides of the cylinder, the higher this number the more detail ther If ``true`` the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If ``false`` the cylinder will have a flat shaded look. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgmesh3d.rst b/classes/class_csgmesh3d.rst index e5dc417c6de..28100e485de 100644 --- a/classes/class_csgmesh3d.rst +++ b/classes/class_csgmesh3d.rst @@ -90,6 +90,7 @@ The :ref:`Mesh` resource to use as a CSG shape. \ :ref:`Mesh.ARRAY_NORMAL` is only used to determine which faces require the use of flat shading. By default, CSGMesh will ignore the mesh's vertex normals, recalculate them for each vertex and use a smooth shader. If a flat shader is required for a face, ensure that all vertex normals of the face are approximately equal. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgpolygon3d.rst b/classes/class_csgpolygon3d.rst index 40319b8da1a..52945b4c44d 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 @@ -457,6 +476,7 @@ When :ref:`mode` is :ref:`MODE_SPIN` is :ref:`MODE_SPIN`, the number of extrusions made. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgprimitive3d.rst b/classes/class_csgprimitive3d.rst index 454c081d6cf..108116fcec8 100644 --- a/classes/class_csgprimitive3d.rst +++ b/classes/class_csgprimitive3d.rst @@ -67,6 +67,7 @@ Property Descriptions If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgshape3d.rst b/classes/class_csgshape3d.rst index b0f946e68e1..cc3ed1d5104 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 ---- @@ -363,6 +367,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgsphere3d.rst b/classes/class_csgsphere3d.rst index 6d415e22065..7372808ec72 100644 --- a/classes/class_csgsphere3d.rst +++ b/classes/class_csgsphere3d.rst @@ -141,6 +141,7 @@ Number of horizontal slices for the sphere. If ``true`` the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If ``false`` the sphere will have a flat shaded look. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgtorus3d.rst b/classes/class_csgtorus3d.rst index f7ea72521a4..cdb792f8b45 100644 --- a/classes/class_csgtorus3d.rst +++ b/classes/class_csgtorus3d.rst @@ -160,6 +160,7 @@ The number of slices the torus is constructed of. If ``true`` the normals of the torus are set to give a smooth effect making the torus seem rounded. If ``false`` the torus will have a flat shaded look. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csharpscript.rst b/classes/class_csharpscript.rst index 13c5f86ffa3..05e41731421 100644 --- a/classes/class_csharpscript.rst +++ b/classes/class_csharpscript.rst @@ -58,6 +58,7 @@ Method Descriptions Returns a new instance of the script. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cubemap.rst b/classes/class_cubemap.rst index 4232255e3af..debce41e04c 100644 --- a/classes/class_cubemap.rst +++ b/classes/class_cubemap.rst @@ -23,25 +23,27 @@ 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: .. code:: text shader_type sky; - + uniform samplerCube source_panorama : filter_linear, source_color, hint_default_black; uniform float exposure : hint_range(0, 128) = 1.0; - + void sky() { // If importing a cubemap from another engine, you may need to flip one of the `EYEDIR` components below // by replacing it with `-EYEDIR`. @@ -83,6 +85,7 @@ Method Descriptions Creates a placeholder version of this resource (:ref:`PlaceholderCubemap`). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cubemaparray.rst b/classes/class_cubemaparray.rst index a9f5aec0550..33bb1023f4b 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 a 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 @@ -57,6 +71,7 @@ Method Descriptions Creates a placeholder version of this resource (:ref:`PlaceholderCubemapArray`). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_curve.rst b/classes/class_curve.rst index 1175151dce0..701c47d703e 100644 --- a/classes/class_curve.rst +++ b/classes/class_curve.rst @@ -516,6 +516,7 @@ Sets the right tangent angle for the point at ``index`` to ``tangent``. Assigns the vertical position ``y`` to the point at ``index``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index 10dff8229f3..3f70bf3c999 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 @@ -387,6 +387,7 @@ Returns a list of points along the curve, with almost uniform density. ``max_sta \ ``tolerance_length`` controls the maximal distance between two neighboring points, before the segment has to be subdivided. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index 48aece00eef..dd170fd6b26 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 @@ -490,6 +490,7 @@ Returns a list of points along the curve, with almost uniform density. ``max_sta \ ``tolerance_length`` controls the maximal distance between two neighboring points, before the segment has to be subdivided. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_curvetexture.rst b/classes/class_curvetexture.rst index 4419167528a..0c75941d454 100644 --- a/classes/class_curvetexture.rst +++ b/classes/class_curvetexture.rst @@ -129,6 +129,7 @@ The format the texture should be generated with. When passing a CurveTexture as The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_curvexyztexture.rst b/classes/class_curvexyztexture.rst index 171eb9e350b..0b0b2f1cd75 100644 --- a/classes/class_curvexyztexture.rst +++ b/classes/class_curvexyztexture.rst @@ -117,6 +117,7 @@ The :ref:`Curve` that is rendered onto the texture's blue channel. The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cylindermesh.rst b/classes/class_cylindermesh.rst index 1777cc905b1..7faeafb2264 100644 --- a/classes/class_cylindermesh.rst +++ b/classes/class_cylindermesh.rst @@ -174,6 +174,7 @@ Number of edge rings along the height of the cylinder. Changing :ref:`rings`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cylindershape3d.rst b/classes/class_cylindershape3d.rst index 0aa1feb5354..0b55b34d107 100644 --- a/classes/class_cylindershape3d.rst +++ b/classes/class_cylindershape3d.rst @@ -90,6 +90,7 @@ The cylinder's height. The cylinder's radius. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_dampedspringjoint2d.rst b/classes/class_dampedspringjoint2d.rst index f5614bbf690..d7b619e6dfe 100644 --- a/classes/class_dampedspringjoint2d.rst +++ b/classes/class_dampedspringjoint2d.rst @@ -19,7 +19,7 @@ A physics joint that connects two 2D physics bodies with a spring-like force. Description ----------- -A physics joint that connects two 2D physics bodies with a spring-like force. This resembles a spring that always wants to stretch to a given length. +A physics joint that connects two 2D physics bodies with a spring-like force. This behaves like a spring that always wants to stretch to a given length. .. rst-class:: classref-reftable-group @@ -113,6 +113,7 @@ When the bodies attached to the spring joint move they stretch or squash it. The The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_decal.rst b/classes/class_decal.rst index 4ef63834b6f..0e5a9d27a47 100644 --- a/classes/class_decal.rst +++ b/classes/class_decal.rst @@ -491,6 +491,7 @@ One case where this is better than accessing the texture directly is when you wa .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 414acd34735..454dffee2bc 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -29,16 +29,16 @@ Creating a dictionary: .. code-tab:: gdscript var my_dict = {} # Creates an empty dictionary. - + var dict_variable_key = "Another key name" var dict_variable_value = "value2" var another_dict = { "Some key name": "value1", dict_variable_key: dict_variable_value, } - - var points_dict = {"White": 50, "Yellow": 75, "Orange": 100} - + + var points_dict = { "White": 50, "Yellow": 75, "Orange": 100 } + # Alternative Lua-style syntax. # Doesn't require quotes around keys, but only string constants can be used as key names. # Additionally, key names must start with a letter or an underscore. @@ -52,9 +52,9 @@ Creating a dictionary: var myDict = new Godot.Collections.Dictionary(); // Creates an empty dictionary. var pointsDict = new Godot.Collections.Dictionary { - {"White", 50}, - {"Yellow", 75}, - {"Orange", 100} + { "White", 50 }, + { "Yellow", 75 }, + { "Orange", 100 }, }; @@ -67,7 +67,7 @@ You can access a dictionary's value by referencing its corresponding key. In the .. code-tab:: gdscript @export_enum("White", "Yellow", "Orange") var my_color: String - var points_dict = {"White": 50, "Yellow": 75, "Orange": 100} + var points_dict = { "White": 50, "Yellow": 75, "Orange": 100 } func _ready(): # We can't use dot syntax here as `my_color` is a variable. var points = points_dict[my_color] @@ -78,11 +78,11 @@ You can access a dictionary's value by referencing its corresponding key. In the public string MyColor { get; set; } private Godot.Collections.Dictionary _pointsDict = new Godot.Collections.Dictionary { - {"White", 50}, - {"Yellow", 75}, - {"Orange", 100} + { "White", 50 }, + { "Yellow", 75 }, + { "Orange", 100 }, }; - + public override void _Ready() { int points = (int)_pointsDict[MyColor]; @@ -107,7 +107,7 @@ Dictionaries can contain more complex data: var myDict = new Godot.Collections.Dictionary { - {"First Array", new Godot.Collections.Array{1, 2, 3, 4}} + { "First Array", new Godot.Collections.Array { 1, 2, 3, 4 } } }; @@ -119,16 +119,16 @@ To add a key to an existing dictionary, access it like an existing key and assig .. code-tab:: gdscript - var points_dict = {"White": 50, "Yellow": 75, "Orange": 100} + var points_dict = { "White": 50, "Yellow": 75, "Orange": 100 } points_dict["Blue"] = 150 # Add "Blue" as a key and assign 150 as its value. .. code-tab:: csharp var pointsDict = new Godot.Collections.Dictionary { - {"White", 50}, - {"Yellow", 75}, - {"Orange", 100} + { "White", 50 }, + { "Yellow", 75 }, + { "Orange", 100 }, }; pointsDict["Blue"] = 150; // Add "Blue" as a key and assign 150 as its value. @@ -148,7 +148,7 @@ Finally, dictionaries can contain different types of keys and values in the same "String Key": 5, 4: [1, 2, 3], 7: "Hello", - "sub_dict": {"sub_key": "Nested value"}, + "sub_dict": { "sub_key": "Nested value" }, } .. code-tab:: csharp @@ -156,10 +156,10 @@ Finally, dictionaries can contain different types of keys and values in the same // This is a valid dictionary. // To access the string "Nested value" below, use `((Godot.Collections.Dictionary)myDict["sub_dict"])["sub_key"]`. var myDict = new Godot.Collections.Dictionary { - {"String Key", 5}, - {4, new Godot.Collections.Array{1,2,3}}, - {7, "Hello"}, - {"sub_dict", new Godot.Collections.Dictionary{{"sub_key", "Nested value"}}} + { "String Key", 5 }, + { 4, new Godot.Collections.Array { 1, 2, 3 } }, + { 7, "Hello" }, + { "sub_dict", new Godot.Collections.Dictionary { { "sub_key", "Nested value" } } }, }; @@ -171,13 +171,13 @@ The keys of a dictionary can be iterated with the ``for`` keyword: .. code-tab:: gdscript - var groceries = {"Orange": 20, "Apple": 2, "Banana": 4} + var groceries = { "Orange": 20, "Apple": 2, "Banana": 4 } for fruit in groceries: var amount = groceries[fruit] .. code-tab:: csharp - var groceries = new Godot.Collections.Dictionary{{"Orange", 20}, {"Apple", 2}, {"Banana", 4}}; + var groceries = new Godot.Collections.Dictionary { { "Orange", 20 }, { "Apple", 2 }, { "Banana", 4 } }; foreach (var (fruit, amount) in groceries) { // `fruit` is the key, `amount` is the value. @@ -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. @@ -235,6 +235,8 @@ Methods +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`duplicate`\ (\ deep\: :ref:`bool` = false\ ) |const| | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`duplicate_deep`\ (\ deep_subresources_mode\: :ref:`int` = 1\ ) |const| | + +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`erase`\ (\ key\: :ref:`Variant`\ ) | +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`find_key`\ (\ value\: :ref:`Variant`\ ) |const| | @@ -347,7 +349,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 @@ -388,7 +390,25 @@ Clears the dictionary, removing all entries from it. :ref:`Dictionary` **duplicate**\ (\ deep\: :ref:`bool` = false\ ) |const| :ref:`🔗` -Creates and returns a new copy of the dictionary. If ``deep`` is ``true``, inner **Dictionary** and :ref:`Array` keys and values are also copied, recursively. +Returns a new copy of the dictionary. + +By default, a **shallow** copy is returned: all nested :ref:`Array`, **Dictionary**, and :ref:`Resource` keys and values are shared with the original dictionary. Modifying any of those in one dictionary will also affect them in the other. + +If ``deep`` is ``true``, a **deep** copy is returned: all nested arrays and dictionaries are also duplicated (recursively). Any :ref:`Resource` is still shared with the original dictionary, though. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Dictionary_method_duplicate_deep: + +.. rst-class:: classref-method + +:ref:`Dictionary` **duplicate_deep**\ (\ deep_subresources_mode\: :ref:`int` = 1\ ) |const| :ref:`🔗` + +Duplicates this dictionary, deeply, like :ref:`duplicate()`\ ``(true)``, with extra control over how subresources are handled. + +\ ``deep_subresources_mode`` must be one of the values from :ref:`DeepDuplicateMode`. By default, only internal resources will be duplicated (recursively). .. rst-class:: classref-item-separator @@ -402,7 +422,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 +436,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 +460,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 +472,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 +484,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 +496,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 +508,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 +520,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 +532,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 @@ -535,7 +555,7 @@ Returns ``true`` if the dictionary contains an entry with the given ``key``. "Redot" : 4, 210 : null, } - + print(my_dict.has("Redot")) # Prints true print(my_dict.has(210)) # Prints true print(my_dict.has(4)) # Prints false @@ -547,7 +567,7 @@ Returns ``true`` if the dictionary contains an entry with the given ``key``. { "Redot", 4 }, { 210, default }, }; - + GD.Print(myDict.ContainsKey("Redot")); // Prints True GD.Print(myDict.ContainsKey(210)); // Prints True GD.Print(myDict.ContainsKey(4)); // Prints False @@ -558,7 +578,7 @@ In GDScript, this is equivalent to the ``in`` operator: :: - if "Redot" in {"Redot": 4}: + if "Redot" in { "Redot": 4 }: print("The key is here!") # Will be printed. \ **Note:** This method returns ``true`` as long as the ``key`` exists, even if its corresponding value is ``null``. @@ -577,7 +597,7 @@ Returns ``true`` if the dictionary contains all keys in the given ``keys`` array :: - var data = {"width" : 10, "height" : 20} + var data = { "width": 10, "height": 20 } data.has_all(["height", "width"]) # Returns true .. rst-class:: classref-item-separator @@ -597,16 +617,16 @@ Returns a hashed 32-bit integer value representing the dictionary contents. .. code-tab:: gdscript - var dict1 = {"A": 10, "B": 2} - var dict2 = {"A": 10, "B": 2} - + var dict1 = { "A": 10, "B": 2 } + var dict2 = { "A": 10, "B": 2 } + print(dict1.hash() == dict2.hash()) # Prints true .. code-tab:: csharp - var dict1 = new Godot.Collections.Dictionary{{"A", 10}, {"B", 2}}; - var dict2 = new Godot.Collections.Dictionary{{"A", 10}, {"B", 2}}; - + var dict1 = new Godot.Collections.Dictionary { { "A", 10 }, { "B", 2 } }; + var dict2 = new Godot.Collections.Dictionary { { "A", 10 }, { "B", 2 } }; + // Godot.Collections.Dictionary has no Hash() method. Use GD.Hash() instead. GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Prints True @@ -626,7 +646,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 +658,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 @@ -755,11 +775,11 @@ Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys var dict = { "item": "sword", "quantity": 2 } var other_dict = { "quantity": 15, "color": "silver" } - + # Overwriting of existing keys is disabled by default. dict.merge(other_dict) print(dict) # { "item": "sword", "quantity": 2, "color": "silver" } - + # With overwriting of existing keys enabled. dict.merge(other_dict, true) print(dict) # { "item": "sword", "quantity": 15, "color": "silver" } @@ -771,24 +791,24 @@ Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys ["item"] = "sword", ["quantity"] = 2, }; - + var otherDict = new Godot.Collections.Dictionary { ["quantity"] = 15, ["color"] = "silver", }; - + // Overwriting of existing keys is disabled by default. dict.Merge(otherDict); GD.Print(dict); // { "item": "sword", "quantity": 2, "color": "silver" } - + // With overwriting of existing keys enabled. dict.Merge(otherDict, true); GD.Print(dict); // { "item": "sword", "quantity": 15, "color": "silver" } -\ **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 +820,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 +867,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 +879,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,9 +947,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_diraccess.rst b/classes/class_diraccess.rst index d82b8bc1720..49c8666a91a 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 @@ -155,6 +155,8 @@ Methods +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`get_files_at`\ (\ path\: :ref:`String`\ ) |static| | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_filesystem_type`\ (\ ) |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`get_next`\ (\ ) | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`get_open_error`\ (\ ) |static| | @@ -165,6 +167,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 +218,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 +237,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 +258,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 +286,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 +320,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 +332,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 +358,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 +374,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 +400,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 +430,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 +498,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`. @@ -502,6 +506,20 @@ Use :ref:`get_files` if you want more control ---- +.. _class_DirAccess_method_get_filesystem_type: + +.. rst-class:: classref-method + +:ref:`String` **get_filesystem_type**\ (\ ) |const| :ref:`🔗` + +Returns file system type name of the current directory's disk. Returned values are uppercase strings like ``NTFS``, ``FAT32``, ``EXFAT``, ``APFS``, ``EXT4``, ``BTRFS``, and so on. + +\ **Note:** This method is implemented on macOS, Linux, Windows and for PCK virtual file system. + +.. rst-class:: classref-item-separator + +---- + .. _class_DirAccess_method_get_next: .. rst-class:: classref-method @@ -510,7 +528,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 +540,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 +586,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 +618,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 +634,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 +646,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 +660,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 +672,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 +686,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 +700,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 +728,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 +742,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,9 +768,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_directionallight2d.rst b/classes/class_directionallight2d.rst index 370060cc345..90e150874aa 100644 --- a/classes/class_directionallight2d.rst +++ b/classes/class_directionallight2d.rst @@ -24,6 +24,8 @@ Description A directional light is a type of :ref:`Light2D` node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene (for example: to model sunlight or moonlight). +Light is emitted in the +Y direction of the node's global basis. For an unrotated light, this means that the light is emitted downwards. The position of the node is ignored; only the basis is used to determine light direction. + \ **Note:** **DirectionalLight2D** does not support light cull masks (but it supports shadow cull masks). It will always light up 2D nodes, regardless of the 2D node's :ref:`CanvasItem.light_mask`. .. rst-class:: classref-introduction-group @@ -87,6 +89,7 @@ The height of the light. Used with 2D normal mapping. Ranges from 0 (parallel to The maximum distance from the camera center objects can be before their shadows are culled (in pixels). Decreasing this value can prevent objects located outside the camera from casting shadows (while also improving performance). :ref:`Camera2D.zoom` is not taken into account by :ref:`max_distance`, which means that at higher zoom values, shadows will appear to fade out sooner when zooming onto a given point. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_directionallight3d.rst b/classes/class_directionallight3d.rst index 641ab108e8a..5fa6e1b6bcf 100644 --- a/classes/class_directionallight3d.rst +++ b/classes/class_directionallight3d.rst @@ -22,7 +22,9 @@ Directional light from a distance, as from the Sun. Description ----------- -A directional light is a type of :ref:`Light3D` node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. The worldspace location of the DirectionalLight3D transform (origin) is ignored. Only the basis is used to determine light direction. +A directional light is a type of :ref:`Light3D` node that models an infinite number of parallel rays covering the entire scene. It is used for lights with strong intensity that are located far away from the scene to model sunlight or moonlight. + +Light is emitted in the -Z direction of the node's global basis. For an unrotated light, this means that the light is emitted forwards, illuminating the front side of a 3D model (see :ref:`Vector3.FORWARD` and :ref:`Vector3.MODEL_FRONT`). The position of the node is ignored; only the basis is used to determine light direction. .. rst-class:: classref-introduction-group @@ -205,7 +207,7 @@ The maximum distance for shadow splits. Increasing this value will make directio - |void| **set_shadow_mode**\ (\ value\: :ref:`ShadowMode`\ ) - :ref:`ShadowMode` **get_shadow_mode**\ (\ ) -The light's shadow rendering algorithm. See :ref:`ShadowMode`. +The light's shadow rendering algorithm. .. rst-class:: classref-item-separator @@ -290,9 +292,10 @@ The distance from shadow split 2 to split 3. Relative to :ref:`directional_shado - |void| **set_sky_mode**\ (\ value\: :ref:`SkyMode`\ ) - :ref:`SkyMode` **get_sky_mode**\ (\ ) -Set whether this **DirectionalLight3D** is visible in the sky, in the scene, or both in the sky and in the scene. See :ref:`SkyMode` for options. +Whether this **DirectionalLight3D** is visible in the sky, in the scene, or both in the sky and in the scene. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 6611e3d47f9..338388dd204 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: @@ -520,7 +680,7 @@ Display server supports `Input Method Editor ` **FEATURE_WINDOW_TRANSPARENCY** = ``11`` -Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. **Windows, macOS, Linux (X11/Wayland)** +Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. **Windows, macOS, Linux (X11/Wayland), Android** .. _class_DisplayServer_constant_FEATURE_HIDPI: @@ -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,2797 @@ 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_MENU: .. rst-class:: classref-enumeration-constant -:ref:`WindowMode` **WINDOW_MODE_EXCLUSIVE_FULLSCREEN** = ``4`` +:ref:`AccessibilityPopupType` **POPUP_MENU** = ``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). +Popup menu. -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_LIST: -\ **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_LIST** = ``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 list. -\ **On Linux (X11):** Exclusive full screen mode bypasses compositor. +.. _class_DisplayServer_constant_POPUP_TREE: -\ **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 + +:ref:`AccessibilityPopupType` **POPUP_TREE** = ``2`` + +Popup tree view. + +.. _class_DisplayServer_constant_POPUP_DIALOG: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityPopupType` **POPUP_DIALOG** = ``3`` + +Popup dialog. .. rst-class:: classref-item-separator ---- -.. _enum_DisplayServer_WindowFlags: +.. _enum_DisplayServer_AccessibilityFlags: .. rst-class:: classref-enumeration -enum **WindowFlags**: :ref:`🔗` +enum **AccessibilityFlags**: :ref:`🔗` -.. _class_DisplayServer_constant_WINDOW_FLAG_RESIZE_DISABLED: +.. _class_DisplayServer_constant_FLAG_HIDDEN: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_RESIZE_DISABLED** = ``0`` +:ref:`AccessibilityFlags` **FLAG_HIDDEN** = ``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. +Element is hidden for accessibility tools. -.. _class_DisplayServer_constant_WINDOW_FLAG_BORDERLESS: +.. _class_DisplayServer_constant_FLAG_MULTISELECTABLE: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_BORDERLESS** = ``1`` +:ref:`AccessibilityFlags` **FLAG_MULTISELECTABLE** = ``1`` -The window do not have native title bar and other decorations. This flag is ignored for full-screen windows. +Element is support multiple item selection. -.. _class_DisplayServer_constant_WINDOW_FLAG_ALWAYS_ON_TOP: +.. _class_DisplayServer_constant_FLAG_REQUIRED: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_ALWAYS_ON_TOP** = ``2`` +:ref:`AccessibilityFlags` **FLAG_REQUIRED** = ``2`` -The window is floating on top of all other windows. This flag is ignored for full-screen windows. +Element require user input. -.. _class_DisplayServer_constant_WINDOW_FLAG_TRANSPARENT: +.. _class_DisplayServer_constant_FLAG_VISITED: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_TRANSPARENT** = ``3`` +:ref:`AccessibilityFlags` **FLAG_VISITED** = ``3`` -The window background can be transparent. +Element is a visited link. + +.. _class_DisplayServer_constant_FLAG_BUSY: -\ **Note:** This flag has no effect if :ref:`is_window_transparency_available` returns ``false``. +.. rst-class:: classref-enumeration-constant -\ **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. +:ref:`AccessibilityFlags` **FLAG_BUSY** = ``4`` -.. _class_DisplayServer_constant_WINDOW_FLAG_NO_FOCUS: +Element content is not ready (e.g. loading). + +.. _class_DisplayServer_constant_FLAG_MODAL: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_NO_FOCUS** = ``4`` +:ref:`AccessibilityFlags` **FLAG_MODAL** = ``5`` -The window can't be focused. No-focus window will ignore all input, except mouse clicks. +Element is modal window. -.. _class_DisplayServer_constant_WINDOW_FLAG_POPUP: +.. _class_DisplayServer_constant_FLAG_TOUCH_PASSTHROUGH: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_POPUP** = ``5`` +:ref:`AccessibilityFlags` **FLAG_TOUCH_PASSTHROUGH** = ``6`` -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 allows touches to be passed through when a screen reader is in touch exploration mode. -.. _class_DisplayServer_constant_WINDOW_FLAG_EXTEND_TO_TITLE: +.. _class_DisplayServer_constant_FLAG_READONLY: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_EXTEND_TO_TITLE** = ``6`` +:ref:`AccessibilityFlags` **FLAG_READONLY** = ``7`` -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 text field with selectable but read-only text. -Use :ref:`window_set_window_buttons_offset` to adjust minimize/maximize/close buttons offset. +.. _class_DisplayServer_constant_FLAG_DISABLED: -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_DISABLED** = ``8`` -.. _class_DisplayServer_constant_WINDOW_FLAG_MOUSE_PASSTHROUGH: +Element is disabled. + +.. _class_DisplayServer_constant_FLAG_CLIPS_CHILDREN: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_MOUSE_PASSTHROUGH** = ``7`` +:ref:`AccessibilityFlags` **FLAG_CLIPS_CHILDREN** = ``9`` -All mouse events are passed to the underlying window of the same application. +Element clips children. -.. _class_DisplayServer_constant_WINDOW_FLAG_SHARP_CORNERS: +.. rst-class:: classref-item-separator -.. rst-class:: classref-enumeration-constant +---- -:ref:`WindowFlags` **WINDOW_FLAG_SHARP_CORNERS** = ``8`` +.. _enum_DisplayServer_AccessibilityAction: -Window style is overridden, forcing sharp corners. +.. rst-class:: classref-enumeration -\ **Note:** This flag is implemented only on Windows (11). +enum **AccessibilityAction**: :ref:`🔗` -.. _class_DisplayServer_constant_WINDOW_FLAG_EXCLUDE_FROM_CAPTURE: +.. _class_DisplayServer_constant_ACTION_CLICK: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_EXCLUDE_FROM_CAPTURE** = ``9`` +:ref:`AccessibilityAction` **ACTION_CLICK** = ``0`` -Windows is excluded from screenshots taken by :ref:`screen_get_image`, :ref:`screen_get_image_rect`, and :ref:`screen_get_pixel`. +Single click action, callback argument is not set. -\ **Note:** This flag is implemented on macOS and Windows. +.. _class_DisplayServer_constant_ACTION_FOCUS: + +.. rst-class:: classref-enumeration-constant -\ **Note:** Setting this flag will **NOT** prevent other apps from capturing an image, it should not be used as a security measure. +:ref:`AccessibilityAction` **ACTION_FOCUS** = ``1`` -.. _class_DisplayServer_constant_WINDOW_FLAG_MAX: +Focus action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_BLUR: .. rst-class:: classref-enumeration-constant -:ref:`WindowFlags` **WINDOW_FLAG_MAX** = ``10`` +:ref:`AccessibilityAction` **ACTION_BLUR** = ``2`` -Max value of the :ref:`WindowFlags`. +Blur action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_COLLAPSE: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_COLLAPSE** = ``3`` + +Collapse action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_EXPAND: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_EXPAND** = ``4`` + +Expand action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_DECREMENT: + +.. rst-class:: classref-enumeration-constant + +:ref:`AccessibilityAction` **ACTION_DECREMENT** = ``5`` + +Decrement action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_INCREMENT: + +.. 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:`AccessibilityAction` **ACTION_HIDE_TOOLTIP** = ``7`` + +Hide tooltip action, callback argument is not set. + +.. _class_DisplayServer_constant_ACTION_SHOW_TOOLTIP: + +.. 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:`AccessibilityAction` **ACTION_SET_TEXT_SELECTION** = ``9`` + +Set text selection action, callback argument is set to :ref:`Dictionary` with the following keys: + +- ``"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, 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_WindowEvent: +.. _enum_DisplayServer_AccessibilityLiveMode: .. rst-class:: classref-enumeration -enum **WindowEvent**: :ref:`🔗` +enum **AccessibilityLiveMode**: :ref:`🔗` -.. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_ENTER: +.. _class_DisplayServer_constant_LIVE_OFF: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_MOUSE_ENTER** = ``0`` +:ref:`AccessibilityLiveMode` **LIVE_OFF** = ``0`` -Sent when the mouse pointer enters the window. +Indicates that updates to the live region should not be presented. -.. _class_DisplayServer_constant_WINDOW_EVENT_MOUSE_EXIT: +.. _class_DisplayServer_constant_LIVE_POLITE: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_MOUSE_EXIT** = ``1`` +:ref:`AccessibilityLiveMode` **LIVE_POLITE** = ``1`` -Sent when the mouse pointer exits the window. +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_WINDOW_EVENT_FOCUS_IN: +.. _class_DisplayServer_constant_LIVE_ASSERTIVE: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_FOCUS_IN** = ``2`` +:ref:`AccessibilityLiveMode` **LIVE_ASSERTIVE** = ``2`` -Sent when the window grabs focus. +Indicates that updates to the live region have the highest priority and should be presented immediately. -.. _class_DisplayServer_constant_WINDOW_EVENT_FOCUS_OUT: +.. 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:`WindowEvent` **WINDOW_EVENT_FOCUS_OUT** = ``3`` +:ref:`MouseMode` **MOUSE_MODE_VISIBLE** = ``0`` -Sent when the window loses focus. +Makes the mouse cursor visible if it is hidden. -.. _class_DisplayServer_constant_WINDOW_EVENT_CLOSE_REQUEST: +.. _class_DisplayServer_constant_MOUSE_MODE_HIDDEN: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_CLOSE_REQUEST** = ``4`` +:ref:`MouseMode` **MOUSE_MODE_HIDDEN** = ``1`` -Sent when the user has attempted to close the window (e.g. close button is pressed). +Makes the mouse cursor hidden if it is visible. -.. _class_DisplayServer_constant_WINDOW_EVENT_GO_BACK_REQUEST: +.. _class_DisplayServer_constant_MOUSE_MODE_CAPTURED: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_GO_BACK_REQUEST** = ``5`` +:ref:`MouseMode` **MOUSE_MODE_CAPTURED** = ``2`` -Sent when the device "Back" button is pressed. +Captures the mouse. The mouse will be hidden and its position locked at the center of the window manager's window. -\ **Note:** This event is implemented only on Android. +\ **Note:** If you want to process the mouse's movement in this mode, you need to use :ref:`InputEventMouseMotion.relative`. -.. _class_DisplayServer_constant_WINDOW_EVENT_DPI_CHANGE: +.. _class_DisplayServer_constant_MOUSE_MODE_CONFINED: .. rst-class:: classref-enumeration-constant -:ref:`WindowEvent` **WINDOW_EVENT_DPI_CHANGE** = ``6`` +:ref:`MouseMode` **MOUSE_MODE_CONFINED** = ``3`` -Sent when the window is moved to the display with different DPI, or display DPI is changed. +Confines the mouse cursor to the game window, and make it visible. -\ **Note:** This flag is implemented only on macOS. +.. _class_DisplayServer_constant_MOUSE_MODE_CONFINED_HIDDEN: -.. _class_DisplayServer_constant_WINDOW_EVENT_TITLEBAR_CHANGE: +.. 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:`WindowEvent` **WINDOW_EVENT_TITLEBAR_CHANGE** = ``7`` +:ref:`MouseMode` **MOUSE_MODE_MAX** = ``5`` -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). +Max value of the :ref:`MouseMode`. -\ **Note:** This flag is implemented only on macOS. +.. 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_VSyncMode: +.. _enum_DisplayServer_VirtualKeyboardType: .. rst-class:: classref-enumeration -enum **VSyncMode**: :ref:`🔗` +enum **VirtualKeyboardType**: :ref:`🔗` -.. _class_DisplayServer_constant_VSYNC_DISABLED: +.. _class_DisplayServer_constant_KEYBOARD_TYPE_DEFAULT: .. rst-class:: classref-enumeration-constant -:ref:`VSyncMode` **VSYNC_DISABLED** = ``0`` +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_DEFAULT** = ``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`). +Default text virtual keyboard. -.. _class_DisplayServer_constant_VSYNC_ENABLED: +.. _class_DisplayServer_constant_KEYBOARD_TYPE_MULTILINE: .. rst-class:: classref-enumeration-constant -:ref:`VSyncMode` **VSYNC_ENABLED** = ``1`` +:ref:`VirtualKeyboardType` **KEYBOARD_TYPE_MULTILINE** = ``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`). +Multiline virtual keyboard. -.. _class_DisplayServer_constant_VSYNC_ADAPTIVE: +.. _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. + +\ **Note:** This mode might not work with screen recording software. + +\ **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 Android, 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 prevent standard screenshot methods from capturing a window image, but does **NOT** guarantee that other apps won't be able to capture an image. It should not be used as a DRM or 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_INVALID_SCREEN: + +.. rst-class:: classref-constant + +**INVALID_SCREEN** = ``-1`` :ref:`🔗` + +The ID that refers to a screen that does not exist. This is returned by some **DisplayServer** methods if no screen matches the requested result. + +.. _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 Android, iOS, Web, and 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 Android, iOS, Web, and 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 Android, iOS, Web, and 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 Android, iOS, Web, and 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. + +.. 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 + +---- + +.. _class_DisplayServer_method_accessibility_update_set_role: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_role**\ (\ id\: :ref:`RID`, role\: :ref:`AccessibilityRole`\ ) :ref:`🔗` + +Sets element accessibility role. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_role_description: + +.. rst-class:: classref-method + +|void| **accessibility_update_set_role_description**\ (\ id\: :ref:`RID`, description\: :ref:`String`\ ) :ref:`🔗` + +Sets element accessibility role description text. + +.. rst-class:: classref-item-separator + +---- + +.. _class_DisplayServer_method_accessibility_update_set_scroll_x: + +.. rst-class:: classref-method -.. rst-class:: classref-enumeration-constant +|void| **accessibility_update_set_scroll_x**\ (\ id\: :ref:`RID`, position\: :ref:`float`\ ) :ref:`🔗` -:ref:`VSyncMode` **VSYNC_ADAPTIVE** = ``2`` +Sets scroll bar x position. -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. +.. rst-class:: classref-item-separator -.. _class_DisplayServer_constant_VSYNC_MAILBOX: +---- -.. rst-class:: classref-enumeration-constant +.. _class_DisplayServer_method_accessibility_update_set_scroll_x_range: -:ref:`VSyncMode` **VSYNC_MAILBOX** = ``3`` +.. rst-class:: classref-method -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`). +|void| **accessibility_update_set_scroll_x_range**\ (\ id\: :ref:`RID`, min\: :ref:`float`, max\: :ref:`float`\ ) :ref:`🔗` -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. +Sets scroll bar x range. .. rst-class:: classref-item-separator ---- -.. _enum_DisplayServer_HandleType: - -.. 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: @@ -1624,7 +3644,7 @@ Returns the user's clipboard as a string if possible. Returns the user's clipboard as an image if possible. -\ **Note:** This method uses the copied pixel data, e.g. from a image editing software or a web browser, not an image file copied from file explorer. +\ **Note:** This method uses the copied pixel data, e.g. from an image editing software or a web browser, not an image file copied from file explorer. .. rst-class:: classref-item-separator @@ -1694,6 +3714,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 +3752,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 +3766,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 +3778,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 +3818,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 +3842,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:** 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 (API level 29+). \ **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 +3870,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 +3890,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 +3908,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 +3924,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 +3964,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 @@ -1938,6 +3980,8 @@ Returns the unobscured area of the display where interactive controls should be Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window. +\ **Note:** This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns the primary screen. + .. rst-class:: classref-item-separator ---- @@ -1964,6 +4008,8 @@ The names of built-in display servers are ``Windows``, ``macOS``, ``X11`` (Linux Returns index of the primary screen. +\ **Note:** This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns ``0``. + .. rst-class:: classref-item-separator ---- @@ -1976,6 +4022,8 @@ Returns index of the primary screen. Returns the number of displays available. +\ **Note:** This method is implemented on Linux (X11 and Wayland), macOS, and Windows. On other platforms, this method always returns ``1``. + .. rst-class:: classref-item-separator ---- @@ -1986,7 +4034,7 @@ Returns the number of displays available. :ref:`int` **get_screen_from_rect**\ (\ rect\: :ref:`Rect2`\ ) |const| :ref:`🔗` -Returns the index of the screen that overlaps the most with the given rectangle. Returns ``-1`` if the rectangle doesn't overlap with any screen or has no area. +Returns the index of the screen that overlaps the most with the given rectangle. Returns :ref:`INVALID_SCREEN` if the rectangle doesn't overlap with any screen or has no area. .. rst-class:: classref-item-separator @@ -2000,7 +4048,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 +4199,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 +4301,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 +4539,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 +4555,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 +4571,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 +4587,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 +4685,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 +4703,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 +4923,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 +4957,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 +4989,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 +5049,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 +5073,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 +5283,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 +5295,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 +5319,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 +5331,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 +5343,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. @@ -3309,7 +5357,9 @@ This can be used to prevent Redot from skipping rendering when no normal windows :ref:`int` **screen_get_dpi**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` -Returns the dots per inch density of the specified screen. If ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW` (the default value), a screen with the main window will be used. +Returns the dots per inch density of the specified screen. Returns platform specific default value if ``screen`` is invalid. + +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. \ **Note:** On macOS, returned value is inaccurate if fractional display scaling mode is used. @@ -3324,7 +5374,7 @@ Returns the dots per inch density of the specified screen. If ``screen`` is :ref xxhdpi - 480 dpi xxxhdpi - 640 dpi -\ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS and Windows. Returns ``72`` on unsupported platforms. +\ **Note:** This method is implemented on Android, iOS, Linux (X11/Wayland), macOS, Web, and Windows. On other platforms, this method always returns ``72``. .. rst-class:: classref-item-separator @@ -3336,11 +5386,13 @@ 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``. Returns ``null`` if ``screen`` is invalid or the **DisplayServer** fails to capture screenshot. + +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. -\ **Note:** This method is implemented on Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Linux (X11, excluding XWayland), macOS, and Windows. On other platforms, this method always returns ``null``. -\ **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``. Returns ``null`` if ``rect`` is outside screen bounds or the **DisplayServer** fails to capture screenshot. -\ **Note:** This method is implemented on macOS and Windows. +\ **Note:** This method is implemented on macOS and Windows. On other platforms, this method always returns ``null``. -\ **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,9 +5436,11 @@ 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()`. Returns :ref:`SCREEN_LANDSCAPE` if ``screen`` is invalid. -\ **Note:** This method is implemented on Android and iOS. +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. + +\ **Note:** This method is implemented on Android and iOS. On other platforms, this method always returns :ref:`SCREEN_LANDSCAPE`. .. rst-class:: classref-item-separator @@ -3400,9 +5454,9 @@ Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientat Returns color of the display pixel at the ``position``. -\ **Note:** This method is implemented on Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Linux (X11, excluding XWayland), macOS, and Windows. On other platforms, this method always returns :ref:`Color`. -\ **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 only contain the desktop wallpaper, the current application's window, and other related UI elements. .. rst-class:: classref-item-separator @@ -3414,7 +5468,7 @@ Returns color of the display pixel at the ``position``. :ref:`Vector2i` **screen_get_position**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` -Returns the screen's top-left corner position in pixels. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: +Returns the screen's top-left corner position in pixels. Returns :ref:`Vector2i.ZERO` if ``screen`` is invalid. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin might be located outside any display like this: .. code:: text @@ -3425,9 +5479,9 @@ 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)``. +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. .. rst-class:: classref-item-separator @@ -3439,9 +5493,7 @@ See also :ref:`screen_get_size`. :ref:`float` **screen_get_refresh_rate**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` -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. +Returns the current refresh rate of the specified screen. Returns ``-1.0`` if ``screen`` is invalid or the **DisplayServer** fails to find the refresh rate for the specified screen. To fallback to a default refresh rate if the method fails, try: @@ -3451,6 +5503,10 @@ To fallback to a default refresh rate if the method fails, try: if refresh_rate < 0: refresh_rate = 60.0 +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. + +\ **Note:** This method is implemented on Android, iOS, macOS, Linux (X11 and Wayland), and Windows. On other platforms, this method always returns ``-1.0``. + .. rst-class:: classref-item-separator ---- @@ -3461,13 +5517,15 @@ To fallback to a default refresh rate if the method fails, try: :ref:`float` **screen_get_scale**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` -Returns the scale factor of the specified screen by index. +Returns the scale factor of the specified screen by index. Returns ``1.0`` if ``screen`` is invalid. + +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. \ **Note:** On macOS, the returned value is ``2.0`` for hiDPI (Retina) screens, and ``1.0`` for all other cases. \ **Note:** On Linux (Wayland), the returned value is accurate only when ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW`. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. ``1.25`` would get rounded up to ``2.0``). -\ **Note:** This method is implemented on Android, iOS, Web, macOS, and Linux (Wayland). +\ **Note:** This method is implemented on Android, iOS, Web, macOS, and Linux (Wayland). On other platforms, this method always returns ``1.0``. .. rst-class:: classref-item-separator @@ -3479,7 +5537,9 @@ 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()`. Returns :ref:`Vector2i.ZERO` if ``screen`` is invalid. + +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. .. rst-class:: classref-item-separator @@ -3491,7 +5551,11 @@ 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()`. + +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. + +\ **Note:** This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns ``Rect2i(screen_get_position(screen), screen_get_size(screen))``. .. rst-class:: classref-item-separator @@ -3503,7 +5567,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 +5579,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 +5591,11 @@ 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:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. + +\ **Note:** This method is implemented on Android and iOS. \ **Note:** On iOS, this method has no effect if :ref:`ProjectSettings.display/window/handheld/orientation` is not set to :ref:`SCREEN_SENSOR`. @@ -3535,13 +5603,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 +5637,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 +5659,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 @@ -3703,7 +5799,7 @@ Set active tablet driver name. Supported drivers: -- ``winink``: Windows Ink API, default (Windows 8.1+ required). +- ``winink``: Windows Ink API, default. - ``wintab``: Wacom Wintab API (compatible device driver required). @@ -3735,8 +5831,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 ---- @@ -3747,12 +5841,10 @@ Note that Redot depends on system libraries for text-to-speech functionality. Th :ref:`PackedStringArray` **tts_get_voices_for_language**\ (\ language\: :ref:`String`\ ) |const| :ref:`🔗` -Returns an :ref:`PackedStringArray` of voice identifiers for the ``language``. +Returns a :ref:`PackedStringArray` of voice identifiers for the ``language``. \ **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 +5859,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 +5873,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 +5887,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 +5901,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 +5921,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 +5933,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 +5943,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 ---- @@ -3881,9 +5961,7 @@ Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is clear 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. +\ **Note:** This method is implemented on Android, iOS, Web, Linux (X11/Wayland), macOS, and Windows. .. rst-class:: classref-item-separator @@ -3895,7 +5973,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 +6037,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 +6073,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 +6085,9 @@ 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()`. Returns :ref:`INVALID_SCREEN` if ``window_id`` is invalid. + +\ **Note:** This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns ``0``. .. rst-class:: classref-item-separator @@ -4031,7 +6111,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 +6123,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 +6185,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 +6209,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 +6221,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 +6335,11 @@ 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()`. + +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. + +\ **Note:** This method is implemented on Linux/X11, macOS, and Windows. .. rst-class:: classref-item-separator @@ -4299,7 +6383,7 @@ If set to ``true``, this window will always stay on top of its parent window, pa |void| **window_set_flag**\ (\ flag\: :ref:`WindowFlags`, enabled\: :ref:`bool`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` -Enables or disables the given window's given ``flag``. See :ref:`WindowFlags` for possible values and their behavior. +Enables or disables the given window's given ``flag``. .. rst-class:: classref-item-separator @@ -4311,7 +6395,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 +6407,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 +6447,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 +6463,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. @@ -4397,7 +6481,7 @@ Sets the minimum size for the given window to ``min_size`` in pixels. Normally, |void| **window_set_mode**\ (\ mode\: :ref:`WindowMode`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` -Sets window mode for the given window to ``mode``. See :ref:`WindowMode` for possible values and how each mode behaves. +Sets window mode for the given window to ``mode``. \ **Note:** On Android, setting it to :ref:`WINDOW_MODE_FULLSCREEN` or :ref:`WINDOW_MODE_EXCLUSIVE_FULLSCREEN` will enable immersive mode. @@ -4424,10 +6508,10 @@ Passing an empty array will disable passthrough support (all mouse events will b # Set region, using Path2D node. DisplayServer.window_set_mouse_passthrough($Path2D.curve.get_baked_points()) - + # Set region, using Polygon2D node. DisplayServer.window_set_mouse_passthrough($Polygon2D.polygon) - + # Reset region to default. DisplayServer.window_set_mouse_passthrough([]) @@ -4435,12 +6519,12 @@ Passing an empty array will disable passthrough support (all mouse events will b // Set region, using Path2D node. DisplayServer.WindowSetMousePassthrough(GetNode("Path2D").Curve.GetBakedPoints()); - + // Set region, using Polygon2D node. DisplayServer.WindowSetMousePassthrough(GetNode("Polygon2D").Polygon); - + // Reset region to default. - DisplayServer.WindowSetMousePassthrough(new Vector2[] {}); + DisplayServer.WindowSetMousePassthrough([]); @@ -4481,7 +6565,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 +6595,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. @@ -4559,8 +6643,6 @@ Sets window transient parent. Transient window will be destroyed with its transi Sets the V-Sync mode of the given window. See also :ref:`ProjectSettings.display/window/vsync/vsync_mode`. -See :ref:`VSyncMode` for possible values and how they affect the behavior of your application. - Depending on the platform and used renderer, the engine will fall back to :ref:`VSYNC_ENABLED` if the desired mode is not supported. \ **Note:** V-Sync modes other than :ref:`VSYNC_ENABLED` are only supported in the Forward+ and Mobile rendering methods, not Compatibility. @@ -4603,11 +6685,26 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_dtlsserver.rst b/classes/class_dtlsserver.rst index 2d87b3242d0..1ce05b6424a 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: @@ -30,17 +30,17 @@ Below a small example of how to use it: # server_node.gd extends Node - + var dtls = DTLSServer.new() var server = UDPServer.new() var peers = [] - + func _ready(): 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(): var peer = server.take_connection() @@ -49,7 +49,7 @@ Below a small example of how to use it: continue # It is normal that 50% of the connections fails due to cookie exchange. print("Peer connected!") peers.append(dtls_peer) - + for p in peers: p.poll() # Must poll to update the state. if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED: @@ -61,24 +61,24 @@ Below a small example of how to use it: // ServerNode.cs using Godot; - + public partial class ServerNode : Node { 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); @@ -89,7 +89,7 @@ Below a small example of how to use it: GD.Print("Peer connected!"); _peers.Add(dtlsPeer); } - + foreach (var p in _peers) { p.Poll(); // Must poll to update the state. @@ -114,15 +114,15 @@ Below a small example of how to use it: # client_node.gd extends Node - + var dtls = PacketPeerDTLS.new() var udp = PacketPeerUDP.new() var connected = false - + func _ready(): udp.connect_to_host("127.0.0.1", 4242) dtls.connect_to_peer(udp, false) # Use true in production for certificate validation! - + func _process(delta): dtls.poll() if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED: @@ -138,19 +138,19 @@ Below a small example of how to use it: // ClientNode.cs using Godot; using System.Text; - + public partial class ClientNode : Node { private PacketPeerDtls _dtls = new PacketPeerDtls(); private PacketPeerUdp _udp = new PacketPeerUdp(); private bool _connected = false; - + public override void _Ready() { _udp.ConnectToHost("127.0.0.1", 4242); _dtls.ConnectToPeer(_udp, validateCerts: false); // Use true in production for certificate validation! } - + public override void _Process(double delta) { _dtls.Poll(); @@ -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,11 +213,12 @@ 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. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorcommandpalette.rst b/classes/class_editorcommandpalette.rst index 6cd27c9d278..163e885e9f3 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 @@ -110,6 +110,7 @@ Removes the custom command from EditorCommandPalette. - ``key_name``: :ref:`String` (Name of the key for a particular **Command**.) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorcontextmenuplugin.rst b/classes/class_editorcontextmenuplugin.rst index f5156d6e190..92c03459fa5 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,53 @@ 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, or the "New" section of the main context menu when empty space is clicked. :ref:`_popup_menu()` and option callback will be called with the path of the currently selected folder. When clicking the empty space, the list of paths for popup method will be empty. -.. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_SCRIPT_EDITOR: +:: + + func _popup_menu(paths): + if paths.is_empty(): + add_context_menu_item("New Image File...", create_image) + else: + add_context_menu_item("Image File...", create_image) + +.. _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]); -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 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. + +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 +151,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 +170,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,13 +182,13 @@ 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()`. :: func _init(): add_menu_shortcut(SHORTCUT, handle) - + func _popup_menu(paths): add_context_menu_item_from_shortcut("File Custom options", SHORTCUT, ICON) @@ -165,8 +211,8 @@ Add a submenu to the context menu of the plugin's specified slot. The submenu is popup_menu.add_item("Blue") 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 +224,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. :: @@ -186,6 +232,7 @@ Registers a shortcut associated with the plugin's context menu. This method shou add_menu_shortcut(SHORTCUT, handle) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editordebuggerplugin.rst b/classes/class_editordebuggerplugin.rst index 61fae088b64..a9fc80470a9 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:: @@ -34,19 +34,19 @@ You can retrieve the available :ref:`EditorDebuggerSession` 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,9 +219,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editordebuggersession.rst b/classes/class_editordebuggersession.rst index 35e3bb47328..a7a8fc7bce3 100644 --- a/classes/class_editordebuggersession.rst +++ b/classes/class_editordebuggersession.rst @@ -19,9 +19,9 @@ A class to interact with the editor debugger. Description ----------- -This class cannot be directly instantiated and must be retrieved via a :ref:`EditorDebuggerPlugin`. +This class cannot be directly instantiated and must be retrieved via an :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 @@ -204,6 +204,7 @@ Enables or disables a specific breakpoint based on ``enabled``, updating the Edi Toggle the given ``profiler`` on the attached remote instance, optionally passing additionally ``data``. See :ref:`EngineProfiler` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatform.rst b/classes/class_editorexportplatform.rst index 39f545d3e02..d57592372bc 100644 --- a/classes/class_editorexportplatform.rst +++ b/classes/class_editorexportplatform.rst @@ -12,7 +12,7 @@ EditorExportPlatform **Inherits:** :ref:`RefCounted` **<** :ref:`Object` -**Inherited By:** :ref:`EditorExportPlatformAndroid`, :ref:`EditorExportPlatformExtension`, :ref:`EditorExportPlatformIOS`, :ref:`EditorExportPlatformMacOS`, :ref:`EditorExportPlatformPC`, :ref:`EditorExportPlatformWeb` +**Inherited By:** :ref:`EditorExportPlatformAndroid`, :ref:`EditorExportPlatformAppleEmbedded`, :ref:`EditorExportPlatformExtension`, :ref:`EditorExportPlatformMacOS`, :ref:`EditorExportPlatformPC`, :ref:`EditorExportPlatformWeb` Identifies a supported export platform, and internally provides the functionality of exporting to that platform. @@ -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 the remotely debugged project is expected to use the remote file system. If set, :ref:`gen_export_flags()` will append ``--remote-fs`` and ``--remote-fs-password`` (if :ref:`EditorSettings.filesystem/file_server/password` is defined) command line arguments to the returned 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 append ``--remote-debug`` and ``--breakpoints`` (if breakpoints are selected in the script editor or added by the plugin) command line arguments to the returned 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 the "Visible Collision Shapes" remote debug option is enabled. If set, :ref:`gen_export_flags()` will append the ``--debug-collisions`` command line argument to the returned 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 the "Visible Navigation" remote debug option is enabled. If set, :ref:`gen_export_flags()` will append the ``--debug-navigation`` command line argument to the returned 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`). @@ -535,6 +535,7 @@ Executes specified command on the remote host via SSH protocol and returns comma Executes specified command on the remote host via SSH protocol and returns process ID (on the remote host) without waiting for command to finish. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformandroid.rst b/classes/class_editorexportplatformandroid.rst index a9761943dde..c9b5e2b1ca5 100644 --- a/classes/class_editorexportplatformandroid.rst +++ b/classes/class_editorexportplatformandroid.rst @@ -54,9 +54,11 @@ 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` | + | :ref:`Dictionary` | :ref:`gradle_build/custom_theme_attributes` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`gradle_build/export_format` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -414,6 +416,8 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`permissions/write_user_dictionary` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`screen/edge_to_edge` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`screen/immersive_mode` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`screen/support_large` | @@ -424,14 +428,14 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`screen/support_xlarge` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shader_baker/enabled` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`user_data_backup/allow` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`version/code` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`version/name` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`wear_os/swipe_to_dismiss` | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`xr_features/xr_mode` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -570,6 +574,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 @@ -582,15 +602,19 @@ Path to a ZIP file holding the source for the export template used in a Gradle b ---- -.. _class_EditorExportPlatformAndroid_property_gradle_build/compress_native_libraries: +.. _class_EditorExportPlatformAndroid_property_gradle_build/custom_theme_attributes: .. rst-class:: classref-property -:ref:`bool` **gradle_build/compress_native_libraries** :ref:`🔗` +:ref:`Dictionary` **gradle_build/custom_theme_attributes** :ref:`🔗` -If ``true``, native libraries are compressed when performing a Gradle build. +A dictionary of custom theme attributes to include in the exported Android project. Each entry defines a theme attribute name and its value, and will be added to the **GodotAppMainTheme**. -\ **Note:** Although your binary may be smaller, your application may load slower because the native libraries are not loaded directly from the binary at runtime. +For example, the key ``android:windowSwipeToDismiss`` with the value ``false`` is resolved to ``false``. + +\ **Note:** To add a custom attribute to the **GodotAppSplashTheme**, prefix the attribute name with ``[splash]``. + +\ **Note:** Reserved attributes configured via other export options or project settings cannot be overridden by ``custom_theme_attributes`` and are skipped during export. .. rst-class:: classref-item-separator @@ -2766,13 +2790,27 @@ Allows an application to write to the user dictionary. ---- +.. _class_EditorExportPlatformAndroid_property_screen/edge_to_edge: + +.. rst-class:: classref-property + +:ref:`bool` **screen/edge_to_edge** :ref:`🔗` + +If ``true``, this makes the navigation and status bars translucent and allows the application content to extend edge to edge. + +\ **Note:** You should ensure that none of the application content is occluded by system elements by using the :ref:`DisplayServer.get_display_safe_area()` and :ref:`DisplayServer.get_display_cutouts()` methods. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformAndroid_property_screen/immersive_mode: .. rst-class:: classref-property :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 @@ -2826,51 +2864,49 @@ Indicates whether the application supports extra large screen form-factors. ---- -.. _class_EditorExportPlatformAndroid_property_user_data_backup/allow: +.. _class_EditorExportPlatformAndroid_property_shader_baker/enabled: .. rst-class:: classref-property -:ref:`bool` **user_data_backup/allow** :ref:`🔗` +:ref:`bool` **shader_baker/enabled** :ref:`🔗` -If ``true``, allows the application to participate in the backup and restore infrastructure. +If ``true``, shaders will be compiled and embedded in the application. This option is only supported when using the Forward+ or Mobile renderers. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformAndroid_property_version/code: +.. _class_EditorExportPlatformAndroid_property_user_data_backup/allow: .. rst-class:: classref-property -:ref:`int` **version/code** :ref:`🔗` +:ref:`bool` **user_data_backup/allow** :ref:`🔗` -Machine-readable application version. This must be incremented for every new release pushed to the Play Store. +If ``true``, allows the application to participate in the backup and restore infrastructure. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformAndroid_property_version/name: +.. _class_EditorExportPlatformAndroid_property_version/code: .. rst-class:: classref-property -:ref:`String` **version/name** :ref:`🔗` +:ref:`int` **version/code** :ref:`🔗` -Application version visible to the user. Falls back to :ref:`ProjectSettings.application/config/version` if left empty. +Machine-readable application version. This must be incremented for every new release pushed to the Play Store. .. rst-class:: classref-item-separator ---- -.. _class_EditorExportPlatformAndroid_property_wear_os/swipe_to_dismiss: +.. _class_EditorExportPlatformAndroid_property_version/name: .. rst-class:: classref-property -:ref:`bool` **wear_os/swipe_to_dismiss** :ref:`🔗` - -If ``true``, `Swipe to dismiss `__ will be enabled on Wear OS. +:ref:`String` **version/name** :ref:`🔗` -\ **Note:** This is ``true`` by default. To disable this behavior, :ref:`gradle_build/use_gradle_build` is required. +Application version visible to the user. Falls back to :ref:`ProjectSettings.application/config/version` if left empty. .. rst-class:: classref-item-separator @@ -2885,6 +2921,7 @@ If ``true``, `Swipe to dismiss ` **<** :ref:`RefCounted` **<** :ref:`Object` + +**Inherited By:** :ref:`EditorExportPlatformIOS`, :ref:`EditorExportPlatformVisionOS` + +Base class for the Apple embedded platform exporters (iOS and visionOS). + +.. rst-class:: classref-introduction-group + +Description +----------- + +The base class for Apple embedded platform exporters. These include iOS and visionOS, but not macOS. See the classes inheriting from this one for more details. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Exporting for iOS <../tutorials/export/exporting_for_ios>` + +- :doc:`iOS plugins documentation index <../tutorials/platform/ios/index>` + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` +.. |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.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorexportplatformextension.rst b/classes/class_editorexportplatformextension.rst index 01e1709bca3..afcc2e49e2c 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 @@ -40,13 +40,13 @@ Methods +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_export_pack_patch`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_project`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | + | :ref:`Error` | :ref:`_export_project`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| |required| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_export_zip`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_export_zip_patch`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_binary_extensions`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_binary_extensions`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_debug_protocol`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -58,9 +58,9 @@ Methods +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_export_options`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`_get_logo`\ (\ ) |virtual| |const| | + | :ref:`Texture2D` | :ref:`_get_logo`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |const| | + | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ImageTexture` | :ref:`_get_option_icon`\ (\ device\: :ref:`int`\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -72,17 +72,17 @@ Methods +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_options_tooltip`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_os_name`\ (\ ) |virtual| |const| | + | :ref:`String` | :ref:`_get_os_name`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_platform_features`\ (\ ) |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_platform_features`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_preset_features`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_preset_features`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`_get_run_icon`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_valid_export_configuration`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |const| | + | :ref:`bool` | :ref:`_has_valid_export_configuration`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_valid_project_configuration`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| | + | :ref:`bool` | :ref:`_has_valid_project_configuration`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_is_executable`\ (\ path\: :ref:`String`\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -116,11 +116,9 @@ Method Descriptions :ref:`bool` **_can_export**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |const| :ref:`🔗` -**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 @@ -132,8 +130,6 @@ Usual implementation can call :ref:`_has_valid_export_configuration` -**Optional.**\ - Called by the editor before platform is unregistered. .. rst-class:: classref-item-separator @@ -146,8 +142,6 @@ Called by the editor before platform is unregistered. :ref:`Error` **_export_pack**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` -**Optional.**\ - Creates a PCK archive at ``path`` for the specified ``preset``. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and PCK is selected as a file type. @@ -162,8 +156,6 @@ This method is called when "Export PCK/ZIP" button is pressed in the export dial :ref:`Error` **_export_pack_patch**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` -**Optional.**\ - Creates a patch PCK archive at ``path`` for the specified ``preset``, containing only the files that have changed since the last patch. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and PCK is selected as a file type. @@ -178,15 +170,13 @@ This method is called when "Export PCK/ZIP" button is pressed in the export dial .. rst-class:: classref-method -:ref:`Error` **_export_project**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` - -**Required.**\ +:ref:`Error` **_export_project**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| |required| :ref:`🔗` 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 @@ -198,8 +188,6 @@ This method implementation can call :ref:`EditorExportPlatform.save_pack` **_export_zip**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` -**Optional.**\ - Create a ZIP archive at ``path`` for the specified ``preset``. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and ZIP is selected as a file type. @@ -214,8 +202,6 @@ This method is called when "Export PCK/ZIP" button is pressed in the export dial :ref:`Error` **_export_zip_patch**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` -**Optional.**\ - Create a ZIP archive at ``path`` for the specified ``preset``, containing only the files that have changed since the last patch. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and ZIP is selected as a file type. @@ -230,9 +216,7 @@ This method is called when "Export PCK/ZIP" button is pressed in the export dial .. rst-class:: classref-method -:ref:`PackedStringArray` **_get_binary_extensions**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`PackedStringArray` **_get_binary_extensions**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| :ref:`🔗` Returns array of supported binary extensions for the full project export. @@ -246,8 +230,6 @@ Returns array of supported binary extensions for the full project export. :ref:`String` **_get_debug_protocol**\ (\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns protocol used for remote debugging. Default implementation return ``tcp://``. .. rst-class:: classref-item-separator @@ -260,8 +242,6 @@ Returns protocol used for remote debugging. Default implementation return ``tcp: :ref:`String` **_get_device_architecture**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns device architecture for one-click deploy. .. rst-class:: classref-item-separator @@ -274,8 +254,6 @@ Returns device architecture for one-click deploy. :ref:`bool` **_get_export_option_visibility**\ (\ preset\: :ref:`EditorExportPreset`, option\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Validates ``option`` and returns visibility for the specified ``preset``. Default implementation return ``true`` for all options. .. rst-class:: classref-item-separator @@ -288,8 +266,6 @@ Validates ``option`` and returns visibility for the specified ``preset``. Defaul :ref:`String` **_get_export_option_warning**\ (\ preset\: :ref:`EditorExportPreset`, option\: :ref:`StringName`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Validates ``option`` and returns warning message for the specified ``preset``. Default implementation return empty string for all options. .. rst-class:: classref-item-separator @@ -302,8 +278,6 @@ Validates ``option`` and returns warning message for the specified ``preset``. D :ref:`Array`\[:ref:`Dictionary`\] **_get_export_options**\ (\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns a property list, as an :ref:`Array` of dictionaries. Each :ref:`Dictionary` must at least contain the ``name: StringName`` and ``type: Variant.Type`` entries. Additionally, the following keys are supported: @@ -318,11 +292,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 @@ -332,11 +306,9 @@ See also :ref:`Object._get_property_list` **_get_logo**\ (\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`Texture2D` **_get_logo**\ (\ ) |virtual| |required| |const| :ref:`🔗` -Returns platform logo displayed in the export dialog, logo should be 32x32 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale`. +Returns the platform logo displayed in the export dialog. The logo should be 32×32 pixels, adjusted for the current editor scale (see :ref:`EditorInterface.get_editor_scale()`). .. rst-class:: classref-item-separator @@ -346,9 +318,7 @@ Returns platform logo displayed in the export dialog, logo should be 32x32 adjus .. rst-class:: classref-method -:ref:`String` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`String` **_get_name**\ (\ ) |virtual| |required| |const| :ref:`🔗` Returns export platform name. @@ -362,9 +332,7 @@ Returns export platform name. :ref:`ImageTexture` **_get_option_icon**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` -**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 the item icon for the specified ``device`` in the one-click deploy menu. The icon should be 16×16 pixels, adjusted for the current editor scale (see :ref:`EditorInterface.get_editor_scale()`). .. rst-class:: classref-item-separator @@ -376,8 +344,6 @@ Returns one-click deploy menu item icon for the specified ``device``, icon shoul :ref:`String` **_get_option_label**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns one-click deploy menu item label for the specified ``device``. .. rst-class:: classref-item-separator @@ -390,8 +356,6 @@ Returns one-click deploy menu item label for the specified ``device``. :ref:`String` **_get_option_tooltip**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns one-click deploy menu item tooltip for the specified ``device``. .. rst-class:: classref-item-separator @@ -404,9 +368,7 @@ Returns one-click deploy menu item tooltip for the specified ``device``. :ref:`int` **_get_options_count**\ (\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - -Returns number one-click deploy devices (or other one-click option displayed in the menu). +Returns the number of devices (or other options) available in the one-click deploy menu. .. rst-class:: classref-item-separator @@ -418,8 +380,6 @@ Returns number one-click deploy devices (or other one-click option displayed in :ref:`String` **_get_options_tooltip**\ (\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns tooltip of the one-click deploy menu button. .. rst-class:: classref-item-separator @@ -430,9 +390,7 @@ Returns tooltip of the one-click deploy menu button. .. rst-class:: classref-method -:ref:`String` **_get_os_name**\ (\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`String` **_get_os_name**\ (\ ) |virtual| |required| |const| :ref:`🔗` Returns target OS name. @@ -444,9 +402,7 @@ Returns target OS name. .. rst-class:: classref-method -:ref:`PackedStringArray` **_get_platform_features**\ (\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`PackedStringArray` **_get_platform_features**\ (\ ) |virtual| |required| |const| :ref:`🔗` Returns array of platform specific features. @@ -458,9 +414,7 @@ Returns array of platform specific features. .. rst-class:: classref-method -:ref:`PackedStringArray` **_get_preset_features**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`PackedStringArray` **_get_preset_features**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| :ref:`🔗` Returns array of platform specific features for the specified ``preset``. @@ -474,9 +428,7 @@ Returns array of platform specific features for the specified ``preset``. :ref:`Texture2D` **_get_run_icon**\ (\ ) |virtual| |const| :ref:`🔗` -**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 the icon of the one-click deploy menu button. The icon should be 16×16 pixels, adjusted for the current editor scale (see :ref:`EditorInterface.get_editor_scale()`). .. rst-class:: classref-item-separator @@ -486,9 +438,7 @@ Returns icon of the one-click deploy menu button, icon should be 16x16 adjusted .. rst-class:: classref-method -:ref:`bool` **_has_valid_export_configuration**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`bool` **_has_valid_export_configuration**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |required| |const| :ref:`🔗` Returns ``true`` if export configuration is valid. @@ -500,9 +450,7 @@ Returns ``true`` if export configuration is valid. .. rst-class:: classref-method -:ref:`bool` **_has_valid_project_configuration**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`bool` **_has_valid_project_configuration**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| :ref:`🔗` Returns ``true`` if project configuration is valid. @@ -516,8 +464,6 @@ Returns ``true`` if project configuration is valid. :ref:`bool` **_is_executable**\ (\ path\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns ``true`` if specified file is a valid executable (native executable or script) for the target platform. .. rst-class:: classref-item-separator @@ -530,8 +476,6 @@ Returns ``true`` if specified file is a valid executable (native executable or s :ref:`bool` **_poll_export**\ (\ ) |virtual| :ref:`🔗` -**Optional.**\ - Returns ``true`` if one-click deploy options are changed and editor interface should be updated. .. rst-class:: classref-item-separator @@ -544,8 +488,6 @@ Returns ``true`` if one-click deploy options are changed and editor interface sh :ref:`Error` **_run**\ (\ preset\: :ref:`EditorExportPreset`, device\: :ref:`int`, debug_flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` -**Optional.**\ - This method is called when ``device`` one-click deploy menu option is selected. Implementation should export project to a temporary location, upload and run it on the specific ``device``, or perform another action associated with the menu item. @@ -560,8 +502,6 @@ Implementation should export project to a temporary location, upload and run it :ref:`bool` **_should_update_export_options**\ (\ ) |virtual| :ref:`🔗` -**Optional.**\ - Returns ``true`` if export options list is changed and presets should be updated. .. rst-class:: classref-item-separator @@ -574,7 +514,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 +526,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 +538,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,9 +550,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformios.rst b/classes/class_editorexportplatformios.rst index 6daf10c1a51..b93fdc4855b 100644 --- a/classes/class_editorexportplatformios.rst +++ b/classes/class_editorexportplatformios.rst @@ -10,7 +10,7 @@ EditorExportPlatformIOS ======================= -**Inherits:** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` +**Inherits:** :ref:`EditorExportPlatformAppleEmbedded` **<** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` Exporter for iOS. @@ -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` | @@ -502,6 +500,8 @@ Properties +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`privacy/user_defaults_access_reasons` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shader_baker/enabled` | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`storyboard/custom_bg_color` | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`storyboard/custom_image@2x` | @@ -573,7 +573,7 @@ Unique application identifier in a reverse-DNS format, can only contain alphanum :ref:`String` **application/code_sign_identity_debug** :ref:`🔗` -The "Full Name", "Common Name" or SHA-1 hash of the signing identity used for debug export. +The "Full Name", "Common Name", or SHA-1 hash of the signing identity used for debug export. .. rst-class:: classref-item-separator @@ -585,7 +585,7 @@ The "Full Name", "Common Name" or SHA-1 hash of the signing identity used for de :ref:`String` **application/code_sign_identity_release** :ref:`🔗` -The "Full Name", "Common Name" or SHA-1 hash of the signing identity used for release export. +The "Full Name", "Common Name", or SHA-1 hash of the signing identity used for release export. .. rst-class:: classref-item-separator @@ -639,18 +639,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 @@ -681,9 +669,9 @@ Minimum version of iOS required for this application to run in the ``major.minor :ref:`String` **application/provisioning_profile_specifier_debug** :ref:`🔗` -Name of the provisioning profile. Sets XCode PROVISIONING_PROFILE_SPECIFIER for debug. `Used for manual provisioning `__. +Name of the provisioning profile. Sets Xcode PROVISIONING_PROFILE_SPECIFIER for debug. `Used for manual provisioning `__. -Can be overridden with the environment variable ``GODOT_IOS_PROFILE_SPECIFIER_DEBUG``. +Can be overridden with the environment variable ``GODOT_APPLE_PLATFORM_PROFILE_SPECIFIER_DEBUG``. .. rst-class:: classref-item-separator @@ -695,9 +683,9 @@ Can be overridden with the environment variable ``GODOT_IOS_PROFILE_SPECIFIER_DE :ref:`String` **application/provisioning_profile_specifier_release** :ref:`🔗` -Name of the provisioning profile. Sets XCode PROVISIONING_PROFILE_SPECIFIER for release. `Used for manual provisioning `__. +Name of the provisioning profile. Sets Xcode PROVISIONING_PROFILE_SPECIFIER for release. `Used for manual provisioning `__. -Can be overridden with the environment variable ``GODOT_IOS_PROFILE_SPECIFIER_RELEASE``. +Can be overridden with the environment variable ``GODOT_APPLE_PLATFORM_PROFILE_SPECIFIER_RELEASE``. .. rst-class:: classref-item-separator @@ -711,7 +699,7 @@ Can be overridden with the environment variable ``GODOT_IOS_PROFILE_SPECIFIER_RE UUID of the provisioning profile. If left empty, Xcode will download or create a provisioning profile automatically. See `Edit, download, or delete provisioning profiles `__. -Can be overridden with the environment variable ``GODOT_IOS_PROVISIONING_PROFILE_UUID_DEBUG``. +Can be overridden with the environment variable ``GODOT_APPLE_PLATFORM_PROVISIONING_PROFILE_UUID_DEBUG``. .. rst-class:: classref-item-separator @@ -725,7 +713,7 @@ Can be overridden with the environment variable ``GODOT_IOS_PROVISIONING_PROFILE UUID of the provisioning profile. If left empty, Xcode will download or create a provisioning profile automatically. See `Edit, download, or delete provisioning profiles `__. -Can be overridden with the environment variable ``GODOT_IOS_PROVISIONING_PROFILE_UUID_RELEASE``. +Can be overridden with the environment variable ``GODOT_APPLE_PLATFORM_PROVISIONING_PROFILE_UUID_RELEASE``. .. rst-class:: classref-item-separator @@ -825,7 +813,7 @@ Additional data added to the ``UIRequiredDeviceCapabilities`` array of the ``Inf Requires the graphics performance and features of the A12 Bionic and later chips (devices supporting all Vulkan renderer features). -Enabling this option limits supported devices to: iPhone XS, iPhone XR, iPad Mini (5th gen.), iPad Air (3rd gen.), iPad (8th gen) and newer. +Enabling this option limits supported devices to: iPhone XS, iPhone XR, iPad Mini (5th gen.), iPad Air (3rd gen.), iPad (8th gen), and newer. .. rst-class:: classref-item-separator @@ -892,7 +880,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 +892,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 @@ -3372,6 +3360,18 @@ The reasons your app use user defaults API. See `Describing use of required reas ---- +.. _class_EditorExportPlatformIOS_property_shader_baker/enabled: + +.. rst-class:: classref-property + +:ref:`bool` **shader_baker/enabled** :ref:`🔗` + +If ``true``, shaders will be compiled and embedded in the application. This option is only supported when using the Forward+ or Mobile renderers. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformIOS_property_storyboard/custom_bg_color: .. rst-class:: classref-property @@ -3453,6 +3453,7 @@ If ``true``, the app "Documents" folder can be accessed via "Files" app. See `LS If ``true``, the app "Documents" folder can be accessed via iTunes file sharing. See `UIFileSharingEnabled `__. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformlinuxbsd.rst b/classes/class_editorexportplatformlinuxbsd.rst index 082c9a7912d..5bd81f4bcbe 100644 --- a/classes/class_editorexportplatformlinuxbsd.rst +++ b/classes/class_editorexportplatformlinuxbsd.rst @@ -40,6 +40,8 @@ Properties +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/export_console_wrapper` | +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shader_baker/enabled` | + +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`ssh_remote_deploy/cleanup_script` | +-----------------------------+-----------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`ssh_remote_deploy/enabled` | @@ -76,9 +78,9 @@ Property Descriptions Application executable architecture. -Supported architectures: ``x86_32``, ``x86_64``, ``arm64``, ``arm32``, ``rv64``, ``ppc64``, ``ppc32``, and ``loongarch64``. +Supported architectures: ``x86_32``, ``x86_64``, ``arm64``, ``arm32``, ``rv64``, ``ppc64``, 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 @@ -132,6 +134,18 @@ If ``true``, a console wrapper is exported alongside the main executable, which ---- +.. _class_EditorExportPlatformLinuxBSD_property_shader_baker/enabled: + +.. rst-class:: classref-property + +:ref:`bool` **shader_baker/enabled** :ref:`🔗` + +If ``true``, shaders will be compiled and embedded in the application. This option is only supported when using the Forward+ or Mobile renderers. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformLinuxBSD_property_ssh_remote_deploy/cleanup_script: .. rst-class:: classref-property @@ -257,6 +271,7 @@ If ``true``, project textures are exported in the ETC2/ASTC format. If ``true``, project textures are exported in the S3TC/BPTC format. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformmacos.rst b/classes/class_editorexportplatformmacos.rst index 90d54ea7440..6d13ba12b14 100644 --- a/classes/class_editorexportplatformmacos.rst +++ b/classes/class_editorexportplatformmacos.rst @@ -476,6 +476,8 @@ Properties +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`privacy/tracking_enabled` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shader_baker/enabled` | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`ssh_remote_deploy/cleanup_script` | +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`ssh_remote_deploy/enabled` | @@ -3212,6 +3214,18 @@ Indicates whether your app uses data for tracking. See `Privacy manifest files < ---- +.. _class_EditorExportPlatformMacOS_property_shader_baker/enabled: + +.. rst-class:: classref-property + +:ref:`bool` **shader_baker/enabled** :ref:`🔗` + +If ``true``, shaders will be compiled and embedded in the application. This option is only supported when using the Forward+ or Mobile renderers. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformMacOS_property_ssh_remote_deploy/cleanup_script: .. rst-class:: classref-property @@ -3385,6 +3399,7 @@ Xcode build number used to build application executable. Xcode version used to build application executable. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformpc.rst b/classes/class_editorexportplatformpc.rst index 19cc14fe963..2ef2510eb41 100644 --- a/classes/class_editorexportplatformpc.rst +++ b/classes/class_editorexportplatformpc.rst @@ -21,7 +21,7 @@ Base class for the desktop platform exporter (Windows and Linux/BSD). Description ----------- -The base class for the desktop platform exporters. These include Windows and Linux/BSD, but not macOS. See the classes inheriting this one for more details. +The base class for the desktop platform exporters. These include Windows and Linux/BSD, but not macOS. See the classes inheriting from this one for more details. .. rst-class:: classref-introduction-group @@ -33,6 +33,7 @@ Tutorials - :doc:`Exporting for Linux <../tutorials/export/exporting_for_linux>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformvisionos.rst b/classes/class_editorexportplatformvisionos.rst new file mode 100644 index 00000000000..6c70c11110e --- /dev/null +++ b/classes/class_editorexportplatformvisionos.rst @@ -0,0 +1,2709 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Redot engine sources. +.. Generator: https://github.com/Redot-Engine/redot-engine/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/Redot-Engine/redot-engine/tree/master/platform/visionos/doc_classes/EditorExportPlatformVisionOS.xml. + +.. _class_EditorExportPlatformVisionOS: + +EditorExportPlatformVisionOS +============================ + +**Inherits:** :ref:`EditorExportPlatformAppleEmbedded` **<** :ref:`EditorExportPlatform` **<** :ref:`RefCounted` **<** :ref:`Object` + +Exporter for visionOS. + +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- :doc:`Exporting for iOS <../tutorials/export/exporting_for_ios>` + +- :doc:`iOS plugins documentation index <../tutorials/platform/ios/index>` + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/additional_plist_content` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/app_store_team_id` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/bundle_identifier` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/code_sign_identity_debug` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/code_sign_identity_release` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/delete_old_export_files_unconditionally` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/export_method_debug` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/export_method_release` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/export_project_only` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`application/icon_interpolation` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/min_visionos_version` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/provisioning_profile_specifier_debug` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/provisioning_profile_specifier_release` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/provisioning_profile_uuid_debug` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/provisioning_profile_uuid_release` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/short_version` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/signature` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`application/version` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`architectures/arm64` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`capabilities/access_wifi` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`capabilities/additional` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`capabilities/performance_a12` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`capabilities/performance_gaming_tier` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/debug` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`custom_template/release` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`entitlements/additional` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`entitlements/game_center` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`entitlements/increased_memory_limit` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`entitlements/push_notifications` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/icon_1024x1024` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/icon_1024x1024_dark` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`icons/icon_1024x1024_tinted` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/active_keyboard_access_reasons` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/camera_usage_description` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/camera_usage_description_localized` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/advertising_data/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/advertising_data/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/advertising_data/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/advertising_data/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/audio_data/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/audio_data/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/audio_data/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/audio_data/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/browsing_history/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/browsing_history/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/browsing_history/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/browsing_history/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/coarse_location/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/coarse_location/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/coarse_location/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/coarse_location/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/contacts/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/contacts/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/contacts/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/contacts/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/crash_data/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/crash_data/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/crash_data/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/crash_data/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/credit_info/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/credit_info/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/credit_info/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/credit_info/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/customer_support/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/customer_support/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/customer_support/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/customer_support/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/device_id/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/device_id/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/device_id/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/device_id/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/email_address/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/email_address/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/email_address/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/email_address/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/emails_or_text_messages/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/emails_or_text_messages/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/emails_or_text_messages/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/emails_or_text_messages/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/environment_scanning/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/environment_scanning/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/environment_scanning/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/environment_scanning/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/fitness/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/fitness/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/fitness/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/fitness/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/gameplay_content/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/gameplay_content/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/gameplay_content/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/gameplay_content/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/hands/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/hands/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/hands/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/hands/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/head/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/head/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/head/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/head/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/health/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/health/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/health/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/health/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/name/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/name/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/name/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/name/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_contact_info/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_contact_info/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_contact_info/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_contact_info/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_data_types/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_data_types/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_data_types/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_data_types/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_diagnostic_data/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_diagnostic_data/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_diagnostic_data/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_diagnostic_data/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_financial_info/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_financial_info/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_financial_info/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_financial_info/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_usage_data/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_usage_data/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_usage_data/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_usage_data/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_user_content/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/other_user_content/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_user_content/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/other_user_content/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/payment_info/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/payment_info/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/payment_info/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/payment_info/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/performance_data/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/performance_data/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/performance_data/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/performance_data/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/phone_number/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/phone_number/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/phone_number/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/phone_number/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/photos_or_videos/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/photos_or_videos/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/photos_or_videos/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/photos_or_videos/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/physical_address/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/physical_address/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/physical_address/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/physical_address/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/precise_location/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/precise_location/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/precise_location/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/precise_location/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/product_interaction/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/product_interaction/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/product_interaction/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/product_interaction/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/purchase_history/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/purchase_history/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/purchase_history/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/purchase_history/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/search_hhistory/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/search_hhistory/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/search_hhistory/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/search_hhistory/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/sensitive_info/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/sensitive_info/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/sensitive_info/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/sensitive_info/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/user_id/collected` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/collected_data/user_id/collection_purposes` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/user_id/linked_to_user` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/collected_data/user_id/used_for_tracking` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/disk_space_access_reasons` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/file_timestamp_access_reasons` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/microphone_usage_description` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/microphone_usage_description_localized` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`privacy/photolibrary_usage_description` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`privacy/photolibrary_usage_description_localized` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/system_boot_time_access_reasons` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`privacy/tracking_domains` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`privacy/tracking_enabled` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`privacy/user_defaults_access_reasons` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shader_baker/enabled` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`user_data/accessible_from_files_app` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`user_data/accessible_from_itunes_sharing` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_EditorExportPlatformVisionOS_property_application/additional_plist_content: + +.. rst-class:: classref-property + +:ref:`String` **application/additional_plist_content** :ref:`🔗` + +Additional data added to the root ```` section of the `Info.plist `__ file. The value should be an XML section with pairs of key-value elements, e.g.: + +.. code:: text + + key_name + value + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/app_store_team_id: + +.. rst-class:: classref-property + +:ref:`String` **application/app_store_team_id** :ref:`🔗` + +Apple Team ID, unique 10-character string. To locate your Team ID check "Membership details" section in your Apple developer account dashboard, or "Organizational Unit" of your code signing certificate. See `Locate your Team ID `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/bundle_identifier: + +.. rst-class:: classref-property + +:ref:`String` **application/bundle_identifier** :ref:`🔗` + +Unique application identifier in a reverse-DNS format, can only contain alphanumeric characters (``A-Z``, ``a-z``, and ``0-9``), hyphens (``-``), and periods (``.``). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/code_sign_identity_debug: + +.. rst-class:: classref-property + +:ref:`String` **application/code_sign_identity_debug** :ref:`🔗` + +The "Full Name", "Common Name" or SHA-1 hash of the signing identity used for debug export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/code_sign_identity_release: + +.. rst-class:: classref-property + +:ref:`String` **application/code_sign_identity_release** :ref:`🔗` + +The "Full Name", "Common Name" or SHA-1 hash of the signing identity used for release export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/delete_old_export_files_unconditionally: + +.. rst-class:: classref-property + +:ref:`bool` **application/delete_old_export_files_unconditionally** :ref:`🔗` + +If ``true``, existing "project name" and "project name.xcodeproj" in the export destination directory will be unconditionally deleted during export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/export_method_debug: + +.. rst-class:: classref-property + +:ref:`int` **application/export_method_debug** :ref:`🔗` + +Application distribution target (debug export). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/export_method_release: + +.. rst-class:: classref-property + +:ref:`int` **application/export_method_release** :ref:`🔗` + +Application distribution target (release export). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/export_project_only: + +.. rst-class:: classref-property + +:ref:`bool` **application/export_project_only** :ref:`🔗` + +If ``true``, exports iOS project files without building an XCArchive or ``.ipa`` file. If ``false``, exports iOS project files and builds an XCArchive and ``.ipa`` file at the same time. When combining Redot with Fastlane or other build pipelines, you may want to set this to ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/icon_interpolation: + +.. rst-class:: classref-property + +:ref:`int` **application/icon_interpolation** :ref:`🔗` + +Interpolation method used to resize application icon. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/min_visionos_version: + +.. rst-class:: classref-property + +:ref:`String` **application/min_visionos_version** :ref:`🔗` + +.. container:: contribute + + There is currently no description for this property. Please help us by :ref:`contributing one `! + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/provisioning_profile_specifier_debug: + +.. rst-class:: classref-property + +:ref:`String` **application/provisioning_profile_specifier_debug** :ref:`🔗` + +Name of the provisioning profile. Sets XCode PROVISIONING_PROFILE_SPECIFIER for debug. `Used for manual provisioning `__. + +Can be overridden with the environment variable ``GODOT_APPLE_PLATFORM_PROFILE_SPECIFIER_DEBUG``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/provisioning_profile_specifier_release: + +.. rst-class:: classref-property + +:ref:`String` **application/provisioning_profile_specifier_release** :ref:`🔗` + +Name of the provisioning profile. Sets XCode PROVISIONING_PROFILE_SPECIFIER for release. `Used for manual provisioning `__. + +Can be overridden with the environment variable ``GODOT_APPLE_PLATFORM_PROFILE_SPECIFIER_RELEASE``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/provisioning_profile_uuid_debug: + +.. rst-class:: classref-property + +:ref:`String` **application/provisioning_profile_uuid_debug** :ref:`🔗` + +UUID of the provisioning profile. If left empty, Xcode will download or create a provisioning profile automatically. See `Edit, download, or delete provisioning profiles `__. + +Can be overridden with the environment variable ``GODOT_APPLE_PLATFORM_PROVISIONING_PROFILE_UUID_DEBUG``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/provisioning_profile_uuid_release: + +.. rst-class:: classref-property + +:ref:`String` **application/provisioning_profile_uuid_release** :ref:`🔗` + +UUID of the provisioning profile. If left empty, Xcode will download or create a provisioning profile automatically. See `Edit, download, or delete provisioning profiles `__. + +Can be overridden with the environment variable ``GODOT_APPLE_PLATFORM_PROVISIONING_PROFILE_UUID_RELEASE``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/short_version: + +.. rst-class:: classref-property + +:ref:`String` **application/short_version** :ref:`🔗` + +Application version visible to the user, can only contain numeric characters (``0-9``) and periods (``.``). Falls back to :ref:`ProjectSettings.application/config/version` if left empty. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/signature: + +.. rst-class:: classref-property + +:ref:`String` **application/signature** :ref:`🔗` + +A four-character creator code that is specific to the bundle. Optional. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_application/version: + +.. rst-class:: classref-property + +:ref:`String` **application/version** :ref:`🔗` + +Machine-readable application version, in the ``major.minor.patch`` format, can only contain numeric characters (``0-9``) and periods (``.``). This must be incremented on every new release pushed to the App Store. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_architectures/arm64: + +.. rst-class:: classref-property + +:ref:`bool` **architectures/arm64** :ref:`🔗` + +If ``true``, ``arm64`` binaries are included into exported project. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_capabilities/access_wifi: + +.. rst-class:: classref-property + +:ref:`bool` **capabilities/access_wifi** :ref:`🔗` + +If ``true``, networking features related to Wi-Fi access are enabled. See `Required Device Capabilities `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_capabilities/additional: + +.. rst-class:: classref-property + +:ref:`PackedStringArray` **capabilities/additional** :ref:`🔗` + +Additional data added to the ``UIRequiredDeviceCapabilities`` array of the ``Info.plist`` file. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_capabilities/performance_a12: + +.. rst-class:: classref-property + +:ref:`bool` **capabilities/performance_a12** :ref:`🔗` + +Requires the graphics performance and features of the A12 Bionic and later chips (devices supporting all Vulkan renderer features). + +Enabling this option limits supported devices to: iPhone XS, iPhone XR, iPad Mini (5th gen.), iPad Air (3rd gen.), iPad (8th gen) and newer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_capabilities/performance_gaming_tier: + +.. rst-class:: classref-property + +:ref:`bool` **capabilities/performance_gaming_tier** :ref:`🔗` + +Requires the graphics performance and features of the A17 Pro and later chips. + +Enabling this option limits supported devices to: iPhone 15 Pro and newer. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_custom_template/debug: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/debug** :ref:`🔗` + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_custom_template/release: + +.. rst-class:: classref-property + +:ref:`String` **custom_template/release** :ref:`🔗` + +Path to the custom export template. If left empty, default template is used. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_entitlements/additional: + +.. rst-class:: classref-property + +:ref:`String` **entitlements/additional** :ref:`🔗` + +Additional data added to the root ```` section of the `.entitlements `__ file. The value should be an XML section with pairs of key-value elements, for example: + +.. code:: text + + key_name + value + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_entitlements/game_center: + +.. rst-class:: classref-property + +:ref:`bool` **entitlements/game_center** :ref:`🔗` + +If ``true``, allows access to Game Center features. See `com.apple.developer.game-center `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_entitlements/increased_memory_limit: + +.. rst-class:: classref-property + +:ref:`bool` **entitlements/increased_memory_limit** :ref:`🔗` + +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 + +---- + +.. _class_EditorExportPlatformVisionOS_property_entitlements/push_notifications: + +.. rst-class:: classref-property + +:ref:`String` **entitlements/push_notifications** :ref:`🔗` + +Environment for Apple Push Notification service. See `aps-environment `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_icons/icon_1024x1024: + +.. rst-class:: classref-property + +:ref:`String` **icons/icon_1024x1024** :ref:`🔗` + +Base application icon used to generate other icons. If left empty, it will fallback to :ref:`ProjectSettings.application/config/icon`. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_icons/icon_1024x1024_dark: + +.. rst-class:: classref-property + +:ref:`String` **icons/icon_1024x1024_dark** :ref:`🔗` + +Base application icon used to generate other icons, dark version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_icons/icon_1024x1024_tinted: + +.. rst-class:: classref-property + +:ref:`String` **icons/icon_1024x1024_tinted** :ref:`🔗` + +Base application icon used to generate other icons, tinted version. See `App icons `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/active_keyboard_access_reasons: + +.. rst-class:: classref-property + +:ref:`int` **privacy/active_keyboard_access_reasons** :ref:`🔗` + +The reasons your app use active keyboard API. See `Describing use of required reason API `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/camera_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/camera_usage_description** :ref:`🔗` + +A message displayed when requesting access to the device's camera (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/camera_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/camera_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the device's camera (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/advertising_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/advertising_data/collected** :ref:`🔗` + +Indicates whether your app collects advertising data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/advertising_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/advertising_data/collection_purposes** :ref:`🔗` + +The reasons your app collects advertising data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/advertising_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/advertising_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links advertising data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/advertising_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/advertising_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses advertising data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/audio_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/audio_data/collected** :ref:`🔗` + +Indicates whether your app collects audio data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/audio_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/audio_data/collection_purposes** :ref:`🔗` + +The reasons your app collects audio data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/audio_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/audio_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links audio data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/audio_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/audio_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses audio data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/browsing_history/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/browsing_history/collected** :ref:`🔗` + +Indicates whether your app collects browsing history. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/browsing_history/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/browsing_history/collection_purposes** :ref:`🔗` + +The reasons your app collects browsing history. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/browsing_history/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/browsing_history/linked_to_user** :ref:`🔗` + +Indicates whether your app links browsing history to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/browsing_history/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/browsing_history/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses browsing history for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/coarse_location/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/coarse_location/collected** :ref:`🔗` + +Indicates whether your app collects coarse location data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/coarse_location/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/coarse_location/collection_purposes** :ref:`🔗` + +The reasons your app collects coarse location data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/coarse_location/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/coarse_location/linked_to_user** :ref:`🔗` + +Indicates whether your app links coarse location data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/coarse_location/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/coarse_location/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses coarse location data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/contacts/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/contacts/collected** :ref:`🔗` + +Indicates whether your app collects contacts. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/contacts/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/contacts/collection_purposes** :ref:`🔗` + +The reasons your app collects contacts. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/contacts/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/contacts/linked_to_user** :ref:`🔗` + +Indicates whether your app links contacts to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/contacts/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/contacts/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses contacts for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/crash_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/crash_data/collected** :ref:`🔗` + +Indicates whether your app collects crash data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/crash_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/crash_data/collection_purposes** :ref:`🔗` + +The reasons your app collects crash data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/crash_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/crash_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links crash data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/crash_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/crash_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses crash data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/credit_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/credit_info/collected** :ref:`🔗` + +Indicates whether your app collects credit information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/credit_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/credit_info/collection_purposes** :ref:`🔗` + +The reasons your app collects credit information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/credit_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/credit_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links credit information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/credit_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/credit_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses credit information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/customer_support/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/customer_support/collected** :ref:`🔗` + +Indicates whether your app collects customer support data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/customer_support/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/customer_support/collection_purposes** :ref:`🔗` + +The reasons your app collects customer support data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/customer_support/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/customer_support/linked_to_user** :ref:`🔗` + +Indicates whether your app links customer support data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/customer_support/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/customer_support/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses customer support data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/device_id/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/device_id/collected** :ref:`🔗` + +Indicates whether your app collects device IDs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/device_id/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/device_id/collection_purposes** :ref:`🔗` + +The reasons your app collects device IDs. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/device_id/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/device_id/linked_to_user** :ref:`🔗` + +Indicates whether your app links device IDs to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/device_id/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/device_id/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses device IDs for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/email_address/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/email_address/collected** :ref:`🔗` + +Indicates whether your app collects email address. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/email_address/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/email_address/collection_purposes** :ref:`🔗` + +The reasons your app collects email address. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/email_address/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/email_address/linked_to_user** :ref:`🔗` + +Indicates whether your app links email address to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/email_address/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/email_address/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses email address for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/emails_or_text_messages/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/emails_or_text_messages/collected** :ref:`🔗` + +Indicates whether your app collects emails or text messages. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/emails_or_text_messages/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/emails_or_text_messages/collection_purposes** :ref:`🔗` + +The reasons your app collects emails or text messages. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/emails_or_text_messages/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/emails_or_text_messages/linked_to_user** :ref:`🔗` + +Indicates whether your app links emails or text messages to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/emails_or_text_messages/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/emails_or_text_messages/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses emails or text messages for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/environment_scanning/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/environment_scanning/collected** :ref:`🔗` + +Indicates whether your app collects environment scanning data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/environment_scanning/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/environment_scanning/collection_purposes** :ref:`🔗` + +The reasons your app collects environment scanning data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/environment_scanning/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/environment_scanning/linked_to_user** :ref:`🔗` + +Indicates whether your app links environment scanning data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/environment_scanning/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/environment_scanning/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses environment scanning data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/fitness/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/fitness/collected** :ref:`🔗` + +Indicates whether your app collects fitness and exercise data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/fitness/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/fitness/collection_purposes** :ref:`🔗` + +The reasons your app collects fitness and exercise data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/fitness/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/fitness/linked_to_user** :ref:`🔗` + +Indicates whether your app links fitness and exercise data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/fitness/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/fitness/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses fitness and exercise data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/gameplay_content/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/gameplay_content/collected** :ref:`🔗` + +Indicates whether your app collects gameplay content. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/gameplay_content/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/gameplay_content/collection_purposes** :ref:`🔗` + +The reasons your app collects gameplay content. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/gameplay_content/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/gameplay_content/linked_to_user** :ref:`🔗` + +Indicates whether your app links gameplay content to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/gameplay_content/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/gameplay_content/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses gameplay content for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/hands/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/hands/collected** :ref:`🔗` + +Indicates whether your app collects user's hand structure and hand movements. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/hands/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/hands/collection_purposes** :ref:`🔗` + +The reasons your app collects user's hand structure and hand movements. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/hands/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/hands/linked_to_user** :ref:`🔗` + +Indicates whether your app links user's hand structure and hand movements to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/hands/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/hands/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user's hand structure and hand movements for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/head/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/head/collected** :ref:`🔗` + +Indicates whether your app collects user's head movement. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/head/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/head/collection_purposes** :ref:`🔗` + +The reasons your app collects user's head movement. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/head/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/head/linked_to_user** :ref:`🔗` + +Indicates whether your app links user's head movement to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/head/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/head/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user's head movement for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/health/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/health/collected** :ref:`🔗` + +Indicates whether your app collects health and medical data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/health/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/health/collection_purposes** :ref:`🔗` + +The reasons your app collects health and medical data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/health/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/health/linked_to_user** :ref:`🔗` + +Indicates whether your app links health and medical data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/health/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/health/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses health and medical data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/name/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/name/collected** :ref:`🔗` + +Indicates whether your app collects user's name. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/name/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/name/collection_purposes** :ref:`🔗` + +The reasons your app collects user's name. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/name/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/name/linked_to_user** :ref:`🔗` + +Indicates whether your app links user's name to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/name/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/name/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user's name for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_contact_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_contact_info/collected** :ref:`🔗` + +Indicates whether your app collects any other contact information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_contact_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_contact_info/collection_purposes** :ref:`🔗` + +The reasons your app collects any other contact information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_contact_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_contact_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other contact information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_contact_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_contact_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other contact information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_data_types/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_data_types/collected** :ref:`🔗` + +Indicates whether your app collects any other data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_data_types/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_data_types/collection_purposes** :ref:`🔗` + +The reasons your app collects any other data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_data_types/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_data_types/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_data_types/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_data_types/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_diagnostic_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_diagnostic_data/collected** :ref:`🔗` + +Indicates whether your app collects any other diagnostic data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_diagnostic_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_diagnostic_data/collection_purposes** :ref:`🔗` + +The reasons your app collects any other diagnostic data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_diagnostic_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_diagnostic_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other diagnostic data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_diagnostic_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_diagnostic_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other diagnostic data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_financial_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_financial_info/collected** :ref:`🔗` + +Indicates whether your app collects any other financial information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_financial_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_financial_info/collection_purposes** :ref:`🔗` + +The reasons your app collects any other financial information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_financial_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_financial_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other financial information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_financial_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_financial_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other financial information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_usage_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_usage_data/collected** :ref:`🔗` + +Indicates whether your app collects any other usage data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_usage_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_usage_data/collection_purposes** :ref:`🔗` + +The reasons your app collects any other usage data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_usage_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_usage_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other usage data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_usage_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_usage_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other usage data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_user_content/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_user_content/collected** :ref:`🔗` + +Indicates whether your app collects any other user generated content. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_user_content/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/other_user_content/collection_purposes** :ref:`🔗` + +The reasons your app collects any other user generated content. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_user_content/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_user_content/linked_to_user** :ref:`🔗` + +Indicates whether your app links any other user generated content to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/other_user_content/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/other_user_content/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses any other user generated content for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/payment_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/payment_info/collected** :ref:`🔗` + +Indicates whether your app collects payment information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/payment_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/payment_info/collection_purposes** :ref:`🔗` + +The reasons your app collects payment information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/payment_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/payment_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links payment information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/payment_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/payment_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses payment information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/performance_data/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/performance_data/collected** :ref:`🔗` + +Indicates whether your app collects performance data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/performance_data/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/performance_data/collection_purposes** :ref:`🔗` + +The reasons your app collects performance data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/performance_data/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/performance_data/linked_to_user** :ref:`🔗` + +Indicates whether your app links performance data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/performance_data/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/performance_data/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses performance data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/phone_number/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/phone_number/collected** :ref:`🔗` + +Indicates whether your app collects phone number. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/phone_number/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/phone_number/collection_purposes** :ref:`🔗` + +The reasons your app collects phone number. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/phone_number/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/phone_number/linked_to_user** :ref:`🔗` + +Indicates whether your app links phone number to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/phone_number/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/phone_number/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses phone number for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/photos_or_videos/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/photos_or_videos/collected** :ref:`🔗` + +Indicates whether your app collects photos or videos. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/photos_or_videos/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/photos_or_videos/collection_purposes** :ref:`🔗` + +The reasons your app collects photos or videos. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/photos_or_videos/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/photos_or_videos/linked_to_user** :ref:`🔗` + +Indicates whether your app links photos or videos to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/photos_or_videos/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/photos_or_videos/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses photos or videos for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/physical_address/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/physical_address/collected** :ref:`🔗` + +Indicates whether your app collects physical address. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/physical_address/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/physical_address/collection_purposes** :ref:`🔗` + +The reasons your app collects physical address. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/physical_address/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/physical_address/linked_to_user** :ref:`🔗` + +Indicates whether your app links physical address to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/physical_address/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/physical_address/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses physical address for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/precise_location/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/precise_location/collected** :ref:`🔗` + +Indicates whether your app collects precise location data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/precise_location/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/precise_location/collection_purposes** :ref:`🔗` + +The reasons your app collects precise location data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/precise_location/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/precise_location/linked_to_user** :ref:`🔗` + +Indicates whether your app links precise location data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/precise_location/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/precise_location/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses precise location data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/product_interaction/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/product_interaction/collected** :ref:`🔗` + +Indicates whether your app collects product interaction data. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/product_interaction/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/product_interaction/collection_purposes** :ref:`🔗` + +The reasons your app collects product interaction data. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/product_interaction/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/product_interaction/linked_to_user** :ref:`🔗` + +Indicates whether your app links product interaction data to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/product_interaction/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/product_interaction/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses product interaction data for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/purchase_history/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/purchase_history/collected** :ref:`🔗` + +Indicates whether your app collects purchase history. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/purchase_history/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/purchase_history/collection_purposes** :ref:`🔗` + +The reasons your app collects purchase history. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/purchase_history/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/purchase_history/linked_to_user** :ref:`🔗` + +Indicates whether your app links purchase history to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/purchase_history/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/purchase_history/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses purchase history for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/search_hhistory/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/search_hhistory/collected** :ref:`🔗` + +Indicates whether your app collects search history. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/search_hhistory/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/search_hhistory/collection_purposes** :ref:`🔗` + +The reasons your app collects search history. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/search_hhistory/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/search_hhistory/linked_to_user** :ref:`🔗` + +Indicates whether your app links search history to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/search_hhistory/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/search_hhistory/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses search history for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/sensitive_info/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/sensitive_info/collected** :ref:`🔗` + +Indicates whether your app collects sensitive user information. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/sensitive_info/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/sensitive_info/collection_purposes** :ref:`🔗` + +The reasons your app collects sensitive user information. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/sensitive_info/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/sensitive_info/linked_to_user** :ref:`🔗` + +Indicates whether your app links sensitive user information to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/sensitive_info/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/sensitive_info/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses sensitive user information for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/user_id/collected: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/user_id/collected** :ref:`🔗` + +Indicates whether your app collects user IDs. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/user_id/collection_purposes: + +.. rst-class:: classref-property + +:ref:`int` **privacy/collected_data/user_id/collection_purposes** :ref:`🔗` + +The reasons your app collects user IDs. See `Describing data use in privacy manifests `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/user_id/linked_to_user: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/user_id/linked_to_user** :ref:`🔗` + +Indicates whether your app links user IDs to the user's identity. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/collected_data/user_id/used_for_tracking: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/collected_data/user_id/used_for_tracking** :ref:`🔗` + +Indicates whether your app uses user IDs for tracking. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/disk_space_access_reasons: + +.. rst-class:: classref-property + +:ref:`int` **privacy/disk_space_access_reasons** :ref:`🔗` + +The reasons your app use free disk space API. See `Describing use of required reason API `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/file_timestamp_access_reasons: + +.. rst-class:: classref-property + +:ref:`int` **privacy/file_timestamp_access_reasons** :ref:`🔗` + +The reasons your app use file timestamp/metadata API. See `Describing use of required reason API `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/microphone_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/microphone_usage_description** :ref:`🔗` + +A message displayed when requesting access to the device's microphone (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/microphone_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/microphone_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the device's microphone (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/photolibrary_usage_description: + +.. rst-class:: classref-property + +:ref:`String` **privacy/photolibrary_usage_description** :ref:`🔗` + +A message displayed when requesting access to the user's photo library (in English). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/photolibrary_usage_description_localized: + +.. rst-class:: classref-property + +:ref:`Dictionary` **privacy/photolibrary_usage_description_localized** :ref:`🔗` + +A message displayed when requesting access to the user's photo library (localized). + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/system_boot_time_access_reasons: + +.. rst-class:: classref-property + +:ref:`int` **privacy/system_boot_time_access_reasons** :ref:`🔗` + +The reasons your app use system boot time / absolute time API. See `Describing use of required reason API `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/tracking_domains: + +.. rst-class:: classref-property + +:ref:`PackedStringArray` **privacy/tracking_domains** :ref:`🔗` + +The list of internet domains your app connects to that engage in tracking. See `Privacy manifest files `__. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedStringArray` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/tracking_enabled: + +.. rst-class:: classref-property + +:ref:`bool` **privacy/tracking_enabled** :ref:`🔗` + +Indicates whether your app uses data for tracking. See `Privacy manifest files `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_privacy/user_defaults_access_reasons: + +.. rst-class:: classref-property + +:ref:`int` **privacy/user_defaults_access_reasons** :ref:`🔗` + +The reasons your app use user defaults API. See `Describing use of required reason API `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_shader_baker/enabled: + +.. rst-class:: classref-property + +:ref:`bool` **shader_baker/enabled** :ref:`🔗` + +If ``true``, shaders will be compiled and embedded in the application. This option is only supported when using the Forward+ and Mobile renderers. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_user_data/accessible_from_files_app: + +.. rst-class:: classref-property + +:ref:`bool` **user_data/accessible_from_files_app** :ref:`🔗` + +If ``true``, the app "Documents" folder can be accessed via "Files" app. See `LSSupportsOpeningDocumentsInPlace `__. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlatformVisionOS_property_user_data/accessible_from_itunes_sharing: + +.. rst-class:: classref-property + +:ref:`bool` **user_data/accessible_from_itunes_sharing** :ref:`🔗` + +If ``true``, the app "Documents" folder can be accessed via iTunes file sharing. See `UIFileSharingEnabled `__. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` +.. |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.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_editorexportplatformweb.rst b/classes/class_editorexportplatformweb.rst index 42c1a0207c4..9cf2817fd76 100644 --- a/classes/class_editorexportplatformweb.rst +++ b/classes/class_editorexportplatformweb.rst @@ -75,8 +75,12 @@ Properties +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`progressive_web_app/orientation` | +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`variant/emscripten_pool_size` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`variant/extensions_support` | +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`variant/godot_pool_size` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`variant/thread_support` | +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`vram_texture_compression/for_desktop` | @@ -331,6 +335,20 @@ The orientation to use when the web application is run through a mobile device. ---- +.. _class_EditorExportPlatformWeb_property_variant/emscripten_pool_size: + +.. rst-class:: classref-property + +:ref:`int` **variant/emscripten_pool_size** :ref:`🔗` + +The number of threads that emscripten will allocate at startup. A smaller value will allocate fewer threads and consume fewer system resources, but you may run the risk of running out of threads in the pool and needing to allocate more threads at run time which may cause a deadlock. + +\ **Note:** Some browsers have a hard cap on the number of threads that can be allocated, so it is best to be cautious and keep this number low. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformWeb_property_variant/extensions_support: .. rst-class:: classref-property @@ -343,6 +361,20 @@ If ``true`` enables :ref:`GDExtension` support for this web b ---- +.. _class_EditorExportPlatformWeb_property_variant/godot_pool_size: + +.. rst-class:: classref-property + +:ref:`int` **variant/godot_pool_size** :ref:`🔗` + +Override for the default size of the :ref:`WorkerThreadPool`. This setting is used when :ref:`ProjectSettings.threading/worker_pool/max_threads` size is set to -1 (which it is by default). This size must be smaller than :ref:`variant/emscripten_pool_size` otherwise deadlocks may occur. + +When using threads this size needs to be large enough to accommodate features that rely on having a dedicated thread like :ref:`ProjectSettings.physics/2d/run_on_separate_thread` or :ref:`ProjectSettings.rendering/driver/threads/thread_model`. In general, it is best to ensure that this is at least 4 and is at least 2 or 3 less than :ref:`variant/emscripten_pool_size`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformWeb_property_variant/thread_support: .. rst-class:: classref-property @@ -363,7 +395,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,9 +407,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformwindows.rst b/classes/class_editorexportplatformwindows.rst index c38597dfbe0..a0da89037b9 100644 --- a/classes/class_editorexportplatformwindows.rst +++ b/classes/class_editorexportplatformwindows.rst @@ -93,6 +93,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`debug/export_console_wrapper` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shader_baker/enabled` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`ssh_remote_deploy/cleanup_script` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`ssh_remote_deploy/enabled` | @@ -299,8 +301,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 ---- @@ -469,6 +469,18 @@ If ``true``, a console wrapper executable is exported alongside the main executa ---- +.. _class_EditorExportPlatformWindows_property_shader_baker/enabled: + +.. rst-class:: classref-property + +:ref:`bool` **shader_baker/enabled** :ref:`🔗` + +If ``true``, shaders will be compiled and embedded in the application. This option is only supported when using the Forward+ and Mobile renderers. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformWindows_property_ssh_remote_deploy/cleanup_script: .. rst-class:: classref-property @@ -594,6 +606,7 @@ If ``true``, project textures are exported in the ETC2/ASTC format. If ``true``, project textures are exported in the S3TC/BPTC format. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 6a27ae0b839..0bba0a4ee8e 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 @@ -43,9 +43,9 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_begin_customize_scenes`\ (\ platform\: :ref:`EditorExportPlatform`, features\: :ref:`PackedStringArray`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`_customize_resource`\ (\ resource\: :ref:`Resource`, path\: :ref:`String`\ ) |virtual| | + | :ref:`Resource` | :ref:`_customize_resource`\ (\ resource\: :ref:`Resource`, path\: :ref:`String`\ ) |virtual| |required| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`_customize_scene`\ (\ scene\: :ref:`Node`, path\: :ref:`String`\ ) |virtual| | + | :ref:`Node` | :ref:`_customize_scene`\ (\ scene\: :ref:`Node`, path\: :ref:`String`\ ) |virtual| |required| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_end_customize_resources`\ (\ ) |virtual| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -69,7 +69,7 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_android_manifest_element_contents`\ (\ platform\: :ref:`EditorExportPlatform`, debug\: :ref:`bool`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_customization_configuration_hash`\ (\ ) |virtual| |const| | + | :ref:`int` | :ref:`_get_customization_configuration_hash`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`_get_export_features`\ (\ platform\: :ref:`EditorExportPlatform`, debug\: :ref:`bool`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -81,12 +81,28 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`_get_export_options_overrides`\ (\ platform\: :ref:`EditorExportPlatform`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |const| | + | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_should_update_export_options`\ (\ platform\: :ref:`EditorExportPlatform`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :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_apple_embedded_platform_bundle_file`\ (\ path\: :ref:`String`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_apple_embedded_platform_cpp_code`\ (\ code\: :ref:`String`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_apple_embedded_platform_embedded_framework`\ (\ path\: :ref:`String`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_apple_embedded_platform_framework`\ (\ path\: :ref:`String`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_apple_embedded_platform_linker_flags`\ (\ flags\: :ref:`String`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_apple_embedded_platform_plist_content`\ (\ plist_content\: :ref:`String`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_apple_embedded_platform_project_static_lib`\ (\ path\: :ref:`String`\ ) | + +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_file`\ (\ path\: :ref:`String`, file\: :ref:`PackedByteArray`, remap\: :ref:`bool`\ ) | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_ios_bundle_file`\ (\ path\: :ref:`String`\ ) | @@ -133,7 +149,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 +163,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 @@ -159,15 +175,15 @@ When enabled, :ref:`_get_customization_configuration_hash` **_customize_resource**\ (\ resource\: :ref:`Resource`, path\: :ref:`String`\ ) |virtual| :ref:`🔗` +:ref:`Resource` **_customize_resource**\ (\ resource\: :ref:`Resource`, path\: :ref:`String`\ ) |virtual| |required| :ref:`🔗` Customize a resource. If changes are made to it, return the same or a new resource. Otherwise, return ``null``. When a new resource is returned, ``resource`` will be replaced by a copy of the new resource. 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`\ @@ -189,11 +205,11 @@ Implementing this method is required if :ref:`_begin_customize_resources` **_customize_scene**\ (\ scene\: :ref:`Node`, path\: :ref:`String`\ ) |virtual| :ref:`🔗` +:ref:`Node` **_customize_scene**\ (\ scene\: :ref:`Node`, path\: :ref:`String`\ ) |virtual| |required| :ref:`🔗` Customize a scene. If changes are made to it, return the same or a new scene. Otherwise, return ``null``. If a new scene is returned, it is up to you to dispose of the old one. -Implementing this method is required if :ref:`_begin_customize_scenes` returns ``true``. +Implementing this method is required if :ref:`_begin_customize_scenes()` returns ``true``. .. rst-class:: classref-item-separator @@ -253,9 +269,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 @@ -357,11 +373,11 @@ Virtual method to be overridden by the user. This is used at export time to upda .. rst-class:: classref-method -:ref:`int` **_get_customization_configuration_hash**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`int` **_get_customization_configuration_hash**\ (\ ) |virtual| |required| |const| :ref:`🔗` 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 @@ -385,8 +401,6 @@ Return a :ref:`PackedStringArray` of additional feature :ref:`bool` **_get_export_option_visibility**\ (\ platform\: :ref:`EditorExportPlatform`, option\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Validates ``option`` and returns the visibility for the specified ``platform``. The default implementation returns ``true`` for all options. .. rst-class:: classref-item-separator @@ -401,7 +415,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 +431,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. @@ -440,13 +454,13 @@ Return a :ref:`Dictionary` of override values for export optio class MyExportPlugin extends EditorExportPlugin: func _get_name() -> String: return "MyExportPlugin" - + func _supports_platform(platform) -> bool: if platform is EditorExportPlatformPC: # Run on all desktop platforms including Windows, MacOS and Linux. return true return false - + func _get_export_options_overrides(platform) -> Dictionary: # Override "Embed PCK" to always be enabled. return { @@ -461,7 +475,7 @@ Return a :ref:`Dictionary` of override values for export optio .. rst-class:: classref-method -:ref:`String` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`String` **_get_name**\ (\ ) |virtual| |required| |const| :ref:`🔗` Return the name identifier of this plugin (for future identification by the exporter). The plugins are sorted by name before exporting. @@ -477,7 +491,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 the preset corresponding to ``platform`` should be updated. .. rst-class:: classref-item-separator @@ -495,6 +509,110 @@ 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_apple_embedded_platform_bundle_file: + +.. rst-class:: classref-method + +|void| **add_apple_embedded_platform_bundle_file**\ (\ path\: :ref:`String`\ ) :ref:`🔗` + +Adds an Apple embedded platform bundle file from the given ``path`` to the exported project. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_method_add_apple_embedded_platform_cpp_code: + +.. rst-class:: classref-method + +|void| **add_apple_embedded_platform_cpp_code**\ (\ code\: :ref:`String`\ ) :ref:`🔗` + +Adds C++ code to the Apple embedded platform export. The final code is created from the code appended by each active export plugin. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_method_add_apple_embedded_platform_embedded_framework: + +.. rst-class:: classref-method + +|void| **add_apple_embedded_platform_embedded_framework**\ (\ path\: :ref:`String`\ ) :ref:`🔗` + +Adds a dynamic library (\*.dylib, \*.framework) to the Linking Phase in the Apple embedded platform's Xcode project and embeds it into the resulting binary. + +\ **Note:** For static libraries (\*.a), this works in the same way as :ref:`add_apple_embedded_platform_framework()`. + +\ **Note:** This method should not be used for System libraries as they are already present on the device. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_method_add_apple_embedded_platform_framework: + +.. rst-class:: classref-method + +|void| **add_apple_embedded_platform_framework**\ (\ path\: :ref:`String`\ ) :ref:`🔗` + +Adds a static library (\*.a) or a dynamic library (\*.dylib, \*.framework) to the Linking Phase to the Apple embedded platform's Xcode project. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_method_add_apple_embedded_platform_linker_flags: + +.. rst-class:: classref-method + +|void| **add_apple_embedded_platform_linker_flags**\ (\ flags\: :ref:`String`\ ) :ref:`🔗` + +Adds linker flags for the Apple embedded platform export. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_method_add_apple_embedded_platform_plist_content: + +.. rst-class:: classref-method + +|void| **add_apple_embedded_platform_plist_content**\ (\ plist_content\: :ref:`String`\ ) :ref:`🔗` + +Adds additional fields to the Apple embedded platform's project Info.plist file. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorExportPlugin_method_add_apple_embedded_platform_project_static_lib: + +.. rst-class:: classref-method + +|void| **add_apple_embedded_platform_project_static_lib**\ (\ path\: :ref:`String`\ ) :ref:`🔗` + +Adds a static library from the given ``path`` to the Apple embedded platform project. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlugin_method_add_file: .. rst-class:: classref-method @@ -503,9 +621,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 @@ -517,6 +635,8 @@ When called inside :ref:`_export_file`\ ) :ref:`🔗` +**Deprecated:** Use :ref:`add_apple_embedded_platform_bundle_file()` instead. + Adds an iOS bundle file from the given ``path`` to the exported project. .. rst-class:: classref-item-separator @@ -529,7 +649,9 @@ Adds an iOS bundle file from the given ``path`` to the exported project. |void| **add_ios_cpp_code**\ (\ code\: :ref:`String`\ ) :ref:`🔗` -Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin. +**Deprecated:** Use :ref:`add_apple_embedded_platform_cpp_code()` instead. + +Adds C++ code to the iOS export. The final code is created from the code appended by each active export plugin. .. rst-class:: classref-item-separator @@ -541,9 +663,11 @@ Adds a C++ code to the iOS export. The final code is created from the code appen |void| **add_ios_embedded_framework**\ (\ path\: :ref:`String`\ ) :ref:`🔗` +**Deprecated:** Use :ref:`add_apple_embedded_platform_embedded_framework()` instead. + 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), this works the in same way as :ref:`add_apple_embedded_platform_framework()`. \ **Note:** This method should not be used for System libraries as they are already present on the device. @@ -557,7 +681,9 @@ Adds a dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode |void| **add_ios_framework**\ (\ path\: :ref:`String`\ ) :ref:`🔗` -Adds a static library (\*.a) or dynamic library (\*.dylib, \*.framework) to Linking Phase in iOS's Xcode project. +**Deprecated:** Use :ref:`add_apple_embedded_platform_framework()` instead. + +Adds a static library (\*.a) or a dynamic library (\*.dylib, \*.framework) to the Linking Phase to the iOS Xcode project. .. rst-class:: classref-item-separator @@ -569,6 +695,8 @@ Adds a static library (\*.a) or dynamic library (\*.dylib, \*.framework) to Link |void| **add_ios_linker_flags**\ (\ flags\: :ref:`String`\ ) :ref:`🔗` +**Deprecated:** Use :ref:`add_apple_embedded_platform_linker_flags()` instead. + Adds linker flags for the iOS export. .. rst-class:: classref-item-separator @@ -581,7 +709,9 @@ Adds linker flags for the iOS export. |void| **add_ios_plist_content**\ (\ plist_content\: :ref:`String`\ ) :ref:`🔗` -Adds content for iOS Property List files. +**Deprecated:** Use :ref:`add_apple_embedded_platform_plist_content()` instead. + +Adds additional fields to the iOS project Info.plist file. .. rst-class:: classref-item-separator @@ -593,7 +723,9 @@ Adds content for iOS Property List files. |void| **add_ios_project_static_lib**\ (\ path\: :ref:`String`\ ) :ref:`🔗` -Adds a static lib from the given ``path`` to the iOS project. +**Deprecated:** Use :ref:`add_apple_embedded_platform_project_static_lib()` instead. + +Adds a static library from the given ``path`` to the iOS project. .. rst-class:: classref-item-separator @@ -659,7 +791,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,9 +803,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportpreset.rst b/classes/class_editorexportpreset.rst index 38c10078ce6..76f3432ae85 100644 --- a/classes/class_editorexportpreset.rst +++ b/classes/class_editorexportpreset.rst @@ -19,7 +19,7 @@ Export preset configuration. Description ----------- -Export preset configuration. Instances of **EditorExportPreset** by editor UI and intended to be used a read-only configuration passed to the :ref:`EditorExportPlatform` methods when exporting the project. +Represents the configuration of an export preset, as created by the editor's export dialog. An **EditorExportPreset** instance is intended to be used a read-only configuration passed to the :ref:`EditorExportPlatform` methods when exporting the project. .. rst-class:: classref-reftable-group @@ -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 the "Advanced" toggle is enabled in the export dialog. .. rst-class:: classref-item-separator @@ -285,7 +287,7 @@ Returns ``true``, is "Advanced" toggle is enabled in the export dialog. :ref:`String` **get_custom_features**\ (\ ) |const| :ref:`🔗` -Returns string with a comma separated list of custom features. +Returns a comma-separated list of custom features added to this preset, as a string. See :doc:`Feature tags <../tutorials/export/feature_tags>` in the documentation for more information. .. 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 a dictionary of files selected in the "Resources" tab of the export dialog. The dictionary's keys are file paths, and its values are the corresponding export modes: ``"strip"``, ``"keep"``, or ``"remove"``. See also :ref:`get_file_export_mode()`. .. rst-class:: classref-item-separator @@ -309,7 +311,7 @@ Returns :ref:`Dictionary` of files selected in the "Resources" :ref:`int` **get_customized_files_count**\ (\ ) |const| :ref:`🔗` -Returns number of files selected in the "Resources" tab of the export dialog. +Returns the number of files selected in the "Resources" tab of the export dialog. .. 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 @@ -477,7 +479,19 @@ Returns the list of packs on which to base a patch export on. :ref:`String` **get_preset_name**\ (\ ) |const| :ref:`🔗` -Returns export preset name. +Returns this export preset's name. + +.. rst-class:: classref-item-separator + +---- + +.. _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 @@ -489,7 +503,7 @@ Returns export preset name. :ref:`int` **get_script_export_mode**\ (\ ) |const| :ref:`🔗` -Returns script export mode. +Returns the export mode used by GDScript files. ``0`` for "Text", ``1`` for "Binary tokens", and ``2`` for "Compressed binary tokens (smaller files)". .. rst-class:: classref-item-separator @@ -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 @@ -527,7 +541,7 @@ Returns ``true`` if preset has specified property. :ref:`bool` **has_export_file**\ (\ path\: :ref:`String`\ ) :ref:`🔗` -Returns ``true`` if specified file is exported. +Returns ``true`` if the file at the specified ``path`` will be exported. .. rst-class:: classref-item-separator @@ -539,7 +553,7 @@ Returns ``true`` if specified file is exported. :ref:`bool` **is_dedicated_server**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if dedicated server export mode is selected in the export dialog. +Returns ``true`` if the dedicated server export mode is selected in the export dialog. .. rst-class:: classref-item-separator @@ -551,9 +565,10 @@ Returns ``true`` if dedicated server export mode is selected in the export dialo :ref:`bool` **is_runnable**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if "Runnable" toggle is enabled in the export dialog. +Returns ``true`` if the "Runnable" toggle is enabled in the export dialog. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorfeatureprofile.rst b/classes/class_editorfeatureprofile.rst index 3e0adcdbb68..2d82067cded 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 @@ -292,6 +292,7 @@ If ``disable`` is ``true``, disables editing for ``property`` in the class speci If ``disable`` is ``true``, disables the editor feature specified in ``feature``. When a feature is disabled, it will disappear from the editor entirely. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index c739d3ed75f..722d104aa29 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 @@ -391,7 +393,7 @@ The view format in which the **EditorFileDialog** displays resources to the user - |void| **set_file_mode**\ (\ value\: :ref:`FileMode`\ ) - :ref:`FileMode` **get_file_mode**\ (\ ) -The dialog's open or save mode, which affects the selection behavior. See :ref:`FileMode`. +The dialog's open or save mode, which affects the selection behavior. .. rst-class:: classref-item-separator @@ -461,7 +463,7 @@ Method Descriptions |void| **add_filter**\ (\ filter\: :ref:`String`, description\: :ref:`String` = ""\ ) :ref:`🔗` -Adds a comma-delimited file name ``filter`` option to the **EditorFileDialog** with an optional ``description``, which restricts what files can be picked. +Adds a comma-separated file name ``filter`` option to the **EditorFileDialog** with an optional ``description``, which restricts what files can be picked. A ``filter`` should be of the form ``"filename.extension"``, where filename and extension can be ``*`` to match any string. Filters starting with ``.`` (i.e. empty filenames) are not allowed. @@ -678,6 +680,7 @@ Sets the name of the :ref:`OptionButton` or :ref:`CheckBox` with index ``option``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorfilesystem.rst b/classes/class_editorfilesystem.rst index 0515f96921c..dc076048c66 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,9 +245,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorfilesystemdirectory.rst b/classes/class_editorfilesystemdirectory.rst index 4fc5c6c977f..ff9ad4e3ce7 100644 --- a/classes/class_editorfilesystemdirectory.rst +++ b/classes/class_editorfilesystemdirectory.rst @@ -233,6 +233,7 @@ Returns the subdirectory at index ``idx``. Returns the number of subdirectories in this directory. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorfilesystemimportformatsupportquery.rst b/classes/class_editorfilesystemimportformatsupportquery.rst index 784a3c6610c..534f6d73aff 100644 --- a/classes/class_editorfilesystemimportformatsupportquery.rst +++ b/classes/class_editorfilesystemimportformatsupportquery.rst @@ -29,13 +29,13 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_file_extensions`\ (\ ) |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_active`\ (\ ) |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_query`\ (\ ) |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_file_extensions`\ (\ ) |virtual| |required| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_active`\ (\ ) |virtual| |required| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_query`\ (\ ) |virtual| |required| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -50,7 +50,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedStringArray` **_get_file_extensions**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`PackedStringArray` **_get_file_extensions**\ (\ ) |virtual| |required| |const| :ref:`🔗` Return the file extensions supported. @@ -62,7 +62,7 @@ Return the file extensions supported. .. rst-class:: classref-method -:ref:`bool` **_is_active**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`bool` **_is_active**\ (\ ) |virtual| |required| |const| :ref:`🔗` Return whether this importer is active. @@ -74,11 +74,12 @@ Return whether this importer is active. .. rst-class:: classref-method -:ref:`bool` **_query**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`bool` **_query**\ (\ ) |virtual| |required| |const| :ref:`🔗` Query support. Return ``false`` if import must not continue. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index 7ccb2b25985..57c5fcda250 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": @@ -32,94 +32,94 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr @tool extends EditorImportPlugin - + func _get_importer_name(): return "my.special.plugin" - + func _get_visible_name(): return "Special Mesh" - + func _get_recognized_extensions(): return ["special", "spec"] - + func _get_save_extension(): return "mesh" - + func _get_resource_type(): return "Mesh" - + func _get_preset_count(): return 1 - + func _get_preset_name(preset_index): return "Default" - + func _get_import_options(path, preset_index): return [{"name": "my_option", "default_value": false}] - + func _import(source_file, save_path, options, platform_variants, gen_files): var file = FileAccess.open(source_file, FileAccess.READ) if file == null: return FAILED var mesh = ArrayMesh.new() # Fill the Mesh with data read in "file", left as an exercise to the reader. - + var filename = save_path + "." + _get_save_extension() return ResourceSaver.save(mesh, filename) .. code-tab:: csharp using Godot; - + public partial class MySpecialPlugin : EditorImportPlugin { public override string _GetImporterName() { return "my.special.plugin"; } - + public override string _GetVisibleName() { return "Special Mesh"; } - + public override string[] _GetRecognizedExtensions() { - return new string[] { "special", "spec" }; + return ["special", "spec"]; } - + public override string _GetSaveExtension() { return "mesh"; } - + public override string _GetResourceType() { return "Mesh"; } - + public override int _GetPresetCount() { return 1; } - + public override string _GetPresetName(int presetIndex) { return "Default"; } - + 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) { using var file = FileAccess.Open(sourceFile, FileAccess.ModeFlags.Read); @@ -127,7 +127,7 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr { return Error.Failed; } - + var mesh = new ArrayMesh(); // Fill the Mesh with data read in "file", left as an exercise to the reader. string filename = $"{savePath}.{_GetSaveExtension()}"; @@ -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 @@ -265,7 +265,7 @@ Gets the unique name of the importer. :ref:`bool` **_get_option_visibility**\ (\ path\: :ref:`String`, option_name\: :ref:`StringName`, options\: :ref:`Dictionary`\ ) |virtual| |const| :ref:`🔗` -This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. +Gets whether the import option specified by ``option_name`` should be visible in the Import dock. The default implementation always returns ``true``, making all options visible. This is mainly useful for hiding options that depend on others if one of them is disabled. .. tabs:: @@ -276,7 +276,7 @@ This method can be overridden to hide specific import options if conditions are # Only show the lossy quality setting if the compression mode is set to "Lossy". if option == "compress/lossy_quality" and options.has("compress/mode"): return int(options["compress/mode"]) == COMPRESS_LOSSY # This is a constant that you set - + return true .. code-tab:: csharp @@ -288,14 +288,12 @@ This method can be overridden to hide specific import options if conditions are { return (int)options["compress/mode"] == CompressLossy; // This is a constant you set } - + return true; } -Returns ``true`` to make all options always visible. - .. rst-class:: classref-item-separator ---- @@ -306,7 +304,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 @@ -390,7 +388,11 @@ Gets the name to display in the import window. You should choose this name as a :ref:`Error` **_import**\ (\ source_file\: :ref:`String`, save_path\: :ref:`String`, options\: :ref:`Dictionary`, platform_variants\: :ref:`Array`\[:ref:`String`\], gen_files\: :ref:`Array`\[:ref:`String`\]\ ) |virtual| |const| :ref:`🔗` -Imports ``source_file`` into ``save_path`` with the import ``options`` specified. The ``platform_variants`` and ``gen_files`` arrays will be modified by this function. +Imports ``source_file`` with the import ``options`` specified. Should return :ref:`@GlobalScope.OK` if the import is successful, other values indicate failure. + +The imported resource is expected to be saved to ``save_path + "." + _get_save_extension()``. If a different variant is preferred for a :doc:`feature tag <../tutorials/export/feature_tags>`, save the variant to ``save_path + "." + tag + "." + _get_save_extension()`` and add the feature tag to ``platform_variants``. + +If additional resource files are generated in the resource filesystem (``res://``), add their full path to ``gen_files`` so that the editor knows they depend on ``source_file``. This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method. @@ -404,9 +406,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorinspector.rst b/classes/class_editorinspector.rst index 0ae74125c56..8c8c823ad07 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. @@ -238,6 +238,7 @@ Gets the path of the currently selected property. Creates a property editor that can be used by plugin UI to edit the specified property of an ``object``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorinspectorplugin.rst b/classes/class_editorinspectorplugin.rst index 9d13dc70898..948f71dae37 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 @@ -186,6 +186,7 @@ There can be multiple property editors for a property. If ``add_to_end`` is ``tr Adds an editor that allows modifying multiple properties. The ``editor`` control must extend :ref:`EditorProperty`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 5f227c64846..ba55d2bd1b5 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -59,119 +59,123 @@ 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`\ (\ ) | - +----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`close_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 @@ -221,6 +225,18 @@ If ``true``, the Movie Maker mode is enabled in the editor. See :ref:`MovieWrite Method Descriptions ------------------- +.. _class_EditorInterface_method_close_scene: + +.. rst-class:: classref-method + +:ref:`Error` **close_scene**\ (\ ) :ref:`🔗` + +Closes the currently active scene, discarding any pending changes in the process. Returns :ref:`@GlobalScope.OK` on success or :ref:`@GlobalScope.ERR_DOES_NOT_EXIST` if there is no scene to close. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_edit_node: .. rst-class:: classref-method @@ -239,7 +255,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 +307,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 +321,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 +359,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 +389,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 +463,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 +497,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 +725,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 +741,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 +753,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 +767,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 +781,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 +795,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 @@ -816,7 +830,7 @@ Pops up an editor dialog for selecting a :ref:`Node` from the edited func _ready(): if Engine.is_editor_hint(): EditorInterface.popup_node_selector(_on_node_selected, ["Button"]) - + func _on_node_selected(node_path): if node_path.is_empty(): print("node selection canceled") @@ -833,14 +847,14 @@ 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. :: func _ready(): if Engine.is_editor_hint(): EditorInterface.popup_property_selector(this, _on_property_selected, [TYPE_INT]) - + func _on_property_selected(property_path): if property_path.is_empty(): print("property selection canceled") @@ -945,7 +959,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 +971,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 @@ -984,6 +998,7 @@ Sets the enabled status of a plugin. The plugin name is the same as its director Stops the scene that is currently playing. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editornode3dgizmo.rst b/classes/class_editornode3dgizmo.rst index e5977c727be..76166a02aaf 100644 --- a/classes/class_editornode3dgizmo.rst +++ b/classes/class_editornode3dgizmo.rst @@ -19,7 +19,7 @@ Gizmo for editing :ref:`Node3D` objects. Description ----------- -Gizmo that is used for providing custom visualization and editing (handles and subgizmos) for :ref:`Node3D` objects. Can be overridden to create custom gizmos, but for simple gizmos creating a :ref:`EditorNode3DGizmoPlugin` is usually recommended. +Gizmo that is used for providing custom visualization and editing (handles and subgizmos) for :ref:`Node3D` objects. Can be overridden to create custom gizmos, but for simple gizmos creating an :ref:`EditorNode3DGizmoPlugin` is usually recommended. .. rst-class:: classref-reftable-group @@ -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 @@ -407,6 +407,7 @@ Sets the gizmo's hidden state. If ``true``, the gizmo will be hidden. If ``false Sets the reference :ref:`Node3D` node for the gizmo. ``node`` must inherit from :ref:`Node3D`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editornode3dgizmoplugin.rst b/classes/class_editornode3dgizmoplugin.rst index 73b435bffbb..3d5d18b79d6 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 @@ -390,6 +390,7 @@ Creates an unshaded material with its variants (selected and/or editable) and ad Gets material from the internal list of materials. If an :ref:`EditorNode3DGizmo` is provided, it will try to get the corresponding variant (selected and/or editable). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorpaths.rst b/classes/class_editorpaths.rst index f027e563d49..bab42ff7463 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 `__. @@ -164,6 +164,7 @@ Self-contained mode can be enabled by creating a file named ``._sc_`` or ``_sc_` \ **Note:** The Steam release of Redot uses self-contained mode by default. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorplugin.rst b/classes/class_editorplugin.rst index 81a22005ba2..fe35008d420 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,15 +609,15 @@ 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); } - + public override EditorPlugin.AfterGuiInput _Forward3DGuiInput(Camera3D viewportCamera, InputEvent @event) { 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,15 +724,15 @@ 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); } - + public override bool _ForwardCanvasGuiInput(InputEvent @event) { 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,18 +888,18 @@ 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. :: func _get_state(): - var state = {"zoom": zoom, "preferred_color": my_color} + var state = { "zoom": zoom, "preferred_color": my_color } return state .. rst-class:: classref-item-separator @@ -916,19 +916,19 @@ 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. :: func _get_unsaved_status(for_scene): if not unsaved: return "" - + if for_scene.is_empty(): return "Save changes in MyCustomPlugin before closing?" else: return "Scene %s has changes from MyCustomPlugin. Save before closing?" % for_scene.get_file() - + func _save_external_data(): unsaved = false @@ -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,30 +984,30 @@ 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. :: var plugin_control - + func _enter_tree(): plugin_control = preload("my_plugin_control.tscn").instantiate() EditorInterface.get_editor_main_screen().add_child(plugin_control) plugin_control.hide() - + func _has_main_screen(): return true - + func _make_visible(visible): plugin_control.visible = visible - + func _get_plugin_name(): return "My Super Cool Plugin 3000" - + func _get_plugin_icon(): return EditorInterface.get_editor_theme().get_icon("Node", "EditorIcons") @@ -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. :: @@ -1099,7 +1099,7 @@ Adds a script at ``path`` to the Autoload list as ``name``. Adds a plugin to the context menu. ``slot`` is the context menu where the plugin will be added. -See :ref:`ContextMenuSlot` for available context menus. A plugin instance can belong only to a single context menu slot. +\ **Note:** A plugin instance can belong only to a single context menu slot. .. rst-class:: classref-item-separator @@ -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. @@ -1125,11 +1125,11 @@ Optionally, you can specify a shortcut parameter. When pressed, this shortcut wi |void| **add_control_to_container**\ (\ container\: :ref:`CustomControlContainer`, control\: :ref:`Control`\ ) :ref:`🔗` -Adds a custom control to a container (see :ref:`CustomControlContainer`). There are many locations where custom controls can be added in the editor UI. +Adds a custom control to a container in the editor UI. Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it). -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`. +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 @@ -1141,13 +1141,13 @@ When your plugin is deactivated, make sure to remove your custom control with :r |void| **add_control_to_dock**\ (\ slot\: :ref:`DockSlot`, control\: :ref:`Control`, shortcut\: :ref:`Shortcut` = null\ ) :ref:`🔗` -Adds the control to a specific dock slot (see :ref:`DockSlot` for options). +Adds the control to a specific dock slot. If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions. -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`. +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:: @@ -1248,10 +1248,10 @@ Registers a new :ref:`EditorInspectorPlugin`. Inspe const MyInspectorPlugin = preload("res://addons/your_addon/path/to/your/script.gd") var inspector_plugin = MyInspectorPlugin.new() - + func _enter_tree(): add_inspector_plugin(inspector_plugin) - + func _exit_tree(): remove_inspector_plugin(inspector_plugin) @@ -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 @@ -1309,7 +1309,7 @@ If ``first_priority`` is ``true``, the new import plugin is inserted first in th |void| **add_scene_post_import_plugin**\ (\ scene_import_plugin\: :ref:`EditorScenePostImportPlugin`, first_priority\: :ref:`bool` = false\ ) :ref:`🔗` -Add a :ref:`EditorScenePostImportPlugin`. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs. +Add an :ref:`EditorScenePostImportPlugin`. These plugins allow customizing the import process of 3D assets by adding new options to the import dialogs. If ``first_priority`` is ``true``, the new import plugin is inserted first in the list and takes precedence over pre-existing plugins. @@ -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,9 +1727,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorproperty.rst b/classes/class_editorproperty.rst index ace6bcf63c7..8321c1db89b 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 @@ -204,6 +210,18 @@ Emit it if you want to key a property with a single value. ---- +.. _class_EditorProperty_signal_property_overridden: + +.. rst-class:: classref-signal + +**property_overridden**\ (\ ) :ref:`🔗` + +Emitted when a setting override for the current project is requested. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorProperty_signal_property_pinned: .. rst-class:: classref-signal @@ -298,6 +316,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 background 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 label is drawn. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorProperty_property_draw_warning: .. rst-class:: classref-property @@ -488,7 +540,9 @@ If one or several properties have changed, this must be called. ``field`` is use :ref:`Object` **get_edited_object**\ (\ ) :ref:`🔗` -Gets the edited object. +Returns the edited object. + +\ **Note:** This method could return ``null`` if the editor has not yet been associated with a property. However, in :ref:`_update_property()` and :ref:`_set_read_only()`, this value is *guaranteed* to be non-``null``. .. rst-class:: classref-item-separator @@ -500,7 +554,9 @@ 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. +Returns the edited property. If your editor is for a single property (added via :ref:`EditorInspectorPlugin._parse_property()`), then this will return the property. + +\ **Note:** This method could return ``null`` if the editor has not yet been associated with a property. However, in :ref:`_update_property()` and :ref:`_set_read_only()`, this value is *guaranteed* to be non-``null``. .. rst-class:: classref-item-separator @@ -536,7 +592,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 @@ -572,9 +628,10 @@ Assigns object and property to edit. |void| **update_property**\ (\ ) :ref:`🔗` -Forces refresh of the property display. +Forces a refresh of the property display. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorresourceconversionplugin.rst b/classes/class_editorresourceconversionplugin.rst index 176250642ce..c036c297a5c 100644 --- a/classes/class_editorresourceconversionplugin.rst +++ b/classes/class_editorresourceconversionplugin.rst @@ -29,13 +29,13 @@ Below shows an example of a basic plugin that will convert an :ref:`ImageTexture .. code-tab:: gdscript extends EditorResourceConversionPlugin - + func _handles(resource: Resource): return resource is ImageTexture - + func _converts_to(): return "PortableCompressedTexture2D" - + func _convert(itex: Resource): var ptex = PortableCompressedTexture2D.new() ptex.create_from_image(itex.get_image(), PortableCompressedTexture2D.COMPRESSION_MODE_LOSSLESS) @@ -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 @@ -103,6 +103,7 @@ Returns the class name of the target type of :ref:`Resource` tha Called to determine whether a particular :ref:`Resource` can be converted to the target resource type by this plugin. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorresourcepicker.rst b/classes/class_editorresourcepicker.rst index 18f9ee301ec..2243eb36fbb 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 @@ -219,6 +219,7 @@ Returns a list of all allowed types and subtypes corresponding to the :ref:`base Sets the toggle mode state for the main button. Works only if :ref:`toggle_mode` is set to ``true``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorresourcepreview.rst b/classes/class_editorresourcepreview.rst index ca36a28aa36..30d5fd3f137 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 @@ -130,6 +130,7 @@ Queue a resource file located at ``path`` for preview. Once the preview is ready Removes a custom preview generator. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorresourcepreviewgenerator.rst b/classes/class_editorresourcepreviewgenerator.rst index 55323806086..d72b09ede7d 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``. @@ -123,6 +123,7 @@ By default, it returns ``false``. Returns ``true`` if your generator supports the resource of type ``type``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorresourcetooltipplugin.rst b/classes/class_editorresourcetooltipplugin.rst index f8899f5f2b5..138704b9438 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. :: @@ -97,6 +97,7 @@ The ``metadata`` dictionary is provided by preview generator (see :ref:`EditorRe Requests a thumbnail for the given :ref:`TextureRect`. The thumbnail is created asynchronously by :ref:`EditorResourcePreview` and automatically set when available. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorsceneformatimporter.rst b/classes/class_editorsceneformatimporter.rst index 155cc953e82..9b15889fe2a 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,67 +155,74 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorsceneformatimporterblend.rst b/classes/class_editorsceneformatimporterblend.rst index d5739071d1d..efe3e171063 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. @@ -30,6 +30,7 @@ Blend import requires Blender 3.0. Internally, the EditorSceneFormatImporterBlend uses the Blender glTF "Use Original" mode to reference external textures. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorsceneformatimporterfbx2gltf.rst b/classes/class_editorsceneformatimporterfbx2gltf.rst index 5c77fcb8d5c..909621cb970 100644 --- a/classes/class_editorsceneformatimporterfbx2gltf.rst +++ b/classes/class_editorsceneformatimporterfbx2gltf.rst @@ -26,6 +26,7 @@ The location of the FBX2glTF binary is set via the :ref:`EditorSettings.filesyst This importer is only used if :ref:`ProjectSettings.filesystem/import/fbx2gltf/enabled` is set to ``true``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorsceneformatimportergltf.rst b/classes/class_editorsceneformatimportergltf.rst index 196940f5192..b265db397ed 100644 --- a/classes/class_editorsceneformatimportergltf.rst +++ b/classes/class_editorsceneformatimportergltf.rst @@ -17,6 +17,7 @@ EditorSceneFormatImporterGLTF There is currently no description for this class. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorsceneformatimporterufbx.rst b/classes/class_editorsceneformatimporterufbx.rst index e31f5e6883d..247cf9cd377 100644 --- a/classes/class_editorsceneformatimporterufbx.rst +++ b/classes/class_editorsceneformatimporterufbx.rst @@ -24,6 +24,7 @@ Description EditorSceneFormatImporterUFBX is designed to load FBX files and supports both binary and ASCII FBX files from version 3000 onward. This class supports various 3D object types like meshes, skins, blend shapes, materials, and rigging information. The class aims for feature parity with the official FBX SDK and supports FBX 7.4 specifications. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorscenepostimport.rst b/classes/class_editorscenepostimport.rst index 9488231d60c..bc5e80d692c 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:: @@ -30,14 +30,14 @@ The :ref:`_post_import` @tool # Needed so it runs in editor. extends EditorScenePostImport - + # This sample changes all node names. # Called right after the scene is imported and gets the root node. func _post_import(scene): # Change all node names to "modified_[oldnodename]" iterate(scene) return scene # Remember to return the imported scene - + func iterate(node): if node != null: node.name = "modified_" + node.name @@ -47,7 +47,7 @@ The :ref:`_post_import` .. code-tab:: csharp using Godot; - + // This sample changes all node names. // Called right after the scene is imported and gets the root node. [Tool] @@ -59,7 +59,7 @@ The :ref:`_post_import` Iterate(scene); return scene; // Remember to return the imported scene } - + public void Iterate(Node node) { if (node != null) @@ -126,6 +126,7 @@ Called after the scene was imported. This method must return the modified versio Returns the source file path which got imported (e.g. ``res://scene.dae``). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorscenepostimportplugin.rst b/classes/class_editorscenepostimportplugin.rst index cd8b733f50b..d79ef20b404 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 @@ -251,7 +251,7 @@ Process a specific node or resource for a given category. |void| **_post_process**\ (\ scene\: :ref:`Node`\ ) |virtual| :ref:`🔗` -Post process the scene. This function is called after the final scene has been configured. +Post-process the scene. This function is called after the final scene has been configured. .. rst-class:: classref-item-separator @@ -263,7 +263,9 @@ Post process the scene. This function is called after the final scene has been c |void| **_pre_process**\ (\ scene\: :ref:`Node`\ ) |virtual| :ref:`🔗` -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 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 @@ -302,6 +304,7 @@ Add a specific import option. This function can only be called from :ref:`_get_i Query the value of an option. This function can only be called from those querying visibility, or processing. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorscript.rst b/classes/class_editorscript.rst index 5f8b9e7b068..c643b27a149 100644 --- a/classes/class_editorscript.rst +++ b/classes/class_editorscript.rst @@ -19,7 +19,9 @@ 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. + +If a script extending this class also has a global class name, it will be included in the editor's command palette. \ **Note:** Extending scripts need to have ``tool`` mode enabled. @@ -32,14 +34,14 @@ Scripts extending this class and implementing its :ref:`_run`\ (\ ) |virtual| | + | |void| | :ref:`_run`\ (\ ) |virtual| |required| | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------+ | |void| | :ref:`add_root_node`\ (\ node\: :ref:`Node`\ ) | +-----------------------------------------------+-----------------------------------------------------------------------------------------------------+ @@ -86,7 +88,7 @@ Method Descriptions .. rst-class:: classref-method -|void| **_run**\ (\ ) |virtual| :ref:`🔗` +|void| **_run**\ (\ ) |virtual| |required| :ref:`🔗` This method is executed by the Editor when **File > Run** is used. @@ -126,9 +128,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorscriptpicker.rst b/classes/class_editorscriptpicker.rst index 3b30ec39f42..a21ab9816a4 100644 --- a/classes/class_editorscriptpicker.rst +++ b/classes/class_editorscriptpicker.rst @@ -58,6 +58,7 @@ Property Descriptions The owner :ref:`Node` of the script property that holds the edited resource. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorselection.rst b/classes/class_editorselection.rst index 18187de1a20..45f685597ab 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 @@ -128,6 +146,7 @@ Returns the list of selected nodes, optimized for transform operations (i.e. mov Removes a node from the selection. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index e64289296f5..dd9dd15fe9b 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` | @@ -117,6 +123,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/2d/guides_color` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/2d/ruler_width` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`editors/2d/smart_snapping_line_color` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/2d/use_integer_zoom_by_default` | @@ -125,6 +133,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 +223,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 +253,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` | @@ -251,16 +269,24 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/3d_gizmos/gizmo_settings/bone_shape` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`editors/3d_gizmos/gizmo_settings/lightmap_gi_probe_size` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/3d_gizmos/gizmo_settings/path3d_tilt_disk_size` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/animation/autorename_animation_tracks` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :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 +299,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` | @@ -293,6 +317,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`editors/panning/warped_mouse_panning` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`editors/panning/zoom_style` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`editors/polygon_editor/auto_bake_delay` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`editors/polygon_editor/point_grab_radius` | @@ -413,6 +439,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`input/buffering/use_accumulated_input` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`interface/accessibility/accessibility_support` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/accept_dialog_cancel_ok_buttons` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/editor/automatically_open_screenshots` | @@ -427,6 +455,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/code_font_size` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/editor/collapse_main_menu` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`interface/editor/custom_display_scale` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/editor/display_scale` | @@ -479,6 +509,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` | @@ -497,6 +529,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/inspector/auto_unfold_foreign_scenes` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/inspector/color_picker_show_intensity` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/inspector/default_color_picker_mode` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/inspector/default_color_picker_shape` | @@ -577,11 +611,13 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/touchscreen/enable_pan_and_scale_gestures` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`interface/touchscreen/increase_scrollbar_touch_area` | + | :ref:`bool` | :ref:`interface/touchscreen/enable_touch_optimizations` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :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 +631,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 +655,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` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -635,6 +673,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/appearance/caret/type` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`text_editor/appearance/enable_inline_color_picker` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_hard_column` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`text_editor/appearance/guidelines/line_length_guideline_soft_column` | @@ -665,6 +705,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 +715,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,9 +889,9 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Color` | :ref:`text_editor/theme/highlighting/user_type_color` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`text_editor/theme/highlighting/word_highlighted_color` | + | :ref:`Color` | :ref:`text_editor/theme/highlighting/warning_color` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`text_editor/theme/line_spacing` | + | :ref:`Color` | :ref:`text_editor/theme/highlighting/word_highlighted_color` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`version_control/ssh_private_key_path` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -979,6 +1023,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 +1185,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 +1245,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 @@ -1299,6 +1381,18 @@ The guides color to use in the 2D editor. Guides can be created by dragging the ---- +.. _class_EditorSettings_property_editors/2d/ruler_width: + +.. rst-class:: classref-property + +:ref:`float` **editors/2d/ruler_width** :ref:`🔗` + +The thickness of the coordinate ruler in the 2D editor. Increasing this will also increase the size of the ruler font, improving readability when using a lower editor scale. The editor may force a minimum size to keep the ruler numbers legible. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/2d/smart_snapping_line_color: .. rst-class:: classref-property @@ -1347,6 +1441,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 +2013,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 +2193,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 @@ -2133,6 +2289,18 @@ The shape of :ref:`Skeleton3D` bone gizmos in the 3D editor. * ---- +.. _class_EditorSettings_property_editors/3d_gizmos/gizmo_settings/lightmap_gi_probe_size: + +.. rst-class:: classref-property + +:ref:`float` **editors/3d_gizmos/gizmo_settings/lightmap_gi_probe_size** :ref:`🔗` + +Size of probe gizmos displayed when editing :ref:`LightmapGI` and :ref:`LightmapProbe` nodes. Setting this to ``0.0`` will hide the probe spheres of :ref:`LightmapGI` and wireframes of :ref:`LightmapProbe` nodes, but will keep the wireframes linking probes from :ref:`LightmapGI` and billboard icons from :ref:`LightmapProbe` intact. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/3d_gizmos/gizmo_settings/path3d_tilt_disk_size: .. rst-class:: classref-property @@ -2171,6 +2339,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 +2377,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 +2481,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 @@ -2395,6 +2589,18 @@ If ``true``, warps the mouse around the 2D viewport while panning in the 2D edit ---- +.. _class_EditorSettings_property_editors/panning/zoom_style: + +.. rst-class:: classref-property + +:ref:`int` **editors/panning/zoom_style** :ref:`🔗` + +The mouse cursor movement direction to use when drag-zooming in any editor (except 3D scene editor) by moving the mouse. This does not affect zooming with the mouse wheel. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_editors/polygon_editor/auto_bake_delay: .. rst-class:: classref-property @@ -2969,10 +3175,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 ---- @@ -3063,7 +3296,11 @@ If set to ``Adaptive``, the dialog opens in list view or grid view depending on :ref:`bool` **filesystem/quick_open_dialog/enable_fuzzy_matching** :ref:`🔗` -If ``true``, fuzzy matching of search tokens is allowed. +If ``true``, together with exact matches of a filename, the dialog includes approximate matches. + +This is useful for finding the correct files even when there are typos in the search query; for example, searching "nprmal" will find "normal". Additionally, it allows you to write shorter search queries; for example, searching "nml" will also find "normal". + +See also :ref:`filesystem/quick_open_dialog/max_fuzzy_misses`. .. rst-class:: classref-item-separator @@ -3087,7 +3324,7 @@ If ``true``, results will include files located in the ``addons`` folder. :ref:`int` **filesystem/quick_open_dialog/max_fuzzy_misses** :ref:`🔗` -The number of allowed missed query characters in a match, if fuzzy matching is enabled. For example, with the default value of 2, ``foobar`` would match ``foobur`` and ``foob`` but not ``foo``. +The number of missed query characters allowed in a match when fuzzy matching is enabled. For example, with the default value of ``2``, ``"normal"`` would match ``"narmal"`` and ``"norma"`` but not ``"nor"``. .. rst-class:: classref-item-separator @@ -3163,6 +3400,26 @@ Input accumulation can be disabled to get slightly more precise/reactive input a ---- +.. _class_EditorSettings_property_interface/accessibility/accessibility_support: + +.. rst-class:: classref-property + +:ref:`int` **interface/accessibility/accessibility_support** :ref:`🔗` + +Editor accessibility support mode: + +- **Auto** (``0``): Accessibility support is enabled, but updates to the accessibility information are processed only if an assistive app (such as a screen reader or a Braille display) is active (default). + +- **Always Active** (``1``): Accessibility support is enabled, and updates to the accessibility information are always processed, regardless of the status of assistive apps. + +- **Disabled** (``2``): Accessibility support is fully disabled. + +\ **Note:** Accessibility debugging tools, such as Accessibility Insights for Windows, Accessibility Inspector (macOS), or AT-SPI Browser (Linux/BSD) do not count as assistive apps. To test your project with these tools, use **Always Active**. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/accept_dialog_cancel_ok_buttons: .. rst-class:: classref-property @@ -3171,7 +3428,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. @@ -3259,6 +3516,22 @@ The size of the font in the script editor. This setting does not impact the font ---- +.. _class_EditorSettings_property_interface/editor/collapse_main_menu: + +.. rst-class:: classref-property + +:ref:`bool` **interface/editor/collapse_main_menu** :ref:`🔗` + +If ``true``, the main menu collapses into a :ref:`MenuButton`. + +\ **Note:** This setting is only applicable on macOS when :ref:`interface/editor/use_embedded_menu` is ``true``. + +\ **Note:** Defaults to ``true`` on the Android editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/editor/custom_display_scale: .. rst-class:: classref-property @@ -3321,7 +3594,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 @@ -3453,7 +3726,7 @@ If ``true``, setting names in the editor are localized when possible. :ref:`int` **interface/editor/low_processor_mode_sleep_usec** :ref:`🔗` -The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops. However, higher values will result in a less responsive editor. The default value is set to allow for maximum smoothness on monitors up to 144 Hz. See also :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec`. +The amount of sleeping between frames in the editor (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops. However, higher values will result in a less responsive editor. The default value is set to allow for maximum smoothness on monitors up to 144 Hz. See also :ref:`interface/editor/unfocused_low_processor_mode_sleep_usec`. \ **Note:** This setting is ignored if :ref:`interface/editor/update_continuously` is ``true``, as enabling that setting disables low-processor mode. @@ -3469,6 +3742,8 @@ The amount of sleeping between frames when the low-processor usage mode is enabl The font to use for the editor interface. Must be a resource of a :ref:`Font` type such as a ``.ttf`` or ``.otf`` font file. +\ **Note:** If the provided font is variable, a weight of 400 (normal) will be used. + .. rst-class:: classref-item-separator ---- @@ -3481,6 +3756,8 @@ The font to use for the editor interface. Must be a resource of a :ref:`Font` type such as a ``.ttf`` or ``.otf`` font file. +\ **Note:** If the provided font is variable, a weight of 700 (bold) will be used. + .. rst-class:: classref-item-separator ---- @@ -3551,7 +3828,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 +3878,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 @@ -3625,7 +3916,7 @@ Editor UI default layout direction. :ref:`int` **interface/editor/unfocused_low_processor_mode_sleep_usec** :ref:`🔗` -When the editor window is unfocused, the amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops (in addition to improving the running project's performance if the editor has to redraw continuously). However, higher values will result in a less responsive editor. The default value is set to limit the editor to 20 FPS when the editor window is unfocused. See also :ref:`interface/editor/low_processor_mode_sleep_usec`. +When the editor window is unfocused, the amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops (in addition to improving the running project's performance if the editor has to redraw continuously). However, higher values will result in a less responsive editor. The default value is set to limit the editor to 10 FPS when the editor window is unfocused. See also :ref:`interface/editor/low_processor_mode_sleep_usec`. \ **Note:** This setting is ignored if :ref:`interface/editor/update_continuously` is ``true``, as enabling that setting disables low-processor mode. @@ -3725,6 +4016,18 @@ If ``true``, automatically expands property groups in the Inspector dock when op ---- +.. _class_EditorSettings_property_interface/inspector/color_picker_show_intensity: + +.. rst-class:: classref-property + +:ref:`bool` **interface/inspector/color_picker_show_intensity** :ref:`🔗` + +If ``true``, show the intensity slider in the :ref:`ColorPicker`\ s opened in the editor. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/inspector/default_color_picker_mode: .. rst-class:: classref-property @@ -3917,11 +4220,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 @@ -4247,13 +4550,13 @@ If ``true``, enable two finger pan and scale gestures on touchscreen devices. ---- -.. _class_EditorSettings_property_interface/touchscreen/increase_scrollbar_touch_area: +.. _class_EditorSettings_property_interface/touchscreen/enable_touch_optimizations: .. rst-class:: classref-property -:ref:`bool` **interface/touchscreen/increase_scrollbar_touch_area** :ref:`🔗` +:ref:`bool` **interface/touchscreen/enable_touch_optimizations** :ref:`🔗` -If ``true``, increases the scrollbar touch area to improve usability on touchscreen devices. +If ``true``, increases the scrollbar touch area and enables a larger dragger for split containers to improve usability on touchscreen devices \ **Note:** Defaults to ``true`` on touchscreen devices. @@ -4275,11 +4578,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 +4690,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 +4842,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. +:ref:`int` **run/window_placement/game_embed_mode** :ref:`🔗` -- **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. - -- **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 +4868,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 ---- @@ -4635,6 +4958,18 @@ The shape of the caret to use in the script editor. **Line** displays a vertical ---- +.. _class_EditorSettings_property_text_editor/appearance/enable_inline_color_picker: + +.. rst-class:: classref-property + +:ref:`bool` **text_editor/appearance/enable_inline_color_picker** :ref:`🔗` + +If ``true``, displays a colored button before any :ref:`Color` constructor in the script editor. Clicking on them allows the color to be modified through a color picker. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_text_editor/appearance/guidelines/line_length_guideline_hard_column: .. rst-class:: classref-property @@ -4815,6 +5150,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 @@ -4833,7 +5180,11 @@ If ``true``, tool scripts will be automatically soft-reloaded after they are sav :ref:`bool` **text_editor/behavior/files/auto_reload_scripts_on_external_change** :ref:`🔗` -If ``true``, automatically reloads scripts in the editor when they have been modified and saved by external editors. +If ``true``, automatically reloads scripts and text-based shaders in the editor when they have been modified and saved by external editors or tools and the editor regains focus. External changes can be discarded by using the Undo function after they've been loaded in the editor. + +If ``false``, a file conflict dialog will always be displayed when the editor regains focus. This dialog allows you to choose whether to keep local changes or discard them. + +\ **Note:** Even when this setting is ``true``, a file conflict dialog is still displayed in certain situations. For instance, it will display when the script editor has unsaved changes that the external editor did not account for. .. rst-class:: classref-item-separator @@ -4863,6 +5214,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,25 +6282,25 @@ The script editor's color for user-defined types (using ``class_name``). ---- -.. _class_EditorSettings_property_text_editor/theme/highlighting/word_highlighted_color: +.. _class_EditorSettings_property_text_editor/theme/highlighting/warning_color: .. rst-class:: classref-property -:ref:`Color` **text_editor/theme/highlighting/word_highlighted_color** :ref:`🔗` +:ref:`Color` **text_editor/theme/highlighting/warning_color** :ref:`🔗` -The script editor's color for words highlighted by selecting them. Only visible if :ref:`text_editor/appearance/caret/highlight_all_occurrences` is ``true``. +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/line_spacing: +.. _class_EditorSettings_property_text_editor/theme/highlighting/word_highlighted_color: .. rst-class:: classref-property -:ref:`int` **text_editor/theme/line_spacing** :ref:`🔗` +:ref:`Color` **text_editor/theme/highlighting/word_highlighted_color** :ref:`🔗` -The vertical line separation used in text editors, in pixels. +The script editor's color for words highlighted by selecting them. Only visible if :ref:`text_editor/appearance/caret/highlight_all_occurrences` is ``true``. .. rst-class:: classref-item-separator @@ -6003,29 +6368,29 @@ Adds a custom property info to a property. The dictionary must contain: var settings = EditorInterface.get_editor_settings() settings.set("category/property_name", 0) - + var property_info = { "name": "category/property_name", "type": TYPE_INT, "hint": PROPERTY_HINT_ENUM, "hint_string": "one,two,three" } - + settings.add_property_info(property_info) .. code-tab:: csharp var settings = GetEditorInterface().GetEditorSettings(); settings.Set("category/property_name", 0); - + var propertyInfo = new Godot.Collections.Dictionary { - {"name", "category/propertyName"}, - {"type", Variant.Type.Int}, - {"hint", PropertyHint.Enum}, - {"hint_string", "one,two,three"} + { "name", "category/propertyName" }, + { "type", Variant.Type.Int }, + { "hint", PropertyHint.Enum }, + { "hint_string", "one,two,three" }, }; - + settings.AddPropertyInfo(propertyInfo); @@ -6040,7 +6405,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 +6453,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 +6477,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 +6501,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 +6549,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,9 +6573,10 @@ 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.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorspinslider.rst b/classes/class_editorspinslider.rst index 90da8882eac..57ff53630d0 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 @@ -248,6 +267,7 @@ Single texture representing both the up and down buttons. Single texture representing both the up and down buttons, when the control is readonly or disabled. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorsyntaxhighlighter.rst b/classes/class_editorsyntaxhighlighter.rst index 4603771ce95..b90993f4d46 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 @@ -33,11 +33,13 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_supported_languages`\ (\ ) |virtual| |const| | - +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`EditorSyntaxHighlighter` | :ref:`_create`\ (\ ) |virtual| |const| | + +---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |const| | + +---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_supported_languages`\ (\ ) |virtual| |const| | + +---------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -48,6 +50,18 @@ Methods Method Descriptions ------------------- +.. _class_EditorSyntaxHighlighter_private_method__create: + +.. rst-class:: classref-method + +:ref:`EditorSyntaxHighlighter` **_create**\ (\ ) |virtual| |const| :ref:`🔗` + +Virtual method which creates a new instance of the syntax highlighter. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSyntaxHighlighter_private_method__get_name: .. rst-class:: classref-method @@ -69,6 +83,7 @@ Virtual method which can be overridden to return the syntax highlighter name. Virtual method which can be overridden to return the supported language names. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editortoaster.rst b/classes/class_editortoaster.rst index f6df8b0b398..4ea50586319 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 @@ -92,6 +92,7 @@ Method Descriptions Pushes a toast notification to the editor for display. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |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.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editortranslationparserplugin.rst b/classes/class_editortranslationparserplugin.rst index 0a6e48b6ff4..b084f177b9b 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. @@ -36,102 +34,107 @@ 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"] .. code-tab:: csharp using Godot; - + [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. - + func _get_recognized_extensions(): return ["gd"] .. 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