From 167c58e46fc7b3f92feebc4d6a533fdc062fa795 Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 20 May 2023 03:19:15 +0000 Subject: [PATCH] classref: Sync with current master branch (809a982) --- classes/class_@globalscope.rst | 8 +- classes/class_animationnodeoneshot.rst | 68 +++- classes/class_animationplayer.rst | 4 +- classes/class_canvasitem.rst | 244 +++++++------- classes/class_displayserver.rst | 36 ++ classes/class_editorinterface.rst | 214 +++++++----- classes/class_font.rst | 146 ++++---- classes/class_gdextension.rst | 24 +- classes/class_gdscript.rst | 4 +- classes/class_inputevent.rst | 28 ++ classes/class_inputeventmidi.rst | 8 +- classes/class_inputeventmousebutton.rst | 19 ++ classes/class_inputeventscreentouch.rst | 19 ++ classes/class_label.rst | 19 ++ classes/class_label3d.rst | 19 ++ classes/class_mutex.rst | 12 + classes/class_node.rst | 14 + classes/class_os.rst | 19 ++ classes/class_parallaxlayer.rst | 6 +- classes/class_particleprocessmaterial.rst | 324 +++++++++--------- classes/class_placeholdercubemap.rst | 2 + classes/class_placeholdercubemaparray.rst | 2 + classes/class_placeholdertexture2d.rst | 2 + classes/class_placeholdertexture2darray.rst | 2 + classes/class_placeholdertexture3d.rst | 2 + classes/class_placeholdertexturelayered.rst | 2 + classes/class_projectsettings.rst | 34 ++ classes/class_richtextlabel.rst | 256 +++++++------- classes/class_semaphore.rst | 8 + classes/class_string.rst | 2 +- classes/class_stringname.rst | 10 +- classes/class_textedit.rst | 4 +- classes/class_textmesh.rst | 19 ++ classes/class_textparagraph.rst | 6 +- classes/class_textserver.rst | 42 ++- classes/class_textserverextension.rst | 4 +- classes/class_thread.rst | 10 + classes/class_window.rst | 350 +++++++++++++------- classes/class_workerthreadpool.rst | 38 ++- 39 files changed, 1289 insertions(+), 741 deletions(-) diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index 76dce099a6e..26b8db1cf37 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -2823,7 +2823,7 @@ Enum value which doesn't correspond to any MIDI message. This is used to initial :ref:`MIDIMessage` **MIDI_MESSAGE_NOTE_OFF** = ``8`` -MIDI note OFF message. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. +MIDI note OFF message. Not all MIDI devices send this event; some send :ref:`MIDI_MESSAGE_NOTE_ON` with zero velocity instead. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. .. _class_@GlobalScope_constant_MIDI_MESSAGE_NOTE_ON: @@ -2831,7 +2831,7 @@ MIDI note OFF message. See the documentation of :ref:`InputEventMIDI` **MIDI_MESSAGE_NOTE_ON** = ``9`` -MIDI note ON message. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. +MIDI note ON message. Some MIDI devices send this event with velocity zero instead of :ref:`MIDI_MESSAGE_NOTE_OFF`, but implementations vary. See the documentation of :ref:`InputEventMIDI` for information of how to use MIDI inputs. .. _class_@GlobalScope_constant_MIDI_MESSAGE_AFTERTOUCH: @@ -3982,7 +3982,7 @@ An export preset property with this flag contains confidential information and i :ref:`PropertyUsageFlags` **PROPERTY_USAGE_DEFAULT** = ``6`` -Default usage (storage, editor and network). +Default usage (storage and editor). .. _class_@GlobalScope_constant_PROPERTY_USAGE_NO_EDITOR: @@ -3990,7 +3990,7 @@ Default usage (storage, editor and network). :ref:`PropertyUsageFlags` **PROPERTY_USAGE_NO_EDITOR** = ``2`` -Default usage but without showing the property in the editor (storage, network). +Default usage but without showing the property in the editor (storage). .. rst-class:: classref-item-separator diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index 7b102b2521d..0dd9e199cc1 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -38,10 +38,20 @@ After setting the request and changing the animation playback, the one-shot node # 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")) + 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). + animation_tree["parameters/OneShot/internal_active"] .. code-tab:: csharp @@ -51,8 +61,14 @@ After setting the request and changing the animation playback, the one-shot node // Abort child animation connected to "shot" port. animationTree.Set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT); + // Abort child animation with fading out connected to "shot" port. + animationTree.Set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT); + // Get current state (read-only). animationTree.Get("parameters/OneShot/active"); + + // Get current internal state (read-only). + animationTree.Get("parameters/OneShot/internal_active"); @@ -80,8 +96,12 @@ Properties +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`autorestart_random_delay` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`Curve` | :ref:`fadein_curve` | | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`fadein_time` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ + | :ref:`Curve` | :ref:`fadeout_curve` | | + +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`fadeout_time` | ``0.0`` | +---------------------------------------------------+-----------------------------------------------------------------------------------------------+-----------+ | :ref:`MixMode` | :ref:`mix_mode` | ``0`` | @@ -126,6 +146,14 @@ The request to play the animation connected to "shot" port. The request to stop the animation connected to "shot" port. +.. _class_AnimationNodeOneShot_constant_ONE_SHOT_REQUEST_FADE_OUT: + +.. rst-class:: classref-enumeration-constant + +:ref:`OneShotRequest` **ONE_SHOT_REQUEST_FADE_OUT** = ``3`` + +The request to fade out the animation connected to "shot" port. + .. rst-class:: classref-item-separator ---- @@ -214,6 +242,23 @@ If :ref:`autorestart` is ``true ---- +.. _class_AnimationNodeOneShot_property_fadein_curve: + +.. rst-class:: classref-property + +:ref:`Curve` **fadein_curve** + +.. rst-class:: classref-property-setget + +- void **set_fadein_curve** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_fadein_curve** **(** **)** + +Determines how cross-fading between animations is eased. If empty, the transition will be linear. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeOneShot_property_fadein_time: .. rst-class:: classref-property @@ -225,7 +270,24 @@ If :ref:`autorestart` is ``true - void **set_fadein_time** **(** :ref:`float` value **)** - :ref:`float` **get_fadein_time** **(** **)** -The fade-in duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a crossfade that starts at 0 second and ends at 1 second during the animation. +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. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeOneShot_property_fadeout_curve: + +.. rst-class:: classref-property + +:ref:`Curve` **fadeout_curve** + +.. rst-class:: classref-property-setget + +- void **set_fadeout_curve** **(** :ref:`Curve` value **)** +- :ref:`Curve` **get_fadeout_curve** **(** **)** + +Determines how cross-fading between animations is eased. If empty, the transition will be linear. .. rst-class:: classref-item-separator @@ -242,7 +304,7 @@ The fade-in duration. For example, setting this to ``1.0`` for a 5 second length - void **set_fadeout_time** **(** :ref:`float` value **)** - :ref:`float` **get_fadeout_time** **(** **)** -The fade-out duration. For example, setting this to ``1.0`` for a 5 second length animation will produce a crossfade that starts at 4 second and ends at 5 second during the animation. +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. .. rst-class:: classref-item-separator diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 28c190beec3..6052e4bb834 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -798,7 +798,9 @@ See also :ref:`stop`. void **play** **(** :ref:`StringName` name="", :ref:`float` custom_blend=-1, :ref:`float` custom_speed=1.0, :ref:`bool` from_end=false **)** -Plays the animation with key ``name``. Custom blend times and speed can be set. 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``. 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 **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. diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 48e37ee3336..fe7816188e3 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -92,121 +92,121 @@ Methods .. table:: :widths: auto - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`_draw` **(** **)** |virtual| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_animation_slice` **(** :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_arc` **(** :ref:`Vector2` center, :ref:`float` radius, :ref:`float` start_angle, :ref:`float` end_angle, :ref:`int` point_count, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_char` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_char_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_circle` **(** :ref:`Vector2` position, :ref:`float` radius, :ref:`Color` color **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_colored_polygon` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_dashed_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`float` dash=2.0, :ref:`bool` aligned=true **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_end_animation` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_lcd_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_mesh` **(** :ref:`Mesh` mesh, :ref:`Texture2D` texture, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_msdf_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`float` outline=0.0, :ref:`float` pixel_range=4.0, :ref:`float` scale=1.0 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_colors` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multimesh` **(** :ref:`MultiMesh` multimesh, :ref:`Texture2D` texture **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_polygon` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_polyline` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_polyline_colors` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_primitive` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`Texture2D` texture=null **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_rect` **(** :ref:`Rect2` rect, :ref:`Color` color, :ref:`bool` filled=true, :ref:`float` width=-1.0 **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_set_transform` **(** :ref:`Vector2` position, :ref:`float` rotation=0.0, :ref:`Vector2` scale=Vector2(1, 1) **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_set_transform_matrix` **(** :ref:`Transform2D` xform **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_style_box` **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_texture` **(** :ref:`Texture2D` texture, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_texture_rect` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`force_update_transform` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_canvas` **(** **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`get_canvas_item` **(** **)** |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:`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` **(** :ref:`int` layer **)** |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` **(** :ref:`Vector2` screen_point **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`InputEvent` | :ref:`make_input_local` **(** :ref:`InputEvent` event **)** |const| | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_to_front` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`queue_redraw` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_visibility_layer_bit` **(** :ref:`int` layer, :ref:`bool` enabled **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`show` **(** **)** | - +---------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`_draw` **(** **)** |virtual| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_animation_slice` **(** :ref:`float` animation_length, :ref:`float` slice_begin, :ref:`float` slice_end, :ref:`float` offset=0.0 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_arc` **(** :ref:`Vector2` center, :ref:`float` radius, :ref:`float` start_angle, :ref:`float` end_angle, :ref:`int` point_count, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_char` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_char_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` char, :ref:`int` font_size=16, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_circle` **(** :ref:`Vector2` position, :ref:`float` radius, :ref:`Color` color **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_colored_polygon` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_dashed_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`float` dash=2.0, :ref:`bool` aligned=true **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_end_animation` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_lcd_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_line` **(** :ref:`Vector2` from, :ref:`Vector2` to, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_mesh` **(** :ref:`Mesh` mesh, :ref:`Texture2D` texture, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0), :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_msdf_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`float` outline=0.0, :ref:`float` pixel_range=4.0, :ref:`float` scale=1.0 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_colors` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_string_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multimesh` **(** :ref:`MultiMesh` multimesh, :ref:`Texture2D` texture **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_polygon` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs=PackedVector2Array(), :ref:`Texture2D` texture=null **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_polyline` **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_polyline_colors` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_primitive` **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`PackedVector2Array` uvs, :ref:`Texture2D` texture=null **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_rect` **(** :ref:`Rect2` rect, :ref:`Color` color, :ref:`bool` filled=true, :ref:`float` width=-1.0 **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_set_transform` **(** :ref:`Vector2` position, :ref:`float` rotation=0.0, :ref:`Vector2` scale=Vector2(1, 1) **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_set_transform_matrix` **(** :ref:`Transform2D` xform **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_string` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_string_outline` **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_style_box` **(** :ref:`StyleBox` style_box, :ref:`Rect2` rect **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_texture` **(** :ref:`Texture2D` texture, :ref:`Vector2` position, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_texture_rect` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`bool` tile, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_texture_rect_region` **(** :ref:`Texture2D` texture, :ref:`Rect2` rect, :ref:`Rect2` src_rect, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`bool` transpose=false, :ref:`bool` clip_uv=true **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`force_update_transform` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_canvas` **(** **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`get_canvas_item` **(** **)** |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:`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` **(** :ref:`int` layer **)** |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` **(** :ref:`Vector2` screen_point **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`InputEvent` | :ref:`make_input_local` **(** :ref:`InputEvent` event **)** |const| | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_to_front` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`queue_redraw` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_notify_local_transform` **(** :ref:`bool` enable **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_notify_transform` **(** :ref:`bool` enable **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_visibility_layer_bit` **(** :ref:`int` layer, :ref:`bool` enabled **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`show` **(** **)** | + +---------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -965,7 +965,7 @@ Value of the ``pixel_range`` should the same that was used during distance field void **draw_multiline** **(** :ref:`PackedVector2Array` points, :ref:`Color` color, :ref:`float` width=-1.0 **)** -Draws multiple disconnected lines with a uniform ``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` 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``. @@ -979,7 +979,7 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f void **draw_multiline_colors** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0 **)** -Draws multiple disconnected lines with a uniform ``width`` and segment-by-segment coloring. Colors assigned to line segments match by index between ``points`` and ``colors``. 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``. @@ -991,7 +991,7 @@ If ``width`` is negative, then two-point primitives will be drawn instead of a f .. rst-class:: classref-method -void **draw_multiline_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_multiline_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. @@ -1003,7 +1003,7 @@ Breaks ``text`` into lines and draws it using the specified ``font`` at the ``po .. rst-class:: classref-method -void **draw_multiline_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_multiline_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. @@ -1055,7 +1055,7 @@ If ``width`` is negative, the polyline is drawn using :ref:`RenderingServer.PRIM void **draw_polyline_colors** **(** :ref:`PackedVector2Array` points, :ref:`PackedColorArray` colors, :ref:`float` width=-1.0, :ref:`bool` antialiased=false **)** -Draws interconnected line segments with a uniform ``width`` and segment-by-segment coloring, and optional antialiasing (supported only for positive ``width``). Colors assigned to line segments match by index between ``points`` and ``colors``. 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, then the polyline is 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``. @@ -1123,7 +1123,7 @@ Sets a custom transform for drawing via matrix. Anything drawn afterwards will b .. rst-class:: classref-method -void **draw_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_string** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. @@ -1162,7 +1162,7 @@ See also :ref:`Font.draw_string`. .. rst-class:: classref-method -void **draw_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_string_outline** **(** :ref:`Font` font, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| 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. diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 78411c1df22..59a7833466d 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -202,6 +202,8 @@ Methods +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`screen_get_dpi` **(** :ref:`int` screen=-1 **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Image` | :ref:`screen_get_image` **(** :ref:`int` screen=-1 **)** |const| | + +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`screen_get_max_scale` **(** **)** |const| | +----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ScreenOrientation` | :ref:`screen_get_orientation` **(** :ref:`int` screen=-1 **)** |const| | @@ -2648,6 +2650,22 @@ Returns the dots per inch density of the specified screen. If ``screen`` is :ref ---- +.. _class_DisplayServer_method_screen_get_image: + +.. rst-class:: classref-method + +:ref:`Image` **screen_get_image** **(** :ref:`int` screen=-1 **)** |const| + +Returns screenshot of the ``screen``. + +\ **Note:** This method is implemented on Linux (X11), macOS, and Windows. + +\ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color. + +.. rst-class:: classref-item-separator + +---- + .. _class_DisplayServer_method_screen_get_max_scale: .. rst-class:: classref-method @@ -2915,6 +2933,8 @@ Note that Godot depends on system libraries for text-to-speech functionality. Th \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2929,6 +2949,8 @@ Returns an :ref:`PackedStringArray` of voice identifier \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2943,6 +2965,8 @@ Returns ``true`` if the synthesizer is in a paused state. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2957,6 +2981,8 @@ Returns ``true`` if the synthesizer is generating speech, or have utterance wait \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2971,6 +2997,8 @@ Puts the synthesizer into a paused state. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -2985,6 +3013,8 @@ Resumes the synthesizer if it was paused. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -3005,6 +3035,8 @@ Adds a callback, which is called when the utterance has started, finished, cance \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -3033,6 +3065,8 @@ Adds an utterance to the queue. If ``interrupt`` is ``true``, the queue is clear \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- @@ -3047,6 +3081,8 @@ Stops synthesis in progress and removes all utterances from the queue. \ **Note:** This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. +\ **Note:** :ref:`ProjectSettings.audio/general/text_to_speech` should be ``true`` to use text-to-speech. + .. rst-class:: classref-item-separator ---- diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index 56ca27e1a9c..2c8cf444bce 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -45,81 +45,89 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`edit_node` **(** :ref:`Node` node **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`edit_resource` **(** :ref:`Resource` resource **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`edit_script` **(** :ref:`Script` script, :ref:`int` line=-1, :ref:`int` column=0, :ref:`bool` grab_focus=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_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:`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` **(** :ref:`Object` object, :ref:`String` for_property="", :ref:`bool` inspector_only=false **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing_scene` **(** **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_plugin_enabled` **(** :ref:`String` plugin **)** |const| | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D[]` | :ref:`make_mesh_previews` **(** :ref:`Mesh[]` meshes, :ref:`int` preview_size **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`open_scene_from_path` **(** :ref:`String` scene_filepath **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_current_scene` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_custom_scene` **(** :ref:`String` scene_filepath **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`play_main_scene` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reload_scene_from_path` **(** :ref:`String` scene_filepath **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`restart_editor` **(** :ref:`bool` save=true **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`save_scene` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`save_scene_as` **(** :ref:`String` path, :ref:`bool` with_preview=true **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select_file` **(** :ref:`String` file **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_main_screen_editor` **(** :ref:`String` name **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_plugin_enabled` **(** :ref:`String` plugin, :ref:`bool` enabled **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`stop_playing_scene` **(** **)** | - +-----------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`edit_node` **(** :ref:`Node` node **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`edit_resource` **(** :ref:`Resource` resource **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`edit_script` **(** :ref:`Script` script, :ref:`int` line=-1, :ref:`int` column=0, :ref:`bool` grab_focus=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_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:`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` **(** :ref:`Object` object, :ref:`String` for_property="", :ref:`bool` inspector_only=false **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing_scene` **(** **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_plugin_enabled` **(** :ref:`String` plugin **)** |const| | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D[]` | :ref:`make_mesh_previews` **(** :ref:`Mesh[]` meshes, :ref:`int` preview_size **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`open_scene_from_path` **(** :ref:`String` scene_filepath **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play_current_scene` **(** **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play_custom_scene` **(** :ref:`String` scene_filepath **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`play_main_scene` **(** **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_dialog` **(** :ref:`Window` dialog, :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_dialog_centered` **(** :ref:`Window` dialog, :ref:`Vector2i` minsize=Vector2i(0, 0) **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_dialog_centered_clamped` **(** :ref:`Window` dialog, :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_dialog_centered_ratio` **(** :ref:`Window` dialog, :ref:`float` ratio=0.8 **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reload_scene_from_path` **(** :ref:`String` scene_filepath **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`restart_editor` **(** :ref:`bool` save=true **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`save_scene` **(** **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`save_scene_as` **(** :ref:`String` path, :ref:`bool` with_preview=true **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select_file` **(** :ref:`String` file **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_main_screen_editor` **(** :ref:`String` name **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_plugin_enabled` **(** :ref:`String` plugin, :ref:`bool` enabled **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`stop_playing_scene` **(** **)** | + +-----------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -531,6 +539,62 @@ Plays the main scene. ---- +.. _class_EditorInterface_method_popup_dialog: + +.. rst-class:: classref-method + +void **popup_dialog** **(** :ref:`Window` dialog, :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_popup_dialog_centered: + +.. rst-class:: classref-method + +void **popup_dialog_centered** **(** :ref:`Window` dialog, :ref:`Vector2i` minsize=Vector2i(0, 0) **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_popup_dialog_centered_clamped: + +.. rst-class:: classref-method + +void **popup_dialog_centered_clamped** **(** :ref:`Window` dialog, :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_EditorInterface_method_popup_dialog_centered_ratio: + +.. rst-class:: classref-method + +void **popup_dialog_centered_ratio** **(** :ref:`Window` dialog, :ref:`float` ratio=0.8 **)** + +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`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_reload_scene_from_path: .. rst-class:: classref-method diff --git a/classes/class_font.rst b/classes/class_font.rst index a9b12fa5dc4..e97079ea096 100644 --- a/classes/class_font.rst +++ b/classes/class_font.rst @@ -31,73 +31,73 @@ Methods .. table:: :widths: auto - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`draw_char` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`draw_char_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_multiline_string_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`draw_string_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID` | :ref:`find_variation` **(** :ref:`Dictionary` variation_coordinates, :ref:`int` face_index=0, :ref:`float` strength=0.0, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0) **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_ascent` **(** :ref:`int` font_size=16 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_char_size` **(** :ref:`int` char, :ref:`int` font_size **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_descent` **(** :ref:`int` font_size=16 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_face_count` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font[]` | :ref:`get_fallbacks` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_font_name` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_font_stretch` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`FontStyle` | :ref:`get_font_style` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_font_style_name` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_font_weight` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_height` **(** :ref:`int` font_size=16 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_multiline_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_opentype_features` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`RID[]` | :ref:`get_rids` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_spacing` **(** :ref:`SpacingType` spacing **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_supported_chars` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_supported_feature_list` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`get_supported_variation_list` **(** **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_underline_position` **(** :ref:`int` font_size=16 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_underline_thickness` **(** :ref:`int` font_size=16 **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_char` **(** :ref:`int` char **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_language_supported` **(** :ref:`String` language **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_script_supported` **(** :ref:`String` script **)** |const| | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cache_capacity` **(** :ref:`int` single_line, :ref:`int` multi_line **)** | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_fallbacks` **(** :ref:`Font[]` fallbacks **)** | - +---------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`draw_char` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`draw_char_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`int` char, :ref:`int` font_size, :ref:`int` size=-1, :ref:`Color` modulate=Color(1, 1, 1, 1) **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_string` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_multiline_string_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_string` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`draw_string_outline` **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID` | :ref:`find_variation` **(** :ref:`Dictionary` variation_coordinates, :ref:`int` face_index=0, :ref:`float` strength=0.0, :ref:`Transform2D` transform=Transform2D(1, 0, 0, 1, 0, 0) **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_ascent` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_char_size` **(** :ref:`int` char, :ref:`int` font_size **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_descent` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_face_count` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font[]` | :ref:`get_fallbacks` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_font_name` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_font_stretch` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`FontStyle` | :ref:`get_font_style` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_font_style_name` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_font_weight` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_height` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_multiline_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_opentype_features` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`RID[]` | :ref:`get_rids` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_spacing` **(** :ref:`SpacingType` spacing **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_string_size` **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_supported_chars` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_supported_feature_list` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`get_supported_variation_list` **(** **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_underline_position` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_underline_thickness` **(** :ref:`int` font_size=16 **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_char` **(** :ref:`int` char **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_language_supported` **(** :ref:`String` language **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_script_supported` **(** :ref:`String` script **)** |const| | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cache_capacity` **(** :ref:`int` single_line, :ref:`int` multi_line **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_fallbacks` **(** :ref:`Font[]` fallbacks **)** | + +---------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -140,7 +140,7 @@ Draw a single Unicode character ``char`` outline into a canvas item using the fo .. rst-class:: classref-method -void **draw_multiline_string** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_multiline_string** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Breaks ``text`` into lines using rules specified by ``brk_flags`` and draws it into a canvas item using the font, at a given position, with ``modulate`` color, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -154,7 +154,7 @@ See also :ref:`CanvasItem.draw_multiline_string` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_multiline_string_outline** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Breaks ``text`` to the lines using rules specified by ``brk_flags`` and draws text outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline of the first line, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -168,7 +168,7 @@ See also :ref:`CanvasItem.draw_multiline_string_outline` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_string** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Draw ``text`` into a canvas item using the font, at a given position, with ``modulate`` color, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -182,7 +182,7 @@ See also :ref:`CanvasItem.draw_string`. .. rst-class:: classref-method -void **draw_string_outline** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +void **draw_string_outline** **(** :ref:`RID` canvas_item, :ref:`Vector2` pos, :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` size=1, :ref:`Color` modulate=Color(1, 1, 1, 1), :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Draw ``text`` outline into a canvas item using the font, at a given position, with ``modulate`` color and ``size`` outline size, optionally clipping the width and aligning horizontally. ``pos`` specifies the baseline, not the top. To draw from the top, *ascent* must be added to the Y axis. @@ -348,7 +348,7 @@ Returns the total average font height (ascent plus descent) in pixels. .. rst-class:: classref-method -:ref:`Vector2` **get_multiline_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +:ref:`Vector2` **get_multiline_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`int` max_lines=-1, :ref:`LineBreakFlag` brk_flags=3, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account. @@ -398,7 +398,7 @@ Returns the spacing for the given ``type`` (see :ref:`SpacingType` **get_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` jst_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| +:ref:`Vector2` **get_string_size** **(** :ref:`String` text, :ref:`HorizontalAlignment` alignment=0, :ref:`float` width=-1, :ref:`int` font_size=16, :ref:`JustificationFlag` justification_flags=3, :ref:`Direction` direction=0, :ref:`Orientation` orientation=0 **)** |const| Returns the size of a bounding box of a single-line string, taking kerning, advance and subpixel positioning into account. See also :ref:`get_multiline_string_size` and :ref:`draw_string`. diff --git a/classes/class_gdextension.rst b/classes/class_gdextension.rst index fbac307a26a..0a1647d161c 100644 --- a/classes/class_gdextension.rst +++ b/classes/class_gdextension.rst @@ -24,17 +24,17 @@ Methods .. table:: :widths: auto - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`close_library` **(** **)** | - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`InitializationLevel` | :ref:`get_minimum_library_initialization_level` **(** **)** |const| | - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`initialize_library` **(** :ref:`InitializationLevel` level **)** | - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_library_open` **(** **)** |const| | - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`open_library` **(** :ref:`String` path, :ref:`String` entry_symbol **)** | - +------------------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------+ + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`close_library` **(** **)** | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`InitializationLevel` | :ref:`get_minimum_library_initialization_level` **(** **)** |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`initialize_library` **(** :ref:`InitializationLevel` level **)** | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_library_open` **(** **)** |const| | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`open_library` **(** :ref:`String` path, :ref:`String` entry_symbol, :ref:`bool` use_legacy_interface **)** | + +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -152,7 +152,7 @@ void **initialize_library** **(** :ref:`InitializationLevel` **open_library** **(** :ref:`String` path, :ref:`String` entry_symbol **)** +:ref:`Error` **open_library** **(** :ref:`String` path, :ref:`String` entry_symbol, :ref:`bool` use_legacy_interface **)** .. container:: contribute diff --git a/classes/class_gdscript.rst b/classes/class_gdscript.rst index e3f6f2a88a2..112f7f72bbf 100644 --- a/classes/class_gdscript.rst +++ b/classes/class_gdscript.rst @@ -21,7 +21,9 @@ Description A script implemented in the GDScript programming language. The script extends the functionality of all objects that instantiate it. -\ :ref:`new` creates a new instance of the script. :ref:`Object.set_script` extends an existing object, if that object's class matches one of the script's base classes. +Calling :ref:`new` creates a new instance of the script. :ref:`Object.set_script` extends an existing object, if that object's class matches one of the script's base classes. + +If you are looking for GDScript's built-in functions, see :ref:`@GDScript` instead. .. rst-class:: classref-introduction-group diff --git a/classes/class_inputevent.rst b/classes/class_inputevent.rst index 3e6b8fba274..826051533d1 100644 --- a/classes/class_inputevent.rst +++ b/classes/class_inputevent.rst @@ -71,12 +71,16 @@ Methods +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_action_type` **(** **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_canceled` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_echo` **(** **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_match` **(** :ref:`InputEvent` event, :ref:`bool` exact_match=true **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_pressed` **(** **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_released` **(** **)** |const| | + +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`InputEvent` | :ref:`xformed_by` **(** :ref:`Transform2D` xform, :ref:`Vector2` local_ofs=Vector2(0, 0) **)** |const| | +-------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -209,6 +213,18 @@ Returns ``true`` if this input event's type is one that can be assigned to an in ---- +.. _class_InputEvent_method_is_canceled: + +.. rst-class:: classref-method + +:ref:`bool` **is_canceled** **(** **)** |const| + +Returns ``true`` if this input event has been canceled. + +.. rst-class:: classref-item-separator + +---- + .. _class_InputEvent_method_is_echo: .. rst-class:: classref-method @@ -249,6 +265,18 @@ Returns ``true`` if this input event is pressed. Not relevant for events of type ---- +.. _class_InputEvent_method_is_released: + +.. rst-class:: classref-method + +:ref:`bool` **is_released** **(** **)** |const| + +Returns ``true`` if this input event is released. Not relevant for events of type :ref:`InputEventMouseMotion` or :ref:`InputEventScreenDrag`. + +.. rst-class:: classref-item-separator + +---- + .. _class_InputEvent_method_xformed_by: .. rst-class:: classref-method diff --git a/classes/class_inputeventmidi.rst b/classes/class_inputeventmidi.rst index 54d3c61116a..468d535484d 100644 --- a/classes/class_inputeventmidi.rst +++ b/classes/class_inputeventmidi.rst @@ -213,7 +213,9 @@ For MIDI messages between 0x80 and 0xEF, only the left half of the bits are retu Notes will return :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` when activated, but they might not always return :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF` when deactivated, therefore your code should treat the input as stopped if some period of time has passed. -For more information, see the MIDI message status byte list chart linked above. +Some MIDI devices may send :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` with zero velocity instead of :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF`. + +For more information, see the note in :ref:`velocity` and the MIDI message status byte list chart linked above. .. rst-class:: classref-item-separator @@ -264,7 +266,9 @@ The pressure of the MIDI signal. This value ranges from 0 to 127. For many devic - void **set_velocity** **(** :ref:`int` value **)** - :ref:`int` **get_velocity** **(** **)** -The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice. Note that some MIDI devices may send a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` message with zero velocity and expect this to be treated the same as a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF` message, but device implementations vary so Godot reports event data exactly as received. +The velocity of the MIDI signal. This value ranges from 0 to 127. For a piano, this corresponds to how quickly the key was pressed, and is rarely above about 110 in practice. + +\ **Note:** Some MIDI devices may send a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` message with zero velocity and expect this to be treated the same as a :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_OFF` message, but device implementations vary so Godot reports event data exactly as received. Depending on the hardware and the needs of the game/app, this MIDI quirk can be handled robustly with a couple lines of script (check for :ref:`@GlobalScope.MIDI_MESSAGE_NOTE_ON` with velocity zero). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_inputeventmousebutton.rst b/classes/class_inputeventmousebutton.rst index e309097a510..ac70e894399 100644 --- a/classes/class_inputeventmousebutton.rst +++ b/classes/class_inputeventmousebutton.rst @@ -39,6 +39,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------+-----------+ | :ref:`MouseButton` | :ref:`button_index` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`canceled` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`double_click` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------+-----------+ | :ref:`float` | :ref:`factor` | ``1.0`` | @@ -72,6 +74,23 @@ The mouse button identifier, one of the :ref:`MouseButton` **canceled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_canceled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_canceled** **(** **)** + +If ``true``, the mouse button event has been canceled. + +.. rst-class:: classref-item-separator + +---- + .. _class_InputEventMouseButton_property_double_click: .. rst-class:: classref-property diff --git a/classes/class_inputeventscreentouch.rst b/classes/class_inputeventscreentouch.rst index 3660fb1f466..ad4d3e4d91d 100644 --- a/classes/class_inputeventscreentouch.rst +++ b/classes/class_inputeventscreentouch.rst @@ -38,6 +38,8 @@ Properties .. table:: :widths: auto + +-------------------------------+--------------------------------------------------------------------+-------------------+ + | :ref:`bool` | :ref:`canceled` | ``false`` | +-------------------------------+--------------------------------------------------------------------+-------------------+ | :ref:`bool` | :ref:`double_tap` | ``false`` | +-------------------------------+--------------------------------------------------------------------+-------------------+ @@ -57,6 +59,23 @@ Properties Property Descriptions --------------------- +.. _class_InputEventScreenTouch_property_canceled: + +.. rst-class:: classref-property + +:ref:`bool` **canceled** = ``false`` + +.. rst-class:: classref-property-setget + +- void **set_canceled** **(** :ref:`bool` value **)** +- :ref:`bool` **is_canceled** **(** **)** + +If ``true``, the touch event has been canceled. + +.. rst-class:: classref-item-separator + +---- + .. _class_InputEventScreenTouch_property_double_tap: .. rst-class:: classref-property diff --git a/classes/class_label.rst b/classes/class_label.rst index 45566598503..4f5b011e868 100644 --- a/classes/class_label.rst +++ b/classes/class_label.rst @@ -45,6 +45,8 @@ Properties +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``0`` | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ + | :ref:`JustificationFlag` | :ref:`justification_flags` | ``163`` | + +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`LabelSettings` | :ref:`label_settings` | | +-----------------------------------------------------------------------------+----------------------------------------------------------------------------------------------------------+------------------------------------------------------------------------------+ | :ref:`String` | :ref:`language` | ``""`` | @@ -188,6 +190,23 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill ---- +.. _class_Label_property_justification_flags: + +.. rst-class:: classref-property + +:ref:`JustificationFlag` **justification_flags** = ``163`` + +.. rst-class:: classref-property-setget + +- void **set_justification_flags** **(** :ref:`JustificationFlag` value **)** +- :ref:`JustificationFlag` **get_justification_flags** **(** **)** + +Line fill alignment rules. For more info see :ref:`JustificationFlag`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label_property_label_settings: .. rst-class:: classref-property diff --git a/classes/class_label3d.rst b/classes/class_label3d.rst index 9328f147e3e..134872eb155 100644 --- a/classes/class_label3d.rst +++ b/classes/class_label3d.rst @@ -58,6 +58,8 @@ Properties +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ + | :ref:`JustificationFlag` | :ref:`justification_flags` | ``163`` | + +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`language` | ``""`` | +---------------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`line_spacing` | ``0.0`` | @@ -431,6 +433,23 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill ---- +.. _class_Label3D_property_justification_flags: + +.. rst-class:: classref-property + +:ref:`JustificationFlag` **justification_flags** = ``163`` + +.. rst-class:: classref-property-setget + +- void **set_justification_flags** **(** :ref:`JustificationFlag` value **)** +- :ref:`JustificationFlag` **get_justification_flags** **(** **)** + +Line fill alignment rules. For more info see :ref:`JustificationFlag`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Label3D_property_language: .. rst-class:: classref-property diff --git a/classes/class_mutex.rst b/classes/class_mutex.rst index 41e261e466d..11492e01119 100644 --- a/classes/class_mutex.rst +++ b/classes/class_mutex.rst @@ -21,6 +21,16 @@ Description A synchronization mutex (mutual exclusion). This is used to synchronize multiple :ref:`Thread`\ s, and is equivalent to a binary :ref:`Semaphore`. It guarantees that only one thread can ever acquire the lock at a time. A mutex can be used to protect a critical section; however, be careful to avoid deadlocks. +It's of the recursive kind, so it can be locked multiple times by one thread, provided it also unlocks it as many times. + +\ **Warning:**\ + +To guarantee that the operating system is able to perform proper cleanup (no crashes, no deadlocks), these conditions must be met: + +- By the time a **Mutex**'s reference count reaches zero and therefore it is destroyed, no threads (including the one on which the destruction will happen) must have it locked. + +- By the time a :ref:`Thread`'s reference count reaches zero and therefore it is destroyed, it must not have any mutex locked. + .. rst-class:: classref-introduction-group Tutorials @@ -91,6 +101,8 @@ Unlocks this **Mutex**, leaving it to other threads. \ **Note:** If a thread called :ref:`lock` or :ref:`try_lock` multiple times while already having ownership of the mutex, it must also call :ref:`unlock` the same number of times in order to unlock it correctly. +\ **Warning:** Calling :ref:`unlock` more times that :ref:`lock` on a given thread, thus ending up trying to unlock a non-locked mutex, is wrong and may causes crashes or deadlocks. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` diff --git a/classes/class_node.rst b/classes/class_node.rst index 81fa49024b6..968fa4ce328 100644 --- a/classes/class_node.rst +++ b/classes/class_node.rst @@ -149,6 +149,8 @@ Methods +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_index` **(** :ref:`bool` include_internal=false **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Window` | :ref:`get_last_exclusive_window` **(** **)** |const| | + +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_multiplayer_authority` **(** **)** |const| | +---------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Node` | :ref:`get_node` **(** :ref:`NodePath` path **)** |const| | @@ -1720,6 +1722,18 @@ If ``include_internal`` is ``false``, the index won't take internal children int ---- +.. _class_Node_method_get_last_exclusive_window: + +.. rst-class:: classref-method + +:ref:`Window` **get_last_exclusive_window** **(** **)** |const| + +Returns the :ref:`Window` that contains this node, or the last exclusive child in a chain of windows starting with the one that contains this node. + +.. rst-class:: classref-item-separator + +---- + .. _class_Node_method_get_multiplayer_authority: .. rst-class:: classref-method diff --git a/classes/class_os.rst b/classes/class_os.rst index 1bb8351a210..fed61bc5267 100644 --- a/classes/class_os.rst +++ b/classes/class_os.rst @@ -38,6 +38,8 @@ Properties .. table:: :widths: auto + +-------------------------+---------------------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`delta_smoothing` | ``true`` | +-------------------------+---------------------------------------------------------------------------------------------------+-----------+ | :ref:`bool` | :ref:`low_processor_usage_mode` | ``false`` | +-------------------------+---------------------------------------------------------------------------------------------------+-----------+ @@ -292,6 +294,23 @@ Ringtones directory path. Property Descriptions --------------------- +.. _class_OS_property_delta_smoothing: + +.. rst-class:: classref-property + +:ref:`bool` **delta_smoothing** = ``true`` + +.. rst-class:: classref-property-setget + +- void **set_delta_smoothing** **(** :ref:`bool` value **)** +- :ref:`bool` **is_delta_smoothing_enabled** **(** **)** + +If ``true``, the engine filters the time delta measured between each frame, and attempts to compensate for random variation. This will only operate on systems where V-Sync is active. + +.. rst-class:: classref-item-separator + +---- + .. _class_OS_property_low_processor_usage_mode: .. rst-class:: classref-property diff --git a/classes/class_parallaxlayer.rst b/classes/class_parallaxlayer.rst index 38dc746d57e..f15cf55140b 100644 --- a/classes/class_parallaxlayer.rst +++ b/classes/class_parallaxlayer.rst @@ -61,9 +61,11 @@ Property Descriptions - void **set_mirroring** **(** :ref:`Vector2` value **)** - :ref:`Vector2` **get_mirroring** **(** **)** -The ParallaxLayer's :ref:`Texture2D` mirroring. Useful for creating an infinite scrolling background. If an axis is set to ``0``, the :ref:`Texture2D` will not be mirrored. +The ParallaxLayer's :ref:`Texture2D` repeating. Useful for creating an infinite scrolling background. If an axis is set to ``0``, the :ref:`Texture2D` will not be repeated. -If the length of the viewport axis is bigger than twice the mirrored axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the texture at any one time. +If the length of the viewport axis is bigger than twice the repeated axis size, it will not repeat infinitely, as the parallax layer only draws 2 instances of the texture at any given time. + +\ **Note:** Despite its name, the texture will not be mirrored, it will simply be repeated. .. rst-class:: classref-item-separator diff --git a/classes/class_particleprocessmaterial.rst b/classes/class_particleprocessmaterial.rst index 7868e981975..0fe7399a857 100644 --- a/classes/class_particleprocessmaterial.rst +++ b/classes/class_particleprocessmaterial.rst @@ -33,161 +33,161 @@ Properties .. table:: :widths: auto - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`angle_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`angle_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`angle_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`angular_velocity_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`anim_offset_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`anim_speed_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`attractor_interaction_enabled` | ``true`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`collision_bounce` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`collision_friction` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`CollisionMode` | :ref:`collision_mode` | ``0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`collision_use_scale` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`color_initial_ramp` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`color_ramp` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`damping_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`damping_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`damping_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Vector3` | :ref:`direction` | ``Vector3(1, 0, 0)`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Vector3` | :ref:`emission_box_extents` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`emission_color_texture` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`emission_normal_texture` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`int` | :ref:`emission_point_count` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`emission_point_texture` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Vector3` | :ref:`emission_ring_axis` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`emission_ring_height` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`emission_ring_inner_radius` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`emission_ring_radius` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`emission_sphere_radius` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`flatness` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -9.8, 0)`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :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_randomness` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`linear_accel_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`orbit_velocity_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`orbit_velocity_max` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`orbit_velocity_min` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`particle_flag_disable_z` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`particle_flag_rotate_y` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`radial_accel_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`scale_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`scale_max` | ``1.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`scale_min` | ``1.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`spread` | ``45.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`int` | :ref:`sub_emitter_amount_at_collision` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`int` | :ref:`sub_emitter_amount_at_end` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`sub_emitter_frequency` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`sub_emitter_keep_velocity` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`SubEmitterMode` | :ref:`sub_emitter_mode` | ``0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`tangential_accel_curve` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`bool` | :ref:`turbulence_enabled` | ``false`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_influence_max` | ``0.1`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_influence_min` | ``0.1`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Texture2D` | :ref:`turbulence_influence_over_life` | | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_initial_displacement_max` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_initial_displacement_min` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_noise_scale` | ``9.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`Vector3` | :ref:`turbulence_noise_speed` | ``Vector3(0.5, 0.5, 0.5)`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_noise_speed_random` | ``0.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ - | :ref:`float` | :ref:`turbulence_noise_strength` | ``1.0`` | - +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+----------------------------+ + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`angle_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`angle_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`angle_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`angular_velocity_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`angular_velocity_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`angular_velocity_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`anim_offset_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`anim_offset_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`anim_offset_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`anim_speed_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`anim_speed_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`anim_speed_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`attractor_interaction_enabled` | ``true`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`collision_bounce` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`collision_friction` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`CollisionMode` | :ref:`collision_mode` | ``0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`collision_use_scale` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Color` | :ref:`color` | ``Color(1, 1, 1, 1)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`color_initial_ramp` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`color_ramp` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`damping_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`damping_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`damping_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`direction` | ``Vector3(1, 0, 0)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`emission_box_extents` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`emission_color_texture` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`emission_normal_texture` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`emission_point_count` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`emission_point_texture` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`emission_ring_axis` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`emission_ring_height` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`emission_ring_inner_radius` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`emission_ring_radius` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`EmissionShape` | :ref:`emission_shape` | ``0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`emission_sphere_radius` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`flatness` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`gravity` | ``Vector3(0, -9.8, 0)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :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_randomness` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`linear_accel_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`linear_accel_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`linear_accel_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`orbit_velocity_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`orbit_velocity_max` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`orbit_velocity_min` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`particle_flag_align_y` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`particle_flag_disable_z` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`particle_flag_rotate_y` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`radial_accel_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`radial_accel_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`radial_accel_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`scale_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`scale_max` | ``1.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`scale_min` | ``1.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`spread` | ``45.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`sub_emitter_amount_at_collision` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`int` | :ref:`sub_emitter_amount_at_end` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`sub_emitter_frequency` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`sub_emitter_keep_velocity` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`SubEmitterMode` | :ref:`sub_emitter_mode` | ``0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`tangential_accel_curve` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`tangential_accel_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`tangential_accel_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`bool` | :ref:`turbulence_enabled` | ``false`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_influence_max` | ``0.1`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_influence_min` | ``0.1`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Texture2D` | :ref:`turbulence_influence_over_life` | | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_initial_displacement_max` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_initial_displacement_min` | ``0.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_noise_scale` | ``9.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`Vector3` | :ref:`turbulence_noise_speed` | ``Vector3(0, 0, 0)`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_noise_speed_random` | ``0.2`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ + | :ref:`float` | :ref:`turbulence_noise_strength` | ``1.0`` | + +--------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------+-------------------------+ .. rst-class:: classref-reftable-group @@ -1879,16 +1879,16 @@ A small scale will result in smaller features with more detail while a high scal .. rst-class:: classref-property -:ref:`Vector3` **turbulence_noise_speed** = ``Vector3(0.5, 0.5, 0.5)`` +:ref:`Vector3` **turbulence_noise_speed** = ``Vector3(0, 0, 0)`` .. rst-class:: classref-property-setget - void **set_turbulence_noise_speed** **(** :ref:`Vector3` value **)** - :ref:`Vector3` **get_turbulence_noise_speed** **(** **)** -The movement speed of the turbulence pattern. This changes how quickly the noise changes over time. +A scrolling velocity for the turbulence field. This sets a directional trend for the pattern to move in over time. -A value of ``Vector3(0.0, 0.0, 0.0)`` will freeze the turbulence pattern in place. +The default value of ``Vector3(0, 0, 0)`` turns off the scrolling. .. rst-class:: classref-item-separator @@ -1898,14 +1898,16 @@ A value of ``Vector3(0.0, 0.0, 0.0)`` will freeze the turbulence pattern in plac .. rst-class:: classref-property -:ref:`float` **turbulence_noise_speed_random** = ``0.0`` +:ref:`float` **turbulence_noise_speed_random** = ``0.2`` .. rst-class:: classref-property-setget - void **set_turbulence_noise_speed_random** **(** :ref:`float` value **)** - :ref:`float` **get_turbulence_noise_speed_random** **(** **)** -Use to influence the noise speed in a random pattern. This helps break up visible movement patterns. +The in-place rate of change of the turbulence field. This defines how quickly the noise pattern varies over time. + +A value of 0.0 will result in a fixed pattern. .. rst-class:: classref-item-separator @@ -1922,7 +1924,7 @@ Use to influence the noise speed in a random pattern. This helps break up visibl - void **set_turbulence_noise_strength** **(** :ref:`float` value **)** - :ref:`float` **get_turbulence_noise_strength** **(** **)** -The turbulence noise strength. Increasing this will result in a stronger, more contrasting noise pattern. +The turbulence noise strength. Increasing this will result in a stronger, more contrasting, flow pattern. .. rst-class:: classref-section-separator diff --git a/classes/class_placeholdercubemap.rst b/classes/class_placeholdercubemap.rst index 777f5908ab7..e687597e138 100644 --- a/classes/class_placeholdercubemap.rst +++ b/classes/class_placeholdercubemap.rst @@ -25,6 +25,8 @@ This class is used when loading a project that uses a :ref:`Cubemap` | :ref:`application/config/windows_native_icon` | ``""`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`application/run/delta_smoothing` | ``true`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/run/disable_stderr` | ``false`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`application/run/disable_stdout` | ``false`` | @@ -125,6 +127,8 @@ Properties +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`audio/general/3d_panning_strength` | ``0.5`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`audio/general/text_to_speech` | ``false`` | + +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`audio/video/video_delay_compensation_ms` | ``0`` | +---------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`compression/formats/gzip/compression_level` | ``-1`` | @@ -1779,6 +1783,22 @@ Icon set in ``.ico`` format used on Windows to set the game's icon. This is done ---- +.. _class_ProjectSettings_property_application/run/delta_smoothing: + +.. rst-class:: classref-property + +:ref:`bool` **application/run/delta_smoothing** = ``true`` + +Time samples for frame deltas are subject to random variation introduced by the platform, even when frames are displayed at regular intervals thanks to V-Sync. This can lead to jitter. Delta smoothing can often give a better result by filtering the input deltas to correct for minor fluctuations from the refresh rate. + +\ **Note:** Delta smoothing is only attempted when :ref:`display/window/vsync/vsync_mode` is set to ``enabled``, as it does not work well without V-Sync. + +It may take several seconds at a stable frame rate before the smoothing is initially activated. It will only be active on machines where performance is adequate to render frames at the refresh rate. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_application/run/disable_stderr: .. rst-class:: classref-property @@ -2069,6 +2089,20 @@ The default value of ``0.5`` is tuned for headphones. When using speakers, you m ---- +.. _class_ProjectSettings_property_audio/general/text_to_speech: + +.. rst-class:: classref-property + +:ref:`bool` **audio/general/text_to_speech** = ``false`` + +If ``true``, text-to-speech support is enabled, see :ref:`DisplayServer.tts_get_voices` and :ref:`DisplayServer.tts_speak`. + +\ **Note:** Enabling TTS can cause addition idle CPU usage and interfere with the sleep mode, so consider disabling it if TTS is not used. + +.. rst-class:: classref-item-separator + +---- + .. _class_ProjectSettings_property_audio/video/video_delay_compensation_ms: .. rst-class:: classref-property diff --git a/classes/class_richtextlabel.rst b/classes/class_richtextlabel.rst index ef0ba32338d..3f2deecbe40 100644 --- a/classes/class_richtextlabel.rst +++ b/classes/class_richtextlabel.rst @@ -106,133 +106,133 @@ Methods .. table:: :widths: auto - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_image` **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0) **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_text` **(** :ref:`String` text **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`append_text` **(** :ref:`String` bbcode **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`clear` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`deselect` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_character_line` **(** :ref:`int` character **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_character_paragraph` **(** :ref:`int` character **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_content_height` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_content_width` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_line_offset` **(** :ref:`int` line **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_paragraph_count` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_paragraph_offset` **(** :ref:`int` paragraph **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_parsed_text` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`get_selected_text` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_selection_from` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_selection_to` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_visible_paragraph_count` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`install_effect` **(** :ref:`Variant` effect **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_ready` **(** **)** |const| | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`menu_option` **(** :ref:`int` option **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`newline` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`parse_bbcode` **(** :ref:`String` bbcode **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Dictionary` | :ref:`parse_expressions_for_values` **(** :ref:`PackedStringArray` expressions **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`pop` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bgcolor` **(** :ref:`Color` bgcolor **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bold` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_bold_italics` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_cell` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_color` **(** :ref:`Color` color **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_customfx` **(** :ref:`RichTextEffect` effect, :ref:`Dictionary` env **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_dropcap` **(** :ref:`String` string, :ref:`Font` font, :ref:`int` size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color` color=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`Color` outline_color=Color(0, 0, 0, 0) **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_fgcolor` **(** :ref:`Color` fgcolor **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_font` **(** :ref:`Font` font, :ref:`int` font_size **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_font_size` **(** :ref:`int` font_size **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_hint` **(** :ref:`String` description **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_indent` **(** :ref:`int` level **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_italics` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_list` **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize, :ref:`String` bullet="•" **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_meta` **(** :ref:`Variant` data **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_mono` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_normal` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_outline_color` **(** :ref:`Color` color **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_outline_size` **(** :ref:`int` outline_size **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_paragraph` **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_strikethrough` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_table` **(** :ref:`int` columns, :ref:`InlineAlignment` inline_align=0, :ref:`int` align_to_row=-1 **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`push_underline` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`remove_paragraph` **(** :ref:`int` paragraph **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_line` **(** :ref:`int` line **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_paragraph` **(** :ref:`int` paragraph **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`scroll_to_selection` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`select_all` **(** **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_border_color` **(** :ref:`Color` color **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_padding` **(** :ref:`Rect2` padding **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_row_background_color` **(** :ref:`Color` odd_row_bg, :ref:`Color` even_row_bg **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_cell_size_override` **(** :ref:`Vector2` min_size, :ref:`Vector2` max_size **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_table_column_expand` **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio **)** | - +-------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_image` **(** :ref:`Texture2D` image, :ref:`int` width=0, :ref:`int` height=0, :ref:`Color` color=Color(1, 1, 1, 1), :ref:`InlineAlignment` inline_align=5, :ref:`Rect2` region=Rect2(0, 0, 0, 0) **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_text` **(** :ref:`String` text **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`append_text` **(** :ref:`String` bbcode **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`clear` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`deselect` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_character_line` **(** :ref:`int` character **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_character_paragraph` **(** :ref:`int` character **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_content_height` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_content_width` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_line_count` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_line_offset` **(** :ref:`int` line **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PopupMenu` | :ref:`get_menu` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_paragraph_count` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_paragraph_offset` **(** :ref:`int` paragraph **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_parsed_text` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_selected_text` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_from` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_selection_to` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_total_character_count` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`VScrollBar` | :ref:`get_v_scroll_bar` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_line_count` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_visible_paragraph_count` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`install_effect` **(** :ref:`Variant` effect **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_menu_visible` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_ready` **(** **)** |const| | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`menu_option` **(** :ref:`int` option **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`newline` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`parse_bbcode` **(** :ref:`String` bbcode **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`parse_expressions_for_values` **(** :ref:`PackedStringArray` expressions **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`pop` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bgcolor` **(** :ref:`Color` bgcolor **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bold` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_bold_italics` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_cell` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_color` **(** :ref:`Color` color **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_customfx` **(** :ref:`RichTextEffect` effect, :ref:`Dictionary` env **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_dropcap` **(** :ref:`String` string, :ref:`Font` font, :ref:`int` size, :ref:`Rect2` dropcap_margins=Rect2(0, 0, 0, 0), :ref:`Color` color=Color(1, 1, 1, 1), :ref:`int` outline_size=0, :ref:`Color` outline_color=Color(0, 0, 0, 0) **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_fgcolor` **(** :ref:`Color` fgcolor **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_font` **(** :ref:`Font` font, :ref:`int` font_size **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_font_size` **(** :ref:`int` font_size **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_hint` **(** :ref:`String` description **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_indent` **(** :ref:`int` level **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_italics` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_list` **(** :ref:`int` level, :ref:`ListType` type, :ref:`bool` capitalize, :ref:`String` bullet="•" **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_meta` **(** :ref:`Variant` data **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_mono` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_normal` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_outline_color` **(** :ref:`Color` color **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_outline_size` **(** :ref:`int` outline_size **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_paragraph` **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0, :ref:`JustificationFlag` justification_flags=163 **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_strikethrough` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_table` **(** :ref:`int` columns, :ref:`InlineAlignment` inline_align=0, :ref:`int` align_to_row=-1 **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`push_underline` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`remove_paragraph` **(** :ref:`int` paragraph **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_line` **(** :ref:`int` line **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_paragraph` **(** :ref:`int` paragraph **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`scroll_to_selection` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`select_all` **(** **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_border_color` **(** :ref:`Color` color **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_padding` **(** :ref:`Rect2` padding **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_row_background_color` **(** :ref:`Color` odd_row_bg, :ref:`Color` even_row_bg **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_cell_size_override` **(** :ref:`Vector2` min_size, :ref:`Vector2` max_size **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_table_column_expand` **(** :ref:`int` column, :ref:`bool` expand, :ref:`int` ratio **)** | + +-------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -1516,7 +1516,7 @@ Adds a ``[outline_size]`` tag to the tag stack. Overrides default text outline s .. rst-class:: classref-method -void **push_paragraph** **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0 **)** +void **push_paragraph** **(** :ref:`HorizontalAlignment` alignment, :ref:`TextDirection` base_direction=0, :ref:`String` language="", :ref:`StructuredTextParser` st_parser=0, :ref:`JustificationFlag` justification_flags=163 **)** Adds a ``[p]`` tag to the tag stack. diff --git a/classes/class_semaphore.rst b/classes/class_semaphore.rst index fec8c052c98..aa951296f86 100644 --- a/classes/class_semaphore.rst +++ b/classes/class_semaphore.rst @@ -21,6 +21,14 @@ Description A synchronization semaphore which can be used to synchronize multiple :ref:`Thread`\ s. Initialized to zero on creation. Be careful to avoid deadlocks. For a binary version, see :ref:`Mutex`. +\ **Warning:**\ + +To guarantee that the operating system is able to perform proper cleanup (no crashes, no deadlocks), these conditions must be met: + +- By the time a **Semaphore**'s reference count reaches zero and therefore it is destroyed, no threads must be waiting on it. + +- By the time a :ref:`Thread`'s reference count reaches zero and therefore it is destroyed, it must not be waiting on any semaphore. + .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_string.rst b/classes/class_string.rst index 901ae58517c..8ecc1efa4a8 100644 --- a/classes/class_string.rst +++ b/classes/class_string.rst @@ -823,7 +823,7 @@ Decodes a hexadecimal string as a :ref:`PackedByteArray`. .. code-tab:: csharp var text = "hello world"; - var encoded = text.ToUtf8Buffer().HexEncode(); # outputs "68656c6c6f20776f726c64" + var encoded = text.ToUtf8Buffer().HexEncode(); // outputs "68656c6c6f20776f726c64" GD.Print(buf.HexDecode().GetStringFromUtf8()); diff --git a/classes/class_stringname.rst b/classes/class_stringname.rst index 673fff49284..e1630dfe864 100644 --- a/classes/class_stringname.rst +++ b/classes/class_stringname.rst @@ -777,7 +777,7 @@ Decodes a hexadecimal string as a :ref:`PackedByteArray`. .. code-tab:: csharp var text = "hello world"; - var encoded = text.ToUtf8Buffer().HexEncode(); # outputs "68656c6c6f20776f726c64" + var encoded = text.ToUtf8Buffer().HexEncode(); // outputs "68656c6c6f20776f726c64" GD.Print(buf.HexDecode().GetStringFromUtf8()); @@ -1965,7 +1965,7 @@ Appends ``right`` at the end of this **StringName**, returning a :ref:`String` **operator <** **(** :ref:`StringName` right **)** -Returns ``true`` if the left :ref:`String` comes before ``right`` in `Unicode order `__, which roughly matches the alphabetical order. Useful for sorting. +Returns ``true`` if the left **StringName**'s pointer comes before ``right``. Note that this will not match their `Unicode order `__. .. rst-class:: classref-item-separator @@ -1977,7 +1977,7 @@ Returns ``true`` if the left :ref:`String` comes before ``right`` :ref:`bool` **operator <=** **(** :ref:`StringName` right **)** -Returns ``true`` if the left :ref:`String` comes before ``right`` in `Unicode order `__, which roughly matches the alphabetical order, or if both are equal. +Returns ``true`` if the left **StringName**'s pointer comes before ``right`` or if they are the same. Note that this will not match their `Unicode order `__. .. rst-class:: classref-item-separator @@ -2013,7 +2013,7 @@ Returns ``true`` if the **StringName** and ``right`` refer to the same name. Com :ref:`bool` **operator >** **(** :ref:`StringName` right **)** -Returns ``true`` if the left **StringName** comes after ``right`` in `Unicode order `__, which roughly matches the alphabetical order. Useful for sorting. +Returns ``true`` if the left **StringName**'s pointer comes after ``right``. Note that this will not match their `Unicode order `__. .. rst-class:: classref-item-separator @@ -2025,7 +2025,7 @@ Returns ``true`` if the left **StringName** comes after ``right`` in `Unicode or :ref:`bool` **operator >=** **(** :ref:`StringName` right **)** -Returns ``true`` if the left **StringName** comes after ``right`` in `Unicode order `__, which roughly matches the alphabetical order, or if both are equal. +Returns ``true`` if the left **StringName**'s pointer comes after ``right`` or if they are the same. Note that this will not match their `Unicode order `__. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_textedit.rst b/classes/class_textedit.rst index 00187d1d026..30d745d0f6b 100644 --- a/classes/class_textedit.rst +++ b/classes/class_textedit.rst @@ -2241,7 +2241,9 @@ Returns the text currently in ``gutter`` at ``line``. :ref:`int` **get_line_height** **(** **)** |const| -Returns the height of a largest line. +Returns the maximum value of the line height among all lines. + +\ **Note:** The return value is influenced by :ref:`line_spacing` and :ref:`font_size`. And it will not be less than ``1``. .. rst-class:: classref-item-separator diff --git a/classes/class_textmesh.rst b/classes/class_textmesh.rst index fd70f2637f9..c6f8ecd927d 100644 --- a/classes/class_textmesh.rst +++ b/classes/class_textmesh.rst @@ -46,6 +46,8 @@ Properties +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ | :ref:`HorizontalAlignment` | :ref:`horizontal_alignment` | ``1`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ + | :ref:`JustificationFlag` | :ref:`justification_flags` | ``163`` | + +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ | :ref:`String` | :ref:`language` | ``""`` | +-------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------+-------------------+ | :ref:`float` | :ref:`line_spacing` | ``0.0`` | @@ -180,6 +182,23 @@ Controls the text's horizontal alignment. Supports left, center, right, and fill ---- +.. _class_TextMesh_property_justification_flags: + +.. rst-class:: classref-property + +:ref:`JustificationFlag` **justification_flags** = ``163`` + +.. rst-class:: classref-property-setget + +- void **set_justification_flags** **(** :ref:`JustificationFlag` value **)** +- :ref:`JustificationFlag` **get_justification_flags** **(** **)** + +Line fill alignment rules. For more info see :ref:`JustificationFlag`. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextMesh_property_language: .. rst-class:: classref-property diff --git a/classes/class_textparagraph.rst b/classes/class_textparagraph.rst index 22490704352..744fba7717a 100644 --- a/classes/class_textparagraph.rst +++ b/classes/class_textparagraph.rst @@ -38,7 +38,7 @@ Properties +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`Direction` | :ref:`direction` | ``0`` | +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ - | :ref:`JustificationFlag` | :ref:`justification_flags` | ``3`` | + | :ref:`JustificationFlag` | :ref:`justification_flags` | ``163`` | +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ | :ref:`int` | :ref:`max_lines_visible` | ``-1`` | +-------------------------------------------------------------------+----------------------------------------------------------------------------------+-----------+ @@ -208,14 +208,14 @@ Text writing direction. .. rst-class:: classref-property -:ref:`JustificationFlag` **justification_flags** = ``3`` +:ref:`JustificationFlag` **justification_flags** = ``163`` .. rst-class:: classref-property-setget - void **set_justification_flags** **(** :ref:`JustificationFlag` value **)** - :ref:`JustificationFlag` **get_justification_flags** **(** **)** -Line alignment rules. For more info see :ref:`TextServer`. +Line fill alignment rules. For more info see :ref:`JustificationFlag`. .. rst-class:: classref-item-separator diff --git a/classes/class_textserver.rst b/classes/class_textserver.rst index 49c39146c02..bf8a5bfc634 100644 --- a/classes/class_textserver.rst +++ b/classes/class_textserver.rst @@ -304,7 +304,7 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l=-1, :ref:`float` clip_r=-1, :ref:`int` outline_size=1, :ref:`Color` color=Color(1, 1, 1, 1) **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags=3 **)** | + | :ref:`float` | :ref:`shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` justification_flags=3 **)** | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -366,6 +366,8 @@ Methods +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedInt32Array` | :ref:`shaped_text_get_word_breaks` **(** :ref:`RID` shaped, :ref:`GraphemeFlag` grapheme_flags=264 **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`shaped_text_has_visible_chars` **(** :ref:`RID` shaped **)** |const| | + +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shaped_text_hit_test_grapheme` **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| | +-----------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`shaped_text_hit_test_position` **(** :ref:`RID` shaped, :ref:`float` coords **)** |const| | @@ -644,6 +646,30 @@ Only apply justification to the part of the text after the last tab. Apply justification to the trimmed line with ellipsis. +.. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`JustificationFlag` **JUSTIFICATION_SKIP_LAST_LINE** = ``32`` + +Do not apply justification to the last line of the paragraph. + +.. _class_TextServer_constant_JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS: + +.. rst-class:: classref-enumeration-constant + +:ref:`JustificationFlag` **JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS** = ``64`` + +Do not apply justification to the last line of the paragraph with visible characters (takes precedence over :ref:`JUSTIFICATION_SKIP_LAST_LINE`). + +.. _class_TextServer_constant_JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE: + +.. rst-class:: classref-enumeration-constant + +:ref:`JustificationFlag` **JUSTIFICATION_DO_NOT_SKIP_SINGLE_LINE** = ``128`` + +Always apply justification to the paragraphs with a single line (:ref:`JUSTIFICATION_SKIP_LAST_LINE` and :ref:`JUSTIFICATION_SKIP_LAST_LINE_WITH_VISIBLE_CHARS` are ignored). + .. rst-class:: classref-item-separator ---- @@ -3149,7 +3175,7 @@ Draw the outline of the shaped text into a canvas item at a given position, with .. rst-class:: classref-method -:ref:`float` **shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags=3 **)** +:ref:`float` **shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` justification_flags=3 **)** Adjusts text width to fit to specified width, returns new text width. @@ -3523,6 +3549,18 @@ Breaks text into words and returns array of character ranges. Use ``grapheme_fla ---- +.. _class_TextServer_method_shaped_text_has_visible_chars: + +.. rst-class:: classref-method + +:ref:`bool` **shaped_text_has_visible_chars** **(** :ref:`RID` shaped **)** |const| + +Returns ``true``, if text buffer contents any visible characters. + +.. rst-class:: classref-item-separator + +---- + .. _class_TextServer_method_shaped_text_hit_test_grapheme: .. rst-class:: classref-method diff --git a/classes/class_textserverextension.rst b/classes/class_textserverextension.rst index 747df3fb640..6db7070b4b0 100644 --- a/classes/class_textserverextension.rst +++ b/classes/class_textserverextension.rst @@ -308,7 +308,7 @@ Methods +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | void | :ref:`_shaped_text_draw_outline` **(** :ref:`RID` shaped, :ref:`RID` canvas, :ref:`Vector2` pos, :ref:`float` clip_l, :ref:`float` clip_r, :ref:`int` outline_size, :ref:`Color` color **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags **)** |virtual| | + | :ref:`float` | :ref:`_shaped_text_fit_to_width` **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` justification_flags **)** |virtual| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`float` | :ref:`_shaped_text_get_ascent` **(** :ref:`RID` shaped **)** |virtual| |const| | +-----------------------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -2368,7 +2368,7 @@ void **_shaped_text_draw_outline** **(** :ref:`RID` shaped, :ref:`RID .. rst-class:: classref-method -:ref:`float` **_shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` jst_flags **)** |virtual| +:ref:`float` **_shaped_text_fit_to_width** **(** :ref:`RID` shaped, :ref:`float` width, :ref:`JustificationFlag` justification_flags **)** |virtual| .. container:: contribute diff --git a/classes/class_thread.rst b/classes/class_thread.rst index 8c01342da07..175c80e7565 100644 --- a/classes/class_thread.rst +++ b/classes/class_thread.rst @@ -23,6 +23,16 @@ A unit of execution in a process. Can run methods on :ref:`Object` \ **Note:** Breakpoints won't break on code if it's running in a thread. This is a current limitation of the GDScript debugger. +\ **Warning:**\ + +To guarantee that the operating system is able to perform proper cleanup (no crashes, no deadlocks), these conditions must be met by the time a **Thread**'s reference count reaches zero and therefore it is destroyed: + +- It must not have any :ref:`Mutex` objects locked. + +- It must not be waiting on any :ref:`Semaphore` objects. + +- :ref:`wait_to_finish` should have been called on it. + .. rst-class:: classref-introduction-group Tutorials diff --git a/classes/class_window.rst b/classes/class_window.rst index 62112241dbc..1921ca44480 100644 --- a/classes/class_window.rst +++ b/classes/class_window.rst @@ -99,133 +99,145 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_color_override` **(** :ref:`StringName` name, :ref:`Color` color **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_constant_override` **(** :ref:`StringName` name, :ref:`int` constant **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_font_override` **(** :ref:`StringName` name, :ref:`Font` font **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_font_size_override` **(** :ref:`StringName` name, :ref:`int` font_size **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_icon_override` **(** :ref:`StringName` name, :ref:`Texture2D` texture **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`add_theme_stylebox_override` **(** :ref:`StringName` name, :ref:`StyleBox` stylebox **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`begin_bulk_theme_override` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`can_draw` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`child_controls_changed` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`end_bulk_theme_override` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2` | :ref:`get_contents_minimum_size` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_flag` **(** :ref:`Flags` flag **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`LayoutDirection` | :ref:`get_layout_direction` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_position_with_decorations` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Vector2i` | :ref:`get_size_with_decorations` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Color` | :ref:`get_theme_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_theme_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_theme_default_base_scale` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font` | :ref:`get_theme_default_font` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_theme_default_font_size` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Font` | :ref:`get_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`get_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`StyleBox` | :ref:`get_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`grab_focus` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_focus` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_color_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_constant_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_font_size_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_icon_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`has_theme_stylebox_override` **(** :ref:`StringName` name **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`hide` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_embedded` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_layout_rtl` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_maximize_allowed` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_using_font_oversampling` **(** **)** |const| | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`move_to_foreground` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup` **(** :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_centered` **(** :ref:`Vector2i` minsize=Vector2i(0, 0) **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_centered_clamped` **(** :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_centered_ratio` **(** :ref:`float` ratio=0.8 **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`popup_on_parent` **(** :ref:`Rect2i` parent_rect **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_color_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_constant_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_font_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_font_size_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_icon_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`remove_theme_stylebox_override` **(** :ref:`StringName` name **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`request_attention` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`reset_size` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_flag` **(** :ref:`Flags` flag, :ref:`bool` enabled **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ime_active` **(** :ref:`bool` active **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_ime_position` **(** :ref:`Vector2i` position **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_layout_direction` **(** :ref:`LayoutDirection` direction **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`set_use_font_oversampling` **(** :ref:`bool` enable **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`show` **(** **)** | - +-----------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_color_override` **(** :ref:`StringName` name, :ref:`Color` color **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_constant_override` **(** :ref:`StringName` name, :ref:`int` constant **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_font_override` **(** :ref:`StringName` name, :ref:`Font` font **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_font_size_override` **(** :ref:`StringName` name, :ref:`int` font_size **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_icon_override` **(** :ref:`StringName` name, :ref:`Texture2D` texture **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`add_theme_stylebox_override` **(** :ref:`StringName` name, :ref:`StyleBox` stylebox **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`begin_bulk_theme_override` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`can_draw` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`child_controls_changed` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`end_bulk_theme_override` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2` | :ref:`get_contents_minimum_size` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`get_flag` **(** :ref:`Flags` flag **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`LayoutDirection` | :ref:`get_layout_direction` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_position_with_decorations` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Vector2i` | :ref:`get_size_with_decorations` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Color` | :ref:`get_theme_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_theme_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_theme_default_base_scale` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font` | :ref:`get_theme_default_font` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_theme_default_font_size` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Font` | :ref:`get_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Texture2D` | :ref:`get_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`StyleBox` | :ref:`get_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`grab_focus` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_focus` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_color` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_color_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_constant` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_constant_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font_size` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_font_size_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_icon` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_icon_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_stylebox` **(** :ref:`StringName` name, :ref:`StringName` theme_type="" **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`has_theme_stylebox_override` **(** :ref:`StringName` name **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`hide` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_embedded` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_layout_rtl` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_maximize_allowed` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_using_font_oversampling` **(** **)** |const| | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`move_to_foreground` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup` **(** :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_centered` **(** :ref:`Vector2i` minsize=Vector2i(0, 0) **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_centered_clamped` **(** :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_centered_ratio` **(** :ref:`float` ratio=0.8 **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_exclusive` **(** :ref:`Node` from_node, :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_exclusive_centered` **(** :ref:`Node` from_node, :ref:`Vector2i` minsize=Vector2i(0, 0) **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_exclusive_centered_clamped` **(** :ref:`Node` from_node, :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_exclusive_centered_ratio` **(** :ref:`Node` from_node, :ref:`float` ratio=0.8 **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_exclusive_on_parent` **(** :ref:`Node` from_node, :ref:`Rect2i` parent_rect **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`popup_on_parent` **(** :ref:`Rect2i` parent_rect **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_color_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_constant_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_font_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_font_size_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_icon_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`remove_theme_stylebox_override` **(** :ref:`StringName` name **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`request_attention` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`reset_size` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_flag` **(** :ref:`Flags` flag, :ref:`bool` enabled **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ime_active` **(** :ref:`bool` active **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_ime_position` **(** :ref:`Vector2i` position **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_layout_direction` **(** :ref:`LayoutDirection` direction **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_unparent_when_invisible` **(** :ref:`bool` unparent **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`set_use_font_oversampling` **(** :ref:`bool` enable **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`show` **(** **)** | + +-----------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -1985,6 +1997,76 @@ Popups the **Window** centered inside its parent **Window** and sets its size as ---- +.. _class_Window_method_popup_exclusive: + +.. rst-class:: classref-method + +void **popup_exclusive** **(** :ref:`Node` from_node, :ref:`Rect2i` rect=Rect2i(0, 0, 0, 0) **)** + +Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup` on it. The dialog must have no current parent, otherwise the method fails. + +See also :ref:`set_unparent_when_invisible` and :ref:`Node.get_last_exclusive_window`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Window_method_popup_exclusive_centered: + +.. rst-class:: classref-method + +void **popup_exclusive_centered** **(** :ref:`Node` from_node, :ref:`Vector2i` minsize=Vector2i(0, 0) **)** + +Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered` on it. The dialog must have no current parent, otherwise the method fails. + +See also :ref:`set_unparent_when_invisible` and :ref:`Node.get_last_exclusive_window`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Window_method_popup_exclusive_centered_clamped: + +.. rst-class:: classref-method + +void **popup_exclusive_centered_clamped** **(** :ref:`Node` from_node, :ref:`Vector2i` minsize=Vector2i(0, 0), :ref:`float` fallback_ratio=0.75 **)** + +Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered_clamped` on it. The dialog must have no current parent, otherwise the method fails. + +See also :ref:`set_unparent_when_invisible` and :ref:`Node.get_last_exclusive_window`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Window_method_popup_exclusive_centered_ratio: + +.. rst-class:: classref-method + +void **popup_exclusive_centered_ratio** **(** :ref:`Node` from_node, :ref:`float` ratio=0.8 **)** + +Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_centered_ratio` on it. The dialog must have no current parent, otherwise the method fails. + +See also :ref:`set_unparent_when_invisible` and :ref:`Node.get_last_exclusive_window`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Window_method_popup_exclusive_on_parent: + +.. rst-class:: classref-method + +void **popup_exclusive_on_parent** **(** :ref:`Node` from_node, :ref:`Rect2i` parent_rect **)** + +Attempts to parent this dialog to the last exclusive window relative to ``from_node``, and then calls :ref:`popup_on_parent` on it. The dialog must have no current parent, otherwise the method fails. + +See also :ref:`set_unparent_when_invisible` and :ref:`Node.get_last_exclusive_window`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_method_popup_on_parent: .. rst-class:: classref-method @@ -2141,6 +2223,20 @@ Sets layout direction and text writing direction. Right-to-left layouts are nece ---- +.. _class_Window_method_set_unparent_when_invisible: + +.. rst-class:: classref-method + +void **set_unparent_when_invisible** **(** :ref:`bool` unparent **)** + +If ``unparent`` is ``true``, the window is automatically unparented when going invisible. + +\ **Note:** Make sure to keep a reference to the node, otherwise it will be orphaned. You also need to manually call :ref:`Node.queue_free` to free the window if it's not parented. + +.. rst-class:: classref-item-separator + +---- + .. _class_Window_method_set_use_font_oversampling: .. rst-class:: classref-method diff --git a/classes/class_workerthreadpool.rst b/classes/class_workerthreadpool.rst index a1d13987f03..f889dbd089b 100644 --- a/classes/class_workerthreadpool.rst +++ b/classes/class_workerthreadpool.rst @@ -83,21 +83,21 @@ Methods .. table:: :widths: auto - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`add_group_task` **(** :ref:`Callable` action, :ref:`int` elements, :ref:`int` tasks_needed=-1, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`add_task` **(** :ref:`Callable` action, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_group_processed_element_count` **(** :ref:`int` group_id **)** |const| | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_group_task_completed` **(** :ref:`int` group_id **)** |const| | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_task_completed` **(** :ref:`int` task_id **)** |const| | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`wait_for_group_task_completion` **(** :ref:`int` group_id **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | void | :ref:`wait_for_task_completion` **(** :ref:`int` task_id **)** | - +-------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_group_task` **(** :ref:`Callable` action, :ref:`int` elements, :ref:`int` tasks_needed=-1, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`add_task` **(** :ref:`Callable` action, :ref:`bool` high_priority=false, :ref:`String` description="" **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_group_processed_element_count` **(** :ref:`int` group_id **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_group_task_completed` **(** :ref:`int` group_id **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_task_completed` **(** :ref:`int` task_id **)** |const| | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | void | :ref:`wait_for_group_task_completion` **(** :ref:`int` group_id **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`wait_for_task_completion` **(** :ref:`int` task_id **)** | + +---------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -192,10 +192,16 @@ Pauses the thread that calls this method until the group task with the given ID .. rst-class:: classref-method -void **wait_for_task_completion** **(** :ref:`int` task_id **)** +:ref:`Error` **wait_for_task_completion** **(** :ref:`int` task_id **)** Pauses the thread that calls this method until the task with the given ID is completed. +Returns :ref:`@GlobalScope.OK` if the task could be successfully awaited. + +Returns :ref:`@GlobalScope.ERR_INVALID_PARAMETER` if a task with the passed ID does not exist (maybe because it was already awaited and disposed of). + +Returns :ref:`@GlobalScope.ERR_BUSY` if the call is made from another running task and, due to task scheduling, the task to await is at a lower level in the call stack and therefore can't progress. This is an advanced situation that should only matter when some tasks depend on others. + .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)`