diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index c752b6aa257..f738fba2e5b 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -1183,7 +1183,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 to check the type dynamically. +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 and dictionaries). Use the operator instead of this method if you do not need to check the type dynamically. \ **Examples:**\ @@ -1196,7 +1196,7 @@ Unlike the right operand of the ``is`` operator, ``type`` can be a non-constant \ **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:`Object.is_class()`, :ref:`Object.get_script()`, :ref:`Array.is_same_typed()` (and other :ref:`Array` methods), :ref:`Dictionary.is_same_typed()` (and other :ref:`Dictionary` methods). .. rst-class:: classref-item-separator @@ -1402,6 +1402,8 @@ Output: :ref:`bool` **type_exists**\ (\ type\: :ref:`StringName`\ ) :ref:`🔗` +**Deprecated:** Use :ref:`ClassDB.class_exists()` instead. + Returns ``true`` if the given :ref:`Object`-derived class exists in :ref:`ClassDB`. Note that :ref:`Variant` data types are not registered in :ref:`ClassDB`. :: diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 04bd61362a0..4b6343f27f2 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -143,6 +143,20 @@ Emitted by nodes that inherit from this class and that have an internal tree whe ---- +.. _class_AnimationNode_signal_node_updated: + +.. rst-class:: classref-signal + +**node_updated**\ (\ object_id\: :ref:`int`\ ) :ref:`🔗` + +**Experimental:** This signal may be changed or removed in future versions. + +Emitted by :ref:`AnimationNodeAnimation` when its :ref:`AnimationNodeAnimation.animation` resource is changed, or by :ref:`AnimationNodeBlendTree` when its connections change. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNode_signal_tree_changed: .. rst-class:: classref-signal diff --git a/classes/class_control.rst b/classes/class_control.rst index a233470ec97..5ccc9e7f82a 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -203,6 +203,8 @@ Methods +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_accessibility_container_name`\ (\ node\: :ref:`Node`\ ) |virtual| |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_cursor_shape`\ (\ at_position\: :ref:`Vector2`\ ) |virtual| |const| | + +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Variant` | :ref:`_get_drag_data`\ (\ at_position\: :ref:`Vector2`\ ) |virtual| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`_get_minimum_size`\ (\ ) |virtual| |const| | @@ -255,7 +257,7 @@ Methods +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_combined_pivot_offset`\ (\ ) |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`CursorShape` | :ref:`get_cursor_shape`\ (\ position\: :ref:`Vector2` = Vector2(0, 0)\ ) |const| | + | :ref:`CursorShape` | :ref:`get_cursor_shape`\ (\ at_position\: :ref:`Vector2` = Vector2(0, 0)\ ) |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_end`\ (\ ) |const| | +--------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -2545,6 +2547,20 @@ Override this method to return a human-readable description of the position of t ---- +.. _class_Control_private_method__get_cursor_shape: + +.. rst-class:: classref-method + +:ref:`int` **_get_cursor_shape**\ (\ at_position\: :ref:`Vector2`\ ) |virtual| |const| :ref:`🔗` + +Virtual method to be implemented by the user. Returns the cursor shape for the position ``at_position`` in the control's local coordinates, which will typically be used while hovering over this control. See :ref:`get_cursor_shape()`. + +If not overridden, defaults to :ref:`mouse_default_cursor_shape`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Control_private_method__get_drag_data: .. rst-class:: classref-method @@ -2604,7 +2620,7 @@ 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 the 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. @@ -2673,7 +2689,7 @@ If the ``event`` inherits :ref:`InputEventMouse`, this me Virtual method to be implemented by the user. Returns whether the given ``point`` is inside this control. -If not overridden, default behavior is checking if the point is within control's Rect. +If not overridden, default behavior is checking if the point is within the control's Rect. \ **Note:** If you want to check if a point is inside the control, you can use ``Rect2(Vector2.ZERO, size).has_point(point)``. @@ -3069,9 +3085,11 @@ Returns the combined value of :ref:`pivot_offset` **get_cursor_shape**\ (\ position\: :ref:`Vector2` = Vector2(0, 0)\ ) |const| :ref:`🔗` +:ref:`CursorShape` **get_cursor_shape**\ (\ at_position\: :ref:`Vector2` = Vector2(0, 0)\ ) |const| :ref:`🔗` + +Returns the mouse cursor shape for this control when hovered over ``at_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. -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. +You can override :ref:`_get_cursor_shape()` to implement custom behavior for this method. .. rst-class:: classref-item-separator @@ -3388,9 +3406,9 @@ See :ref:`get_theme_color()` for details. :ref:`String` **get_tooltip**\ (\ at_position\: :ref:`Vector2` = Vector2(0, 0)\ ) |const| :ref:`🔗` -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`. +Returns the tooltip text for the position ``at_position`` in the 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()`. +You can override :ref:`_get_tooltip()` to implement custom behavior for this method. \ **Note:** If this method returns an empty :ref:`String` and :ref:`_make_custom_tooltip()` is not overridden, no tooltip is displayed. diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index c286dda549c..f884f5d31ce 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -923,7 +923,7 @@ Display server supports interaction with screen reader or Braille display. **Lin :ref:`Feature` **FEATURE_HDR_OUTPUT** = ``35`` -Display server supports HDR output. **macOS, iOS, visionOS, Windows** +Display server supports HDR output. **Linux (Wayland), macOS, iOS, visionOS, Windows** .. _class_DisplayServer_constant_FEATURE_PIP_MODE: diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index 537890a7226..5d06cdcede3 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. They can be used to modify scenes and resources during project export based on what :doc:`Feature Tags <../tutorials/export/feature_tags>` are set. 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. +Register a **EditorExportPlugin** by creating a new :ref:`EditorPlugin` and calling its :ref:`EditorPlugin.add_export_plugin()` method. .. rst-class:: classref-introduction-group @@ -213,6 +213,8 @@ Customize a scene. If changes are made to it, return the same or a new scene. Ot Implementing this method is required if :ref:`_begin_customize_scenes()` returns ``true``. +\ **Note:** To change a variable in your scene, use the ``@export`` annotation when declaring it. + .. rst-class:: classref-item-separator ---- @@ -395,6 +397,8 @@ Return a hash based on the configuration passed (for both scenes and resources). Implementing this method is required if :ref:`_begin_customize_resources()` returns ``true``. +\ **Note:** :ref:`_customize_resource()` and :ref:`_customize_scene()` will not be called when the **EditorExportPlugin** script is modified unless this hash changes too. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_editorsettings.rst b/classes/class_editorsettings.rst index d01dff40886..8ac5d78ae7f 100644 --- a/classes/class_editorsettings.rst +++ b/classes/class_editorsettings.rst @@ -83,6 +83,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`docks/filesystem/always_show_folders` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`docks/filesystem/ask_before_moving_files` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`docks/filesystem/automatically_open_created_scripts` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`docks/filesystem/other_file_extensions` | @@ -653,6 +655,8 @@ Properties +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`interface/touchscreen/enable_touch_optimizations` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`interface/touchscreen/haptic_on_long_press` | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`interface/touchscreen/scale_gizmo_handles` | +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`interface/touchscreen/touch_actions_panel` | @@ -1217,6 +1221,18 @@ If ``true``, displays folders in the FileSystem dock's bottom pane when split mo ---- +.. _class_EditorSettings_property_docks/filesystem/ask_before_moving_files: + +.. rst-class:: classref-property + +:ref:`bool` **docks/filesystem/ask_before_moving_files** :ref:`🔗` + +If ``true``, displays a confirmation dialog when moving or duplicating items in the FileSystem dock. This dialog can also be bypassed by holding :kbd:`Shift`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_docks/filesystem/automatically_open_created_scripts: .. rst-class:: classref-property @@ -4902,6 +4918,20 @@ If ``true``, increases the scrollbar touch area, enables a larger dragger for sp ---- +.. _class_EditorSettings_property_interface/touchscreen/haptic_on_long_press: + +.. rst-class:: classref-property + +:ref:`bool` **interface/touchscreen/haptic_on_long_press** :ref:`🔗` + +If ``true``, the device will vibrate when a long-press gesture triggers a right-click context menu in the editor. + +\ **Note:** Only has an effect on devices with haptic feedback hardware. Defaults to ``true`` on touchscreen devices. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorSettings_property_interface/touchscreen/scale_gizmo_handles: .. rst-class:: classref-property diff --git a/classes/class_editortranslationparserplugin.rst b/classes/class_editortranslationparserplugin.rst index b04a22a4502..b2e5816c145 100644 --- a/classes/class_editortranslationparserplugin.rst +++ b/classes/class_editortranslationparserplugin.rst @@ -134,6 +134,8 @@ To add a translatable string associated with a context, plural, comment, or sour +Alternatively, the plugin can directly modify the final list of strings, by implementing :ref:`_customize_strings()`. + To use **EditorTranslationParserPlugin**, register it using the :ref:`EditorPlugin.add_translation_parser_plugin()` method first. .. rst-class:: classref-reftable-group @@ -144,11 +146,13 @@ Methods .. table:: :widths: auto - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions`\ (\ ) |virtual| |const| | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Array`\[:ref:`PackedStringArray`\] | :ref:`_parse_file`\ (\ path\: :ref:`String`\ ) |virtual| | - +--------------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------+ + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`PackedStringArray`\] | :ref:`_customize_strings`\ (\ strings\: :ref:`Array`\[:ref:`PackedStringArray`\]\ ) |virtual| |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_recognized_extensions`\ (\ ) |virtual| |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Array`\[:ref:`PackedStringArray`\] | :ref:`_parse_file`\ (\ path\: :ref:`String`\ ) |virtual| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -159,6 +163,32 @@ Methods Method Descriptions ------------------- +.. _class_EditorTranslationParserPlugin_private_method__customize_strings: + +.. rst-class:: classref-method + +:ref:`Array`\[:ref:`PackedStringArray`\] **_customize_strings**\ (\ strings\: :ref:`Array`\[:ref:`PackedStringArray`\]\ ) |virtual| |const| :ref:`🔗` + +Called after parsing all files. You can modify the ``strings`` array to add or remove entries from the final list of strings, then return it after modifications. Each entry is a :ref:`PackedStringArray` like explained in the **EditorTranslationParserPlugin**'s description. + +:: + + @tool + extends EditorTranslationParserPlugin + + func _customize_strings(strings): + # Add new string. + strings.append(["Test 1", "context", "test 1 plurals", "test 1 comment"]) + + # Remove all strings that begin with $. + strings = strings.filter(func(s): return not s[0].begins_with("$")) + + return strings + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorTranslationParserPlugin_private_method__get_recognized_extensions: .. rst-class:: classref-method diff --git a/classes/class_font.rst b/classes/class_font.rst index edd87cbed78..eb2be2491be 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -56,7 +56,7 @@ Methods +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`draw_string_outline`\ (\ canvas_item\: :ref:`RID`, 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:`RID` | :ref:`find_variation`\ (\ variation_coordinates\: :ref:`Dictionary`, face_index\: :ref:`int` = 0, strength\: :ref:`float` = 0.0, transform\: :ref:`Transform2D` = Transform2D(1, 0, 0, 1, 0, 0), spacing_top\: :ref:`int` = 0, spacing_bottom\: :ref:`int` = 0, spacing_space\: :ref:`int` = 0, spacing_glyph\: :ref:`int` = 0, baseline_offset\: :ref:`float` = 0.0\ ) |const| | + | :ref:`RID` | :ref:`find_variation`\ (\ variation_coordinates\: :ref:`Dictionary`, face_index\: :ref:`int` = 0, strength\: :ref:`float` = 0.0, transform\: :ref:`Transform2D` = Transform2D(1, 0, 0, 1, 0, 0), spacing_top\: :ref:`int` = 0, spacing_bottom\: :ref:`int` = 0, spacing_space\: :ref:`int` = 0, spacing_glyph\: :ref:`int` = 0, baseline_offset\: :ref:`float` = 0.0, palette_index\: :ref:`int` = 0, custom_colors\: :ref:`PackedColorArray` = PackedColorArray()\ ) |const| | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`get_ascent`\ (\ font_size\: :ref:`int` = 16\ ) |const| | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -84,6 +84,12 @@ Methods +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`get_ot_name_strings`\ (\ ) |const| | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`get_palette_colors`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_palette_count`\ (\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_palette_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`RID`\] | :ref:`get_rids`\ (\ ) |const| | +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_spacing`\ (\ spacing\: :ref:`SpacingType`\ ) |const| | @@ -230,7 +236,7 @@ See also :ref:`CanvasItem.draw_string_outline()` **find_variation**\ (\ variation_coordinates\: :ref:`Dictionary`, face_index\: :ref:`int` = 0, strength\: :ref:`float` = 0.0, transform\: :ref:`Transform2D` = Transform2D(1, 0, 0, 1, 0, 0), spacing_top\: :ref:`int` = 0, spacing_bottom\: :ref:`int` = 0, spacing_space\: :ref:`int` = 0, spacing_glyph\: :ref:`int` = 0, baseline_offset\: :ref:`float` = 0.0\ ) |const| :ref:`🔗` +:ref:`RID` **find_variation**\ (\ variation_coordinates\: :ref:`Dictionary`, face_index\: :ref:`int` = 0, strength\: :ref:`float` = 0.0, transform\: :ref:`Transform2D` = Transform2D(1, 0, 0, 1, 0, 0), spacing_top\: :ref:`int` = 0, spacing_bottom\: :ref:`int` = 0, spacing_space\: :ref:`int` = 0, spacing_glyph\: :ref:`int` = 0, baseline_offset\: :ref:`float` = 0.0, palette_index\: :ref:`int` = 0, custom_colors\: :ref:`PackedColorArray` = PackedColorArray()\ ) |const| :ref:`🔗` Returns :ref:`TextServer` RID of the font cache for specific variation. @@ -404,6 +410,42 @@ Returns :ref:`Dictionary` with OpenType font name strings (loc ---- +.. _class_Font_method_get_palette_colors: + +.. rst-class:: classref-method + +:ref:`PackedColorArray` **get_palette_colors**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the array in the predefined color palette at ``index``. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. Colors can be overridden using :ref:`FontVariation`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Font_method_get_palette_count: + +.. rst-class:: classref-method + +:ref:`int` **get_palette_count**\ (\ ) |const| :ref:`🔗` + +Returns the number of predefined color palettes. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Font_method_get_palette_name: + +.. rst-class:: classref-method + +:ref:`String` **get_palette_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the name of the predefined color palette at ``index``. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. + +.. rst-class:: classref-item-separator + +---- + .. _class_Font_method_get_rids: .. rst-class:: classref-method diff --git a/classes/class_fontvariation.rst b/classes/class_fontvariation.rst index 5810ec002fe..3afe41d76bb 100644 --- a/classes/class_fontvariation.rst +++ b/classes/class_fontvariation.rst @@ -61,29 +61,33 @@ Properties .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Font` | :ref:`base_font` | | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`float` | :ref:`baseline_offset` | ``0.0`` | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Dictionary` | :ref:`opentype_features` | ``{}`` | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`spacing_bottom` | ``0`` | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`spacing_glyph` | ``0`` | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`spacing_space` | ``0`` | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`spacing_top` | ``0`` | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`float` | :ref:`variation_embolden` | ``0.0`` | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`int` | :ref:`variation_face_index` | ``0`` | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Dictionary` | :ref:`variation_opentype` | ``{}`` | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ - | :ref:`Transform2D` | :ref:`variation_transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | - +---------------------------------------+--------------------------------------------------------------------------------+-----------------------------------+ + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Font` | :ref:`base_font` | | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`baseline_offset` | ``0.0`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Dictionary` | :ref:`opentype_features` | ``{}`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`PackedColorArray` | :ref:`palette_custom_colors` | ``PackedColorArray()`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`palette_index` | ``0`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`spacing_bottom` | ``0`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`spacing_glyph` | ``0`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`spacing_space` | ``0`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`spacing_top` | ``0`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`float` | :ref:`variation_embolden` | ``0.0`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`variation_face_index` | ``0`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Dictionary` | :ref:`variation_opentype` | ``{}`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`Transform2D` | :ref:`variation_transform` | ``Transform2D(1, 0, 0, 1, 0, 0)`` | + +-------------------------------------------------+----------------------------------------------------------------------------------+-----------------------------------+ .. rst-class:: classref-reftable-group @@ -157,6 +161,42 @@ A set of OpenType feature tags. More info: `OpenType feature tags ` **palette_custom_colors** = ``PackedColorArray()`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_palette_custom_colors**\ (\ value\: :ref:`PackedColorArray`\ ) +- :ref:`PackedColorArray` **get_palette_custom_colors**\ (\ ) + +An array of colors to override predefined palette. Use ``Color(0, 0, 0, 0)``, to keep predefined palette color at specific position. + +**Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. + +.. rst-class:: classref-item-separator + +---- + +.. _class_FontVariation_property_palette_index: + +.. rst-class:: classref-property + +:ref:`int` **palette_index** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_palette_index**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_palette_index**\ (\ ) + +A palette index. + +.. rst-class:: classref-item-separator + +---- + .. _class_FontVariation_property_spacing_bottom: .. rst-class:: classref-property diff --git a/classes/class_moviewriter.rst b/classes/class_moviewriter.rst index 029f4f3b252..e9739e62967 100644 --- a/classes/class_moviewriter.rst +++ b/classes/class_moviewriter.rst @@ -47,21 +47,23 @@ Methods .. table:: :widths: auto - +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_audio_mix_rate`\ (\ ) |virtual| |required| |const| | - +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`SpeakerMode` | :ref:`_get_audio_speaker_mode`\ (\ ) |virtual| |required| |const| | - +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_handles_file`\ (\ path\: :ref:`String`\ ) |virtual| |required| |const| | - +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_write_begin`\ (\ movie_size\: :ref:`Vector2i`, fps\: :ref:`int`, base_path\: :ref:`String`\ ) |virtual| |required| | - +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_write_end`\ (\ ) |virtual| |required| | - +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_write_frame`\ (\ frame_image\: :ref:`Image`, audio_frame_block\: ``const void*``\ ) |virtual| |required| | - +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`add_writer`\ (\ writer\: :ref:`MovieWriter`\ ) |static| | - +--------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_audio_mix_rate`\ (\ ) |virtual| |required| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`SpeakerMode` | :ref:`_get_audio_speaker_mode`\ (\ ) |virtual| |required| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_supported_extensions`\ (\ ) |virtual| |required| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_handles_file`\ (\ path\: :ref:`String`\ ) |virtual| |required| |const| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_write_begin`\ (\ movie_size\: :ref:`Vector2i`, fps\: :ref:`int`, base_path\: :ref:`String`\ ) |virtual| |required| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_write_end`\ (\ ) |virtual| |required| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`_write_frame`\ (\ frame_image\: :ref:`Image`, audio_frame_block\: ``const void*``\ ) |virtual| |required| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`add_writer`\ (\ writer\: :ref:`MovieWriter`\ ) |static| | + +---------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -96,6 +98,18 @@ Called when the audio speaker mode used for recording the audio is requested by ---- +.. _class_MovieWriter_private_method__get_supported_extensions: + +.. rst-class:: classref-method + +:ref:`PackedStringArray` **_get_supported_extensions**\ (\ ) |virtual| |required| |const| :ref:`🔗` + +Returns the list of supported filename extensions for movies written with this **MovieWriter**. + +.. rst-class:: classref-item-separator + +---- + .. _class_MovieWriter_private_method__handles_file: .. rst-class:: classref-method diff --git a/classes/class_particleprocessmaterial.rst b/classes/class_particleprocessmaterial.rst index f9ff5b945c3..0e5a014df58 100644 --- a/classes/class_particleprocessmaterial.rst +++ b/classes/class_particleprocessmaterial.rst @@ -166,6 +166,14 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`radial_velocity_min` | ``0.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`rotation_3d_max` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`rotation_3d_min` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`scale_3d_max` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`scale_3d_min` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D` | :ref:`scale_curve` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`scale_max` | ``1.0`` | @@ -218,6 +226,10 @@ Properties +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`float` | :ref:`turbulence_noise_strength` | ``1.0`` | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`use_rotation_3d` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`use_scale_3d` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Texture2D` | :ref:`velocity_limit_curve` | | +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ | :ref:`Vector3` | :ref:`velocity_pivot` | ``Vector3(0, 0, 0)`` | @@ -1878,6 +1890,78 @@ Minimum radial velocity applied to each particle. Makes particles move away from ---- +.. _class_ParticleProcessMaterial_property_rotation_3d_max: + +.. rst-class:: classref-property + +:ref:`Vector3` **rotation_3d_max** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_rotation_3d_max**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_rotation_3d_max**\ (\ ) + +The maximum 3D orientation, in degrees. Works only in 3D and if :ref:`use_rotation_3d` is enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_rotation_3d_min: + +.. rst-class:: classref-property + +:ref:`Vector3` **rotation_3d_min** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_rotation_3d_min**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_rotation_3d_min**\ (\ ) + +The minimum 3D orientation, in degrees. Works only in 3D and if :ref:`use_rotation_3d` is enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_scale_3d_max: + +.. rst-class:: classref-property + +:ref:`Vector3` **scale_3d_max** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_scale_3d_max**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_scale_3d_max**\ (\ ) + +The maximum value of the random scale vector for each particle. + +Works only if :ref:`use_scale_3d` is enabled. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_scale_3d_min: + +.. rst-class:: classref-property + +:ref:`Vector3` **scale_3d_min** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_scale_3d_min**\ (\ value\: :ref:`Vector3`\ ) +- :ref:`Vector3` **get_scale_3d_min**\ (\ ) + +The minimum value of the random scale vector for each particle. + +Works only if :ref:`use_scale_3d` is enabled. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_scale_curve: .. rst-class:: classref-property @@ -2348,6 +2432,40 @@ The turbulence noise strength. Increasing this will result in a stronger, more c ---- +.. _class_ParticleProcessMaterial_property_use_rotation_3d: + +.. rst-class:: classref-property + +:ref:`bool` **use_rotation_3d** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_use_rotation_3d**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_rotation_3d**\ (\ ) + +Enable the usage of :ref:`rotation_3d_min` and :ref:`rotation_3d_max`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ParticleProcessMaterial_property_use_scale_3d: + +.. rst-class:: classref-property + +:ref:`bool` **use_scale_3d** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_use_scale_3d**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_using_scale_3d**\ (\ ) + +Enable the usage of :ref:`scale_3d_min` and :ref:`scale_3d_max`. + +.. rst-class:: classref-item-separator + +---- + .. _class_ParticleProcessMaterial_property_velocity_limit_curve: .. rst-class:: classref-property diff --git a/classes/class_popupmenu.rst b/classes/class_popupmenu.rst index 9da8c8c940c..0ee7da92bba 100644 --- a/classes/class_popupmenu.rst +++ b/classes/class_popupmenu.rst @@ -268,6 +268,8 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ + | :ref:`int` | :ref:`search_bar_separation` | ``4`` | + +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`separator_outline_size` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------------+-----------------------------------+ | :ref:`int` | :ref:`v_separation` | ``4`` | @@ -1746,6 +1748,18 @@ The size of the item text outline. ---- +.. _class_PopupMenu_theme_constant_search_bar_separation: + +.. rst-class:: classref-themeproperty + +:ref:`int` **search_bar_separation** = ``4`` :ref:`🔗` + +The vertical space between search bar and menu items. + +.. rst-class:: classref-item-separator + +---- + .. _class_PopupMenu_theme_constant_separator_outline_size: .. rst-class:: classref-themeproperty diff --git a/classes/class_script.rst b/classes/class_script.rst index d094b29ef46..9f9be2a8b26 100644 --- a/classes/class_script.rst +++ b/classes/class_script.rst @@ -75,6 +75,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`get_script_signal_list`\ (\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_script_method`\ (\ method_name\: :ref:`StringName`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_script_signal`\ (\ signal_name\: :ref:`StringName`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`has_source_code`\ (\ ) |const| | @@ -266,6 +268,18 @@ Returns the list of signals defined in this **Script**. ---- +.. _class_Script_method_has_script_method: + +.. rst-class:: classref-method + +:ref:`bool` **has_script_method**\ (\ method_name\: :ref:`StringName`\ ) |const| :ref:`🔗` + +Returns ``true`` if the script, or a base class, defines a method with the given name. + +.. rst-class:: classref-item-separator + +---- + .. _class_Script_method_has_script_signal: .. rst-class:: classref-method diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 558fef56352..463ed79b38e 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -141,6 +141,14 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_oversampling`\ (\ font_rid\: :ref:`RID`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`font_get_palette_colors`\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_palette_count`\ (\ font_rid\: :ref:`RID`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`font_get_palette_custom_colors`\ (\ font_rid\: :ref:`RID`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`font_get_palette_name`\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_scale`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`font_get_script_support_override`\ (\ font_rid\: :ref:`RID`, script\: :ref:`String`\ ) | @@ -177,6 +185,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`font_get_underline_thickness`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`font_get_used_palette`\ (\ font_rid\: :ref:`RID`\ ) |const| | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`font_get_variation_coordinates`\ (\ font_rid\: :ref:`RID`\ ) |const| | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`font_get_weight`\ (\ font_rid\: :ref:`RID`\ ) |const| | @@ -257,7 +267,7 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_language_support_override`\ (\ font_rid\: :ref:`RID`, language\: :ref:`String`, supported\: :ref:`bool`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`font_set_modulate_color_glyphs`\ (\ font_rid\: :ref:`RID`, force_autohinter\: :ref:`bool`\ ) | + | |void| | :ref:`font_set_modulate_color_glyphs`\ (\ font_rid\: :ref:`RID`, modulate\: :ref:`bool`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_msdf_pixel_range`\ (\ font_rid\: :ref:`RID`, msdf_pixel_range\: :ref:`int`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -271,6 +281,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_oversampling`\ (\ font_rid\: :ref:`RID`, oversampling\: :ref:`float`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_palette_custom_colors`\ (\ font_rid\: :ref:`RID`, colors\: :ref:`PackedColorArray`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_scale`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, scale\: :ref:`float`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_script_support_override`\ (\ font_rid\: :ref:`RID`, script\: :ref:`String`, supported\: :ref:`bool`\ ) | @@ -295,6 +307,8 @@ Methods +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_underline_thickness`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, underline_thickness\: :ref:`float`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`font_set_used_palette`\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) | + +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_variation_coordinates`\ (\ font_rid\: :ref:`RID`, variation_coordinates\: :ref:`Dictionary`\ ) | +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`font_set_weight`\ (\ font_rid\: :ref:`RID`, weight\: :ref:`int`\ ) | @@ -2262,6 +2276,54 @@ Returns oversampling factor override. If set to a positive value, overrides the ---- +.. _class_TextServer_method_font_get_palette_colors: + +.. rst-class:: classref-method + +:ref:`PackedColorArray` **font_get_palette_colors**\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the array in the predefined color palette at ``index``. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. Colors can be overridden using :ref:`font_set_palette_custom_colors()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_font_get_palette_count: + +.. rst-class:: classref-method + +:ref:`int` **font_get_palette_count**\ (\ font_rid\: :ref:`RID`\ ) |const| :ref:`🔗` + +Returns the number of predefined color palettes. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_font_get_palette_custom_colors: + +.. rst-class:: classref-method + +:ref:`PackedColorArray` **font_get_palette_custom_colors**\ (\ font_rid\: :ref:`RID`\ ) |const| :ref:`🔗` + +Returns array of custom colors to override predefined palette. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServer_method_font_get_palette_name: + +.. rst-class:: classref-method + +:ref:`String` **font_get_palette_name**\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the name of the predefined color palette at ``index``. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_get_scale: .. rst-class:: classref-method @@ -2478,6 +2540,18 @@ Returns thickness of the underline in pixels. ---- +.. _class_TextServer_method_font_get_used_palette: + +.. rst-class:: classref-method + +:ref:`int` **font_get_used_palette**\ (\ font_rid\: :ref:`RID`\ ) |const| :ref:`🔗` + +Returns used palette index. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_get_variation_coordinates: .. rst-class:: classref-method @@ -2970,7 +3044,7 @@ Adds override for :ref:`font_is_language_supported()`, force_autohinter\: :ref:`bool`\ ) :ref:`🔗` +|void| **font_set_modulate_color_glyphs**\ (\ font_rid\: :ref:`RID`, modulate\: :ref:`bool`\ ) :ref:`🔗` If set to ``true``, color modulation is applied when drawing colored glyphs, otherwise it's applied to the monochrome glyphs only. @@ -3052,6 +3126,18 @@ If set to a positive value, overrides the oversampling factor of the viewport th ---- +.. _class_TextServer_method_font_set_palette_custom_colors: + +.. rst-class:: classref-method + +|void| **font_set_palette_custom_colors**\ (\ font_rid\: :ref:`RID`, colors\: :ref:`PackedColorArray`\ ) :ref:`🔗` + +Sets array of custom colors to override predefined palette. Set to empty array to reset overrides. Use ``Color(0, 0, 0, 0)``, to keep predefined palette color at specific position. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_set_scale: .. rst-class:: classref-method @@ -3202,6 +3288,18 @@ Sets thickness of the underline in pixels. ---- +.. _class_TextServer_method_font_set_used_palette: + +.. rst-class:: classref-method + +|void| **font_set_used_palette**\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) :ref:`🔗` + +Sets used palette index. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_font_set_variation_coordinates: .. rst-class:: classref-method diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index 9758bfcb1f7..f273ede8e53 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -126,6 +126,14 @@ Methods +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_oversampling`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`_font_get_palette_colors`\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_palette_count`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedColorArray` | :ref:`_font_get_palette_custom_colors`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`_font_get_palette_name`\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_scale`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |virtual| |required| |const| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_font_get_script_support_override`\ (\ font_rid\: :ref:`RID`, script\: :ref:`String`\ ) |virtual| | @@ -162,6 +170,8 @@ Methods +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_font_get_underline_thickness`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`\ ) |virtual| |required| |const| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_font_get_used_palette`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`_font_get_variation_coordinates`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`_font_get_weight`\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| | @@ -258,6 +268,8 @@ Methods +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_oversampling`\ (\ font_rid\: :ref:`RID`, oversampling\: :ref:`float`\ ) |virtual| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_palette_custom_colors`\ (\ font_rid\: :ref:`RID`, colors\: :ref:`PackedColorArray`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_scale`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, scale\: :ref:`float`\ ) |virtual| |required| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_script_support_override`\ (\ font_rid\: :ref:`RID`, script\: :ref:`String`, supported\: :ref:`bool`\ ) |virtual| | @@ -282,6 +294,8 @@ Methods +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_underline_thickness`\ (\ font_rid\: :ref:`RID`, size\: :ref:`int`, underline_thickness\: :ref:`float`\ ) |virtual| |required| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_font_set_used_palette`\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) |virtual| | + +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_variation_coordinates`\ (\ font_rid\: :ref:`RID`, variation_coordinates\: :ref:`Dictionary`\ ) |virtual| | +------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_font_set_weight`\ (\ font_rid\: :ref:`RID`, weight\: :ref:`int`\ ) |virtual| | @@ -1092,6 +1106,54 @@ Returns oversampling factor override. If set to a positive value, overrides the ---- +.. _class_TextServerExtension_private_method__font_get_palette_colors: + +.. rst-class:: classref-method + +:ref:`PackedColorArray` **_font_get_palette_colors**\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` + +Returns the array in the predefined color palette at ``index``. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. Colors can be overridden using :ref:`_font_set_palette_custom_colors()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_get_palette_count: + +.. rst-class:: classref-method + +:ref:`int` **_font_get_palette_count**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| :ref:`🔗` + +Returns the number of predefined color palettes. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_get_palette_custom_colors: + +.. rst-class:: classref-method + +:ref:`PackedColorArray` **_font_get_palette_custom_colors**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| :ref:`🔗` + +Returns array of custom colors to override predefined palette. + +.. rst-class:: classref-item-separator + +---- + +.. _class_TextServerExtension_private_method__font_get_palette_name: + +.. rst-class:: classref-method + +:ref:`String` **_font_get_palette_name**\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` + +Returns the name of the predefined color palette at ``index``. Palette contains all colors used to render font glyphs. Each palette has the same number of colors. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__font_get_scale: .. rst-class:: classref-method @@ -1308,6 +1370,18 @@ Returns thickness of the underline in pixels. ---- +.. _class_TextServerExtension_private_method__font_get_used_palette: + +.. rst-class:: classref-method + +:ref:`int` **_font_get_used_palette**\ (\ font_rid\: :ref:`RID`\ ) |virtual| |const| :ref:`🔗` + +Returns used palette index. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__font_get_variation_coordinates: .. rst-class:: classref-method @@ -1884,6 +1958,18 @@ If set to a positive value, overrides the oversampling factor of the viewport th ---- +.. _class_TextServerExtension_private_method__font_set_palette_custom_colors: + +.. rst-class:: classref-method + +|void| **_font_set_palette_custom_colors**\ (\ font_rid\: :ref:`RID`, colors\: :ref:`PackedColorArray`\ ) |virtual| :ref:`🔗` + +Sets array of custom colors to override predefined palette. Set to empty array to reset overrides. Use ``Color(0, 0, 0, 0)``, to keep predefined palette color at specific position. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__font_set_scale: .. rst-class:: classref-method @@ -2028,6 +2114,18 @@ Sets thickness of the underline in pixels. ---- +.. _class_TextServerExtension_private_method__font_set_used_palette: + +.. rst-class:: classref-method + +|void| **_font_set_used_palette**\ (\ font_rid\: :ref:`RID`, index\: :ref:`int`\ ) |virtual| :ref:`🔗` + +Sets used palette index. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServerExtension_private_method__font_set_variation_coordinates: .. rst-class:: classref-method