diff options
Diffstat (limited to 'doc/classes')
100 files changed, 753 insertions, 449 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 9eeb69d824..ed404ea504 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -572,7 +572,8 @@ <return type="float" /> <param index="0" name="lin" type="float" /> <description> - Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). Example: + Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). + [b]Example:[/b] [codeblock] # "Slider" refers to a node that inherits Range such as HSlider or VSlider. # Its range must be configured to go from 0 to 1. @@ -841,7 +842,7 @@ <return type="PackedInt64Array" /> <param index="0" name="seed" type="int" /> <description> - Given a [param seed], returns a [PackedInt64Array] of size [code]2[/code], where its first element is the randomised [int] value, and the second element is the same as [param seed]. Passing the same [param seed] consistently returns the same array. + Given a [param seed], returns a [PackedInt64Array] of size [code]2[/code], where its first element is the randomized [int] value, and the second element is the same as [param seed]. Passing the same [param seed] consistently returns the same array. [b]Note:[/b] "Seed" here refers to the internal state of the pseudo random number generator, currently implemented as a 64 bit integer. [codeblock] var a = rand_from_seed(4) @@ -1465,6 +1466,24 @@ <constant name="INLINE_ALIGNMENT_TEXT_MASK" value="12" enum="InlineAlignment"> A bit mask for [code]INLINE_ALIGNMENT_TO_*[/code] alignment constants. </constant> + <constant name="EULER_ORDER_XYZ" value="0" enum="EulerOrder"> + Specifies that Euler angles should be in XYZ order. When composing, the order is X, Y, Z. When decomposing, the order is reversed, first Z, then Y, and X last. + </constant> + <constant name="EULER_ORDER_XZY" value="1" enum="EulerOrder"> + Specifies that Euler angles should be in XZY order. When composing, the order is X, Z, Y. When decomposing, the order is reversed, first Y, then Z, and X last. + </constant> + <constant name="EULER_ORDER_YXZ" value="2" enum="EulerOrder"> + Specifies that Euler angles should be in YXZ order. When composing, the order is Y, X, Z. When decomposing, the order is reversed, first Z, then X, and Y last. + </constant> + <constant name="EULER_ORDER_YZX" value="3" enum="EulerOrder"> + Specifies that Euler angles should be in YZX order. When composing, the order is Y, Z, X. When decomposing, the order is reversed, first X, then Z, and Y last. + </constant> + <constant name="EULER_ORDER_ZXY" value="4" enum="EulerOrder"> + Specifies that Euler angles should be in ZXY order. When composing, the order is Z, X, Y. When decomposing, the order is reversed, first Y, then X, and Z last. + </constant> + <constant name="EULER_ORDER_ZYX" value="5" enum="EulerOrder"> + Specifies that Euler angles should be in ZYX order. When composing, the order is Z, Y, X. When decomposing, the order is reversed, first X, then Y, and Z last. + </constant> <constant name="KEY_NONE" value="0" enum="Key"> Enum value which doesn't correspond to any key. This is used to initialize [enum Key] properties with a generic state. </constant> @@ -2487,7 +2506,8 @@ </constant> <constant name="OK" value="0" enum="Error"> Methods that return [enum Error] return [constant OK] when no error occurred. - Since [constant OK] has value 0, and all other error constants are positive integers, it can also be used in boolean checks. For example: + Since [constant OK] has value 0, and all other error constants are positive integers, it can also be used in boolean checks. + [b]Example:[/b] [codeblock] var error = method_that_returns_error() if error != OK: @@ -2648,7 +2668,8 @@ The property has no hint for the editor. </constant> <constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint"> - Hints that an [int] or [float] property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_less"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,or_greater,or_less"[/code]. + Hints that an [int] or [float] property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_less"[/code] to allow manual input going respectively above the max or below the min values. + [b]Example:[/b] [code]"-360,360,1,or_greater,or_less"[/code]. Additionally, other keywords can be included: [code]"exp"[/code] for exponential range editing, [code]"radians"[/code] for editing radian angles in degrees, [code]"degrees"[/code] to hint at an angle and [code]"hide_slider"[/code] to hide the slider. </constant> <constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint"> @@ -2722,7 +2743,8 @@ <constant name="PROPERTY_HINT_OBJECT_ID" value="24" enum="PropertyHint"> </constant> <constant name="PROPERTY_HINT_TYPE_STRING" value="25" enum="PropertyHint"> - Hints that a property represents a particular type. If a property is [constant TYPE_STRING], allows to set a type from the create dialog. If you need to create an [Array] to contain elements of a specific type, the [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code] for specifying [Resource] types. For example: + Hints that a property represents a particular type. If a property is [constant TYPE_STRING], allows to set a type from the create dialog. If you need to create an [Array] to contain elements of a specific type, the [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code] for specifying [Resource] types. + [b]Example:[/b] [codeblock] hint_string = "%s:" % [TYPE_INT] # Array of integers. hint_string = "%s:%s:" % [TYPE_ARRAY, TYPE_REAL] # Two-dimensional array of floats. @@ -2760,9 +2782,9 @@ </constant> <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="39" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_INT_IS_POINTER" value="41" enum="PropertyHint"> + <constant name="PROPERTY_HINT_INT_IS_POINTER" value="40" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_ARRAY_TYPE" value="40" enum="PropertyHint"> + <constant name="PROPERTY_HINT_ARRAY_TYPE" value="41" enum="PropertyHint"> </constant> <constant name="PROPERTY_HINT_LOCALE_ID" value="42" enum="PropertyHint"> Hints that a [String] property is a locale code. Editing it will show a locale dialog for picking language and country. @@ -2789,13 +2811,13 @@ The property is serialized and saved in the scene file (default). </constant> <constant name="PROPERTY_USAGE_EDITOR" value="4" enum="PropertyUsageFlags"> - The property is shown in the editor Inspector (default). + The property is shown in the [EditorInspector] (default). </constant> <constant name="PROPERTY_USAGE_CHECKABLE" value="8" enum="PropertyUsageFlags"> - The property can be checked in the editor inspector. + The property can be checked in the [EditorInspector]. </constant> <constant name="PROPERTY_USAGE_CHECKED" value="16" enum="PropertyUsageFlags"> - The property is checked in the editor inspector. + The property is checked in the [EditorInspector]. </constant> <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="32" enum="PropertyUsageFlags"> The property is a translatable string. @@ -2853,7 +2875,7 @@ <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="134217728" enum="PropertyUsageFlags"> </constant> <constant name="PROPERTY_USAGE_READ_ONLY" value="268435456" enum="PropertyUsageFlags"> - The property is read-only in the editor Inspector. + The property is read-only in the [EditorInspector]. </constant> <constant name="PROPERTY_USAGE_ARRAY" value="536870912" enum="PropertyUsageFlags"> The property is an array. diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index b5a1461876..4da9e41ca8 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -62,7 +62,7 @@ Sets autowrapping for the text in the dialog. </member> <member name="dialog_close_on_escape" type="bool" setter="set_close_on_escape" getter="get_close_on_escape" default="true"> - If [code]true[/code], the dialog will be hidden when the escape key ([constant @GlobalScope.KEY_ESCAPE]) is pressed. + If [code]true[/code], the dialog will be hidden when the escape key ([constant KEY_ESCAPE]) is pressed. </member> <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" default="true"> If [code]true[/code], the dialog is hidden when the OK button is pressed. You can set it to [code]false[/code] if you want to do e.g. input validation when receiving the [signal confirmed] signal, and handle hiding the dialog in your own logic. diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index bf5ac7fa9e..9efd3ac939 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -217,7 +217,7 @@ </member> <member name="current_animation" type="String" setter="set_current_animation" getter="get_current_animation" default=""""> The key of the currently playing animation. If no animation is playing, the property's value is an empty string. Changing this value does not restart the animation. See [method play] for more information on playing animations. - [b]Note:[/b] while this property appears in the inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation]. + [b]Note:[/b] While this property appears in the Inspector, it's not meant to be edited, and it's not saved in the scene. This property is mainly used to get the currently playing animation, and internally for animation playback tracks. For more information, see [Animation]. </member> <member name="current_animation_length" type="float" setter="" getter="get_current_animation_length"> The length (in seconds) of the currently playing animation. diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 0f76639caf..2ec37651f7 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -272,6 +272,7 @@ array.Fill(0); // Initialize the 10 elements to 0. [/csharp] [/codeblocks] + [b]Note:[/b] If [param value] is of a reference type ([Object]-derived, [Array], [Dictionary], etc.) then the array is filled with the references to the same object, i.e. no duplicates are created. </description> </method> <method name="filter" qualifiers="const"> @@ -316,13 +317,13 @@ <method name="get_typed_builtin" qualifiers="const"> <return type="int" /> <description> - Returns the [code]TYPE[/code] constant for a typed array. If the [Array] is not typed, returns [constant @GlobalScope.TYPE_NIL]. + Returns the [enum Variant.Type] constant for a typed array. If the [Array] is not typed, returns [constant TYPE_NIL]. </description> </method> <method name="get_typed_class_name" qualifiers="const"> <return type="StringName" /> <description> - Returns a class name of a typed [Array] of type [constant @GlobalScope.TYPE_OBJECT]. + Returns a class name of a typed [Array] of type [constant TYPE_OBJECT]. </description> </method> <method name="get_typed_script" qualifiers="const"> @@ -352,7 +353,6 @@ GD.Print(arr.Contains("7")); // False [/csharp] [/codeblocks] - [b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows: [codeblocks] [gdscript] @@ -542,7 +542,7 @@ <param index="1" name="class_name" type="StringName" /> <param index="2" name="script" type="Variant" /> <description> - Makes the [Array] typed. The [param type] should be one of the [@GlobalScope] [code]TYPE[/code] constants. [param class_name] is optional and can only be provided for [constant @GlobalScope.TYPE_OBJECT]. [param script] can only be provided if [param class_name] is not empty. + Makes the [Array] typed. The [param type] should be one of the [enum Variant.Type] constants. [param class_name] is optional and can only be provided for [constant TYPE_OBJECT]. [param script] can only be provided if [param class_name] is not empty. The method fails if an array is already typed. </description> </method> diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 47e1f85c97..638934bc9e 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -68,6 +68,9 @@ <member name="shortcut" type="Shortcut" setter="set_shortcut" getter="get_shortcut"> [Shortcut] associated to the button. </member> + <member name="shortcut_feedback" type="bool" setter="set_shortcut_feedback" getter="is_shortcut_feedback"> + If [code]true[/code], the button will appear pressed when its shortcut is activated. If [code]false[/code] and [member toggle_mode] is [code]false[/code], the shortcut will activate the button without appearing to press the button. + </member> <member name="shortcut_in_tooltip" type="bool" setter="set_shortcut_in_tooltip" getter="is_shortcut_in_tooltip_enabled"> If [code]true[/code], the button will add information about its shortcut in the tooltip. </member> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 652d6d2407..acc2fd34dd 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -70,7 +70,7 @@ <param index="0" name="euler" type="Vector3" /> <param index="1" name="order" type="int" default="2" /> <description> - Constructs a pure rotation Basis matrix from Euler angles in the specified Euler rotation order. By default, use YXZ order (most common). + Constructs a pure rotation Basis matrix from Euler angles in the specified Euler rotation order. By default, use YXZ order (most common). See the [enum EulerOrder] enum for possible values. </description> </method> <method name="from_scale" qualifiers="static"> @@ -197,24 +197,6 @@ </member> </members> <constants> - <constant name="EULER_ORDER_XYZ" value="0"> - Euler angle composing/decomposing order where X component is first, then Y, then Z. - </constant> - <constant name="EULER_ORDER_XZY" value="1"> - Euler angle composing/decomposing order where X component is first, then Z, then Y. - </constant> - <constant name="EULER_ORDER_YXZ" value="2"> - Euler angle composing/decomposing order where Y component is first, then X, then Z. - </constant> - <constant name="EULER_ORDER_YZX" value="3"> - Euler angle composing/decomposing order where Y component is first, then Z, then X. - </constant> - <constant name="EULER_ORDER_ZXY" value="4"> - Euler angle composing/decomposing order where Z component is first, then X, then Y. - </constant> - <constant name="EULER_ORDER_ZYX" value="5"> - Euler angle composing/decomposing order where Z component is first, then Y, then X. - </constant> <constant name="IDENTITY" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)"> The identity basis, with no rotation or scaling applied. This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#. diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml index b3fa55f154..e9774ef485 100644 --- a/doc/classes/BitMap.xml +++ b/doc/classes/BitMap.xml @@ -12,7 +12,7 @@ <method name="convert_to_image" qualifiers="const"> <return type="Image" /> <description> - Returns an image of the same size as the bitmap and with a [enum Image.Format] of type [code]FORMAT_L8[/code]. [code]true[/code] bits of the bitmap are being converted into white pixels, and [code]false[/code] bits into black. + Returns an image of the same size as the bitmap and with a [enum Image.Format] of type [constant Image.FORMAT_L8]. [code]true[/code] bits of the bitmap are being converted into white pixels, and [code]false[/code] bits into black. </description> </method> <method name="create"> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index e78cdfc951..d2c9a77486 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -11,7 +11,7 @@ func _ready(): var button = Button.new() button.text = "Click me" - button.connect("pressed", self, "_button_pressed") + button.pressed.connect(self._button_pressed) add_child(button) func _button_pressed(): @@ -22,7 +22,7 @@ { var button = new Button(); button.Text = "Click me"; - button.Connect("pressed", this, nameof(ButtonPressed)); + button.Pressed += ButtonPressed; AddChild(button); } @@ -42,7 +42,7 @@ </tutorials> <members> <member name="alignment" type="int" setter="set_text_alignment" getter="get_text_alignment" enum="HorizontalAlignment" default="1"> - Text alignment policy for the button's text, use one of the [enum @GlobalScope.HorizontalAlignment] constants. + Text alignment policy for the button's text, use one of the [enum HorizontalAlignment] constants. </member> <member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false"> When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. @@ -58,7 +58,7 @@ To edit margin and spacing of the icon, use [theme_item h_separation] theme property and [code]content_margin_*[/code] properties of the used [StyleBox]es. </member> <member name="icon_alignment" type="int" setter="set_icon_alignment" getter="get_icon_alignment" enum="HorizontalAlignment" default="0"> - Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum @GlobalScope.HorizontalAlignment] constants as the text alignment. If centered, text will draw on top of the icon. + Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum HorizontalAlignment] constants as the text alignment. If centered, text will draw on top of the icon. </member> <member name="language" type="String" setter="set_language" getter="get_language" default=""""> Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml index 6e4ee0380e..626405bc8e 100644 --- a/doc/classes/CallbackTweener.xml +++ b/doc/classes/CallbackTweener.xml @@ -14,7 +14,8 @@ <return type="CallbackTweener" /> <param index="0" name="delay" type="float" /> <description> - Makes the callback call delayed by given time in seconds. Example: + Makes the callback call delayed by given time in seconds. + [b]Example:[/b] [codeblock] var tween = get_tree().create_tween() tween.tween_callback(queue_free).set_delay(2) #this will call queue_free() after 2 seconds diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index b2d3e5cfdb..a2859552a9 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -114,7 +114,7 @@ <param index="2" name="src_rect" type="Rect2" /> <param index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> <description> - Draws a textured rectangle region of the font texture with LCD sub-pixel anti-aliasing at a given position, optionally modulated by a color. + Draws a textured rectangle region of the font texture with LCD subpixel anti-aliasing at a given position, optionally modulated by a color. Texture is drawn using the following blend operation, blend mode of the [CanvasItemMaterial] is ignored: [codeblock] dst.r = texture.r * modulate.r * modulate.a + dst.r * (1.0 - texture.r * modulate.a); @@ -416,7 +416,7 @@ <method name="get_global_transform" qualifiers="const"> <return type="Transform2D" /> <description> - Returns the global transform matrix of this item. + Returns the global transform matrix of this item, i.e. the combined transform up to the topmost [CanvasItem] node. The topmost item is a [CanvasItem] that either has no parent, has non-[CanvasItem] parent or it has [member top_level] enabled. </description> </method> <method name="get_global_transform_with_canvas" qualifiers="const"> @@ -456,6 +456,13 @@ Returns this item's transform in relation to the viewport. </description> </method> + <method name="get_visibility_layer_bit" qualifiers="const"> + <return type="bool" /> + <param index="0" name="layer" type="int" /> + <description> + Returns an individual bit on the rendering visibility layer. + </description> + </method> <method name="get_world_2d" qualifiers="const"> <return type="World2D" /> <description> @@ -527,6 +534,14 @@ If [param enable] is [code]true[/code], this node will receive [constant NOTIFICATION_TRANSFORM_CHANGED] when its global transform changes. </description> </method> + <method name="set_visibility_layer_bit"> + <return type="void" /> + <param index="0" name="layer" type="int" /> + <param index="1" name="enabled" type="bool" /> + <description> + Set/clear individual bits on the rendering visibility layer. This simplifies editing this [CanvasItem]'s visibility layer. + </description> + </method> <method name="show"> <return type="void" /> <description> @@ -565,6 +580,9 @@ <member name="use_parent_material" type="bool" setter="set_use_parent_material" getter="get_use_parent_material" default="false"> If [code]true[/code], the parent [CanvasItem]'s [member material] property is used as this one's material. </member> + <member name="visibility_layer" type="int" setter="set_visibility_layer" getter="get_visibility_layer" default="1"> + The rendering layer in which this [CanvasItem] is rendered by [Viewport] nodes. A [Viewport] will render a [CanvasItem] if it and all its parents share a layer with the [Viewport]'s canvas cull mask. + </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> If [code]true[/code], this [CanvasItem] is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]). [b]Note:[/b] For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index 2f8e1a7bb8..0111ef804e 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -152,7 +152,7 @@ </member> <member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="1.0"> Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction]. - As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping. + As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], so it will be able to detach from the ground when jumping. </member> <member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true"> If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still. diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index 6a1975d40f..309e2231a4 100644 --- a/doc/classes/CharacterBody3D.xml +++ b/doc/classes/CharacterBody3D.xml @@ -137,7 +137,7 @@ </member> <member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="0.1"> Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction]. - As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping. + As long as the snapping vector is in contact with the ground and the body moves against [member up_direction], the body will remain attached to the surface. Snapping is not applied if the body moves along [member up_direction], so it will be able to detach from the ground when jumping. </member> <member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="true"> If [code]true[/code], the body will not slide on slopes when calling [method move_and_slide] when the body is standing still. diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index ca482a39e0..e7ef5fb289 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -4,7 +4,7 @@ Multiline text control intended for editing code. </brief_description> <description> - CodeEdit is a specialised [TextEdit] designed for editing plain text code files. It contains a bunch of features commonly found in code editors such as line numbers, line folding, code completion, indent management and string / comment management. + CodeEdit is a specialized [TextEdit] designed for editing plain text code files. It contains a bunch of features commonly found in code editors such as line numbers, line folding, code completion, indent management and string / comment management. [b]Note:[/b] By default [CodeEdit] always use left-to-right text direction to correctly display source code. </description> <tutorials> @@ -616,8 +616,8 @@ <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)"> Sets the font [Color] when [member TextEdit.editable] is disabled. </theme_item> - <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> - Sets the [Color] of the selected text. [member TextEdit.override_selected_font_color] has to be enabled. + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> + Sets the [Color] of the selected text. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored. </theme_item> <theme_item name="line_length_guideline_color" data_type="color" type="Color" default="Color(0.3, 0.5, 0.8, 0.1)"> [Color] of the main line length guideline, secondary guidelines will have 50% alpha applied. diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index a11d7157f1..90fbdcc622 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -141,17 +141,6 @@ [/codeblocks] </description> </method> - <method name="find_named_color" qualifiers="static"> - <return type="int" /> - <param index="0" name="name" type="String" /> - <description> - Returns the index of a named color. Use [method get_named_color] to get the actual color. - [codeblock] - var idx = Color.find_named_color("khaki") - modulate = Color.get_named_color(idx) - [/codeblock] - </description> - </method> <method name="from_hsv" qualifiers="static"> <return type="Color" /> <param index="0" name="h" type="float" /> @@ -208,27 +197,7 @@ <description> Returns the luminance of the color in the [code][0.0, 1.0][/code] range. This is useful when determining light or dark color. Colors with a luminance smaller than 0.5 can be generally considered dark. - [b]Note:[/b] [method get_luminance] relies on the colour being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method srgb_to_linear] to convert it to the linear color space first. - </description> - </method> - <method name="get_named_color" qualifiers="static"> - <return type="Color" /> - <param index="0" name="idx" type="int" /> - <description> - Returns a named color with the given index. You can get the index from [method find_named_color] or iteratively from [method get_named_color_count]. - </description> - </method> - <method name="get_named_color_count" qualifiers="static"> - <return type="int" /> - <description> - Returns the number of available named colors. - </description> - </method> - <method name="get_named_color_name" qualifiers="static"> - <return type="String" /> - <param index="0" name="idx" type="int" /> - <description> - Returns the name of a color with the given index. You can get the index from [method find_named_color] or iteratively from [method get_named_color_count]. + [b]Note:[/b] [method get_luminance] relies on the color being in the linear color space to return an accurate relative luminance value. If the color is in the sRGB color space, use [method srgb_to_linear] to convert it to the linear color space first. </description> </method> <method name="hex" qualifiers="static"> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index cd1d0b016d..2b287d7546 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -55,26 +55,38 @@ </method> </methods> <members> + <member name="can_add_swatches" type="bool" setter="set_can_add_swatches" getter="are_swatches_enabled" default="true"> + If [code]true[/code], it's possible to add presets under Swatches. If [code]false[/code], the button to add presets is disabled. + </member> <member name="color" type="Color" setter="set_pick_color" getter="get_pick_color" default="Color(1, 1, 1, 1)"> The currently selected color. </member> <member name="color_mode" type="int" setter="set_color_mode" getter="get_color_mode" enum="ColorPicker.ColorModeType" default="0"> The currently selected color mode. See [enum ColorModeType]. </member> + <member name="color_modes_visible" type="bool" setter="set_modes_visible" getter="are_modes_visible" default="true"> + If [code]true[/code], the color mode buttons are visible. + </member> <member name="deferred_mode" type="bool" setter="set_deferred_mode" getter="is_deferred_mode" default="false"> If [code]true[/code], the color will apply only after the user releases the mouse button, otherwise it will apply immediately even in mouse motion event (which can cause performance issues). </member> <member name="edit_alpha" type="bool" setter="set_edit_alpha" getter="is_editing_alpha" default="true"> If [code]true[/code], shows an alpha channel slider (opacity). </member> + <member name="hex_visible" type="bool" setter="set_hex_visible" getter="is_hex_visible" default="true"> + If [code]true[/code], the hex color code input field is visible. + </member> <member name="picker_shape" type="int" setter="set_picker_shape" getter="get_picker_shape" enum="ColorPicker.PickerShapeType" default="0"> The shape of the color space view. See [enum PickerShapeType]. </member> - <member name="presets_enabled" type="bool" setter="set_presets_enabled" getter="are_presets_enabled" default="true"> - If [code]true[/code], the "add preset" button is enabled. - </member> <member name="presets_visible" type="bool" setter="set_presets_visible" getter="are_presets_visible" default="true"> - If [code]true[/code], saved color presets are visible. + If [code]true[/code], the Swatches and Recent Colors presets are visible. + </member> + <member name="sampler_visible" type="bool" setter="set_sampler_visible" getter="is_sampler_visible" default="true"> + If [code]true[/code], the color sampler and color preview are visible. + </member> + <member name="sliders_visible" type="bool" setter="set_sliders_visible" getter="are_sliders_visible" default="true"> + If [code]true[/code], the color sliders are visible. </member> <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" overrides="BoxContainer" default="true" /> </members> @@ -125,6 +137,9 @@ <constant name="SHAPE_OKHSL_CIRCLE" value="3" enum="PickerShapeType"> HSL OK Color Model circle color space. </constant> + <constant name="SHAPE_NONE" value="4" enum="PickerShapeType"> + The color space shape and the shape select button are hidden. Can't be selected from the shapes popup. + </constant> </constants> <theme_items> <theme_item name="h_width" data_type="constant" type="int" default="30"> @@ -151,6 +166,9 @@ <theme_item name="color_hue" data_type="icon" type="Texture2D"> Custom texture for the hue selection slider on the right. </theme_item> + <theme_item name="color_okhsl_hue" data_type="icon" type="Texture2D"> + Custom texture for the H slider in the OKHSL color mode. + </theme_item> <theme_item name="expanded_arrow" data_type="icon" type="Texture2D"> The icon for color preset drop down menu when expanded. </theme_item> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index 7ba53f852b..4e60df6b96 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -163,7 +163,7 @@ <param index="0" name="path" type="String" /> <description> Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="load_encrypted"> @@ -172,7 +172,7 @@ <param index="1" name="key" type="PackedByteArray" /> <description> Loads the encrypted config file specified as a parameter, using the provided [param key] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="load_encrypted_pass"> @@ -181,7 +181,7 @@ <param index="1" name="password" type="String" /> <description> Loads the encrypted config file specified as a parameter, using the provided [param password] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="parse"> @@ -189,7 +189,7 @@ <param index="0" name="data" type="String" /> <description> Parses the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on. - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="save"> @@ -197,7 +197,7 @@ <param index="0" name="path" type="String" /> <description> Saves the contents of the [ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure. - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="save_encrypted"> @@ -206,7 +206,7 @@ <param index="1" name="key" type="PackedByteArray" /> <description> Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param key] to encrypt it. The output file uses an INI-style structure. - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="save_encrypted_pass"> @@ -215,7 +215,7 @@ <param index="1" name="password" type="String" /> <description> Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [param password] to encrypt it. The output file uses an INI-style structure. - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="set_value"> diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index d4c503857d..48b4df9126 100644 --- a/doc/classes/ConfirmationDialog.xml +++ b/doc/classes/ConfirmationDialog.xml @@ -8,10 +8,10 @@ To get cancel action, you can use: [codeblocks] [gdscript] - get_cancel().connect("pressed", self, "cancelled") + get_cancel_button().pressed.connect(self.cancelled) [/gdscript] [csharp] - GetCancel().Connect("pressed", this, nameof(Cancelled)); + GetCancelButton().Pressed += Cancelled; [/csharp] [/codeblocks] </description> diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml index a13e1598b2..0e1ef02573 100644 --- a/doc/classes/Container.xml +++ b/doc/classes/Container.xml @@ -14,14 +14,14 @@ <method name="_get_allowed_size_flags_horizontal" qualifiers="virtual const"> <return type="PackedInt32Array" /> <description> - Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock. + Implement to return a list of allowed horizontal [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed. </description> </method> <method name="_get_allowed_size_flags_vertical" qualifiers="virtual const"> <return type="PackedInt32Array" /> <description> - Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the inspector dock. + Implement to return a list of allowed vertical [enum Control.SizeFlags] for child nodes. This doesn't technically prevent the usages of any other size flags, if your implementation requires that. This only limits the options available to the user in the Inspector dock. [b]Note:[/b] Having no size flags is equal to having [constant Control.SIZE_SHRINK_BEGIN]. As such, this value is always implicitly allowed. </description> </method> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 91e9b65a8a..e1dd2819b2 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -12,7 +12,7 @@ Call [method accept_event] so no other node receives the event. Once you accept an input, it becomes handled so [method Node._unhandled_input] will not process it. Only one [Control] node can be in focus. Only the node in focus will receive events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus. Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. - [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the inspector. + [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the Inspector. [b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class. </description> <tutorials> @@ -110,7 +110,7 @@ <param index="0" name="event" type="InputEvent" /> <description> Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See [method accept_event]. - Example: clicking a control. + [b]Example usage for clicking a control:[/b] [codeblocks] [gdscript] func _gui_input(event): @@ -159,7 +159,7 @@ The returned node will be added as child to a [PopupPanel], so you should only provide the contents of that panel. That [PopupPanel] can be themed using [method Theme.set_stylebox] for the type [code]"TooltipPanel"[/code] (see [member tooltip_text] for an example). [b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member custom_minimum_size] to some non-zero value. [b]Note:[/b] The node (and any relevant children) should be [member CanvasItem.visible] when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. - Example of usage with a custom-constructed node: + [b]Example of usage with a custom-constructed node:[/b] [codeblocks] [gdscript] func _make_custom_tooltip(for_text): @@ -176,7 +176,7 @@ } [/csharp] [/codeblocks] - Example of usage with a custom scene instance: + [b]Example of usage with a custom scene instance:[/b] [codeblocks] [gdscript] func _make_custom_tooltip(for_text): @@ -201,7 +201,7 @@ <param index="1" name="text" type="String" /> <description> User defined BiDi algorithm override function. - Returns [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [param text] without overlaps. BiDi algorithm will be used on each range separately. + Returns an [Array] of [Vector2i] text ranges, in the left-to-right order. Ranges should cover full source [param text] without overlaps. BiDi algorithm will be used on each range separately. </description> </method> <method name="accept_event"> @@ -422,7 +422,7 @@ <description> Returns the position of this [Control] in global screen coordinates (i.e. taking window position into account). Mostly useful for editor plugins. Equals to [member global_position] if the window is embedded (see [member Viewport.gui_embed_subwindows]). - Example usage for showing a popup: + [b]Example usage for showing a popup:[/b] [codeblock] popup_menu.position = get_screen_position() + get_local_mouse_position() popup_menu.reset_size() @@ -528,7 +528,7 @@ <param index="0" name="at_position" type="Vector2" default="Vector2(0, 0)" /> <description> Returns the tooltip text [param at_position] in local coordinates, which will typically appear when the cursor is resting over this control. By default, it returns [member tooltip_text]. - [b]Note:[/b] This method can be overridden to customise its behaviour. If this method returns an empty [String], no tooltip is displayed. + [b]Note:[/b] This method can be overridden to customize its behavior. If this method returns an empty [String], no tooltip is displayed. </description> </method> <method name="grab_click_focus"> @@ -916,7 +916,7 @@ <param index="2" name="margin" type="int" default="0" /> <description> Sets the offsets to a [param preset] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor. - Use parameter [param resize_mode] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [code]PRESET_LEFT_WIDE[/code]. + Use parameter [param resize_mode] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [constant PRESET_LEFT_WIDE]. Use parameter [param margin] to determine the gap between the [Control] and the edges. </description> </method> @@ -979,23 +979,23 @@ The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard, gamepad, and mouse signals. </member> <member name="focus_neighbor_bottom" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath("")"> - Tells Godot which node it should give focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the [code]ui_down[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. + Tells Godot which node it should give focus to if the user presses the down arrow on the keyboard or down on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_down] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. </member> <member name="focus_neighbor_left" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath("")"> - Tells Godot which node it should give focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [code]ui_left[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one. + Tells Godot which node it should give focus to if the user presses the left arrow on the keyboard or left on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_left] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the left of this one. </member> <member name="focus_neighbor_right" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath("")"> - Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [code]ui_right[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. + Tells Godot which node it should give focus to if the user presses the right arrow on the keyboard or right on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_right] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. </member> <member name="focus_neighbor_top" type="NodePath" setter="set_focus_neighbor" getter="get_focus_neighbor" default="NodePath("")"> - Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [code]ui_top[/code] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. + Tells Godot which node it should give focus to if the user presses the top arrow on the keyboard or top on a gamepad by default. You can change the key by editing the [member ProjectSettings.input/ui_up] input action. The node must be a [Control]. If this property is not set, Godot will give focus to the closest [Control] to the bottom of this one. </member> <member name="focus_next" type="NodePath" setter="set_focus_next" getter="get_focus_next" default="NodePath("")"> - Tells Godot which node it should give focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the [code]ui_focus_next[/code] input action. + Tells Godot which node it should give focus to if the user presses [kbd]Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_next] input action. If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. </member> <member name="focus_previous" type="NodePath" setter="set_focus_previous" getter="get_focus_previous" default="NodePath("")"> - Tells Godot which node it should give focus to if the user presses [kbd]Shift + Tab[/kbd] on a keyboard by default. You can change the key by editing the [code]ui_focus_prev[/code] input action. + Tells Godot which node it should give focus to if the user presses [kbd]Shift + Tab[/kbd] on a keyboard by default. You can change the key by editing the [member ProjectSettings.input/ui_focus_prev] input action. If this property is not set, Godot will select a "best guess" based on surrounding nodes in the scene tree. </member> <member name="global_position" type="Vector2" setter="_set_global_position" getter="get_global_position"> @@ -1019,7 +1019,7 @@ </member> <member name="mouse_force_pass_scroll_events" type="bool" setter="set_force_pass_scroll_events" getter="is_force_pass_scroll_events" default="true"> When enabled, scroll wheel events processed by [method _gui_input] will be passed to the parent control even if [member mouse_filter] is set to [constant MOUSE_FILTER_STOP]. As it defaults to true, this allows nested scrollable containers to work out of the box. - You should disable it on the root of your UI if you do not want scroll events to go to the [code]_unhandled_input[/code] processing. + You should disable it on the root of your UI if you do not want scroll events to go to the [method Node._unhandled_input] processing. </member> <member name="offset_bottom" type="float" setter="set_offset" getter="get_offset" default="0.0"> Distance between the node's bottom edge and its parent control, based on [member anchor_bottom]. @@ -1076,7 +1076,7 @@ [b]Note:[/b] Theme items are looked for in the tree order, from branch to root, where each [Control] node is checked for its [member theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last. </member> <member name="tooltip_text" type="String" setter="set_tooltip_text" getter="get_tooltip_text" default=""""> - The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. The time required for the tooltip to appear can be changed with the [code]gui/timers/tooltip_delay_sec[/code] option in Project Settings. See also [method get_tooltip]. + The default tooltip text. The tooltip appears when the user's mouse cursor stays idle over this control for a few moments, provided that the [member mouse_filter] property is not [constant MOUSE_FILTER_IGNORE]. The time required for the tooltip to appear can be changed with the [member ProjectSettings.gui/timers/tooltip_delay_sec] option. See also [method get_tooltip]. The tooltip popup will use either a default implementation, or a custom one that you can provide by overriding [method _make_custom_tooltip]. The default tooltip includes a [PopupPanel] and [Label] whose theme properties can be customized using [Theme] methods with the [code]"TooltipPanel"[/code] and [code]"TooltipLabel"[/code] respectively. For example: [codeblocks] [gdscript] @@ -1330,7 +1330,7 @@ The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. These events are automatically marked as handled, and they will not propagate further to other controls. This also results in blocking signals in other controls. </constant> <constant name="MOUSE_FILTER_PASS" value="1" enum="MouseFilter"> - The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to `_unhandled_input` for further processing. + The control will receive mouse button input events through [method _gui_input] if clicked on. And the control will receive the [signal mouse_entered] and [signal mouse_exited] signals. If this control does not handle the event, the parent control (if any) will be considered, and so on until there is no more parent control to potentially handle it. This also allows signals to fire in other controls. If no control handled it, the event will be passed to [method Node._unhandled_input] for further processing. </constant> <constant name="MOUSE_FILTER_IGNORE" value="2" enum="MouseFilter"> The control will not receive mouse button input events through [method _gui_input]. The control will also not receive the [signal mouse_entered] nor [signal mouse_exited] signals. This will not block other controls from receiving these events or firing the signals. Ignored events will not be handled automatically. diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index 20b9dafd0d..d5864f30fa 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -30,7 +30,7 @@ <method name="clean_dupes"> <return type="void" /> <description> - Removes points that are closer than [code]CMP_EPSILON[/code] (0.00001) units to their neighbor on the curve. + Removes duplicate points, i.e. points that are less than 0.00001 units (engine epsilon value) away from their neighbor on the curve. </description> </method> <method name="clear_points"> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index cc4124d084..ccdf085319 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -102,6 +102,22 @@ Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough). </description> </method> + <method name="sample_baked_with_rotation" qualifiers="const"> + <return type="Transform2D" /> + <param index="0" name="offset" type="float" /> + <param index="1" name="cubic" type="bool" default="false" /> + <param index="2" name="loop" type="bool" default="true" /> + <param index="3" name="lookahead" type="float" default="4.0" /> + <description> + Similar to [method sample_baked], but returns [Transform2D] that includes a rotation along the curve. Returns empty transform if length of the curve is [code]0[/code]. + Use [param loop] to smooth the tangent at the end of the curve. [param lookahead] defines the distance to a nearby point for calculating the tangent vector. + [codeblock] + var transform = curve.sample_baked_with_rotation(offset) + position = transform.get_origin() + rotation = transform.get_rotation() + [/codeblock] + </description> + </method> <method name="samplef" qualifiers="const"> <return type="Vector2" /> <param index="0" name="fofs" type="float" /> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index ac1f63af56..9842288d35 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -339,7 +339,7 @@ <return type="Variant" /> <param index="0" name="key" type="Variant" /> <description> - Retunrs a value at the given [param key] or [code]null[/code] and error if the key does not exist. For safe access, use [method get] or [method has]. + Returns a value at the given [param key] or [code]null[/code] and error if the key does not exist. For safe access, use [method get] or [method has]. </description> </operator> </operators> diff --git a/doc/classes/DirAccess.xml b/doc/classes/DirAccess.xml index 7d1612e59c..181d2eb485 100644 --- a/doc/classes/DirAccess.xml +++ b/doc/classes/DirAccess.xml @@ -70,7 +70,7 @@ <param index="0" name="to_dir" type="String" /> <description> Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]). - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="copy"> @@ -81,7 +81,7 @@ <description> Copies the [param from] file to the [param to] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. If [param chmod_flags] is different than [code]-1[/code], the Unix permissions for the destination path will be set to the provided value, if available on the current operating system. - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="copy_absolute" qualifiers="static"> @@ -221,7 +221,7 @@ <param index="0" name="path" type="String" /> <description> Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]). - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="make_dir_absolute" qualifiers="static"> @@ -236,7 +236,7 @@ <param index="0" name="path" type="String" /> <description> Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path. - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="make_dir_recursive_absolute" qualifiers="static"> @@ -260,7 +260,7 @@ <description> Permanently deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. If you don't want to delete the file/directory permanently, use [method OS.move_to_trash] instead. - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="remove_absolute" qualifiers="static"> @@ -276,7 +276,7 @@ <param index="1" name="to" type="String" /> <description> Renames (move) the [param from] file or directory to the [param to] destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten. - Returns one of the [enum Error] code constants ([code]OK[/code] on success). + Returns one of the [enum Error] code constants ([constant OK] on success). </description> </method> <method name="rename_absolute" qualifiers="static"> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 85d9fd34ca..113987bb52 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="DisplayServer" inherits="Object" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> + Singleton for window management functions. </brief_description> <description> + [DisplayServer] handles everything related to window management. This is separated from [OS] as a single operating system may support multiple display servers. + [b]Headless mode:[/b] Starting the engine with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url] disables all rendering and window management functions. Most functions from [DisplayServer] will return dummy values in this case. </description> <tutorials> </tutorials> @@ -16,8 +19,8 @@ <method name="clipboard_get_primary" qualifiers="const"> <return type="String" /> <description> - Returns the user's primary clipboard as a string if possible. - [b]Note:[/b] This method is only implemented on Linux. + Returns the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard as a string if possible. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. + [b]Note:[/b] This method is only implemented on Linux (X11). </description> </method> <method name="clipboard_has" qualifiers="const"> @@ -37,22 +40,14 @@ <return type="void" /> <param index="0" name="clipboard_primary" type="String" /> <description> - Sets the user's primary clipboard content to the given string. - [b]Note:[/b] This method is only implemented on Linux. - </description> - </method> - <method name="create_sub_window"> - <return type="int" /> - <param index="0" name="mode" type="int" enum="DisplayServer.WindowMode" /> - <param index="1" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode" /> - <param index="2" name="flags" type="int" /> - <param index="3" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" /> - <description> + Sets the user's [url=https://unix.stackexchange.com/questions/139191/whats-the-difference-between-primary-selection-and-clipboard-buffer]primary[/url] clipboard content to the given string. This is the clipboard that is set when the user selects text in any application, rather than when pressing [kbd]Ctrl + C[/kbd]. The clipboard data can then be pasted by clicking the middle mouse button in any application that supports the primary clipboard mechanism. + [b]Note:[/b] This method is only implemented on Linux (X11). </description> </method> <method name="cursor_get_shape" qualifiers="const"> <return type="int" enum="DisplayServer.CursorShape" /> <description> + Returns the default mouse cursor shape set by [method cursor_set_shape]. </description> </method> <method name="cursor_set_custom_image"> @@ -61,18 +56,14 @@ <param index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0" /> <param index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" /> <description> + Sets a custom mouse cursor image for the defined [param shape]. This means the user's operating system and mouse cursor theme will no longer influence the mouse cursor's appearance. The image must be [code]256x256[/code] or smaller for correct appearance. [param hotspot] can optionally be set to define the area where the cursor will click. By default, [param hotspot] is set to [code]Vector2(0, 0)[/code], which is the top-left corner of the image. See also [method cursor_set_shape]. </description> </method> <method name="cursor_set_shape"> <return type="void" /> <param index="0" name="shape" type="int" enum="DisplayServer.CursorShape" /> <description> - </description> - </method> - <method name="delete_sub_window"> - <return type="void" /> - <param index="0" name="window_id" type="int" /> - <description> + Sets the default mouse cursor shape. The cursor's appearance will vary depending on the user's operating system and mouse cursor theme. See also [method cursor_get_shape] and [method cursor_set_custom_image]. </description> </method> <method name="dialog_input_text"> @@ -82,6 +73,8 @@ <param index="2" name="existing_text" type="String" /> <param index="3" name="callback" type="Callable" /> <description> + Shows a text input dialog which uses the operating system's native look-and-feel. [param callback] will be called with a [String] argument equal to the text field's contents when the dialog is closed for any reason. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="dialog_show"> @@ -91,17 +84,23 @@ <param index="2" name="buttons" type="PackedStringArray" /> <param index="3" name="callback" type="Callable" /> <description> + Shows a text dialog which uses the operating system's native look-and-feel. [param callback] will be called when the dialog is closed for any reason. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="enable_for_stealing_focus"> <return type="void" /> <param index="0" name="process_id" type="int" /> <description> + Allows the [param process_id] PID to steal focus from this window. In other words, this disables the operating system's focus stealing protection for the specified PID. + [b]Note:[/b] This method is implemented on Windows. </description> </method> <method name="force_process_and_drop_events"> <return type="void" /> <description> + Forces window manager processing while ignoring all [InputEvent]s. See also [method process_events]. + [b]Note:[/b] This method is implemented on Windows and macOS. </description> </method> <method name="get_accent_color" qualifiers="const"> @@ -127,27 +126,43 @@ <method name="get_name" qualifiers="const"> <return type="String" /> <description> + Returns the name of the [DisplayServer] currently in use. Most operating systems only have a single [DisplayServer], but Linux has access to more than one [DisplayServer] (although only X11 is currently implemented in Godot). + The names of built-in display servers are [code]Windows[/code], [code]macOS[/code], [code]X11[/code] (Linux), [code]Android[/code], [code]iOS[/code], [code]web[/code] (HTML5) and [code]headless[/code] (when started with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]). </description> </method> <method name="get_screen_count" qualifiers="const"> <return type="int" /> <description> + Returns the number of displays available. </description> </method> <method name="get_swap_cancel_ok"> <return type="bool" /> <description> + Returns [code]true[/code] if positions of [b]OK[/b] and [b]Cancel[/b] buttons are swapped in dialogs. This is enabled by default on Windows and UWP to follow interface conventions, and be toggled by changing [member ProjectSettings.gui/common/swap_cancel_ok]. + [b]Note:[/b] This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show]. </description> </method> <method name="get_window_at_screen_position" qualifiers="const"> <return type="int" /> <param index="0" name="position" type="Vector2i" /> <description> + Returns the ID of the window at the specified screen [param position] (in pixels). On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + [codeblock] + * (0, 0) +-------+ + | | + +-------------+ | | + | | | | + | | | | + +-------------+ +-------+ + [/codeblock] </description> </method> <method name="get_window_list" qualifiers="const"> <return type="PackedInt32Array" /> <description> + Returns the list of Godot window IDs belonging to this process. + [b]Note:[/b] Native dialogs are not included in this list. </description> </method> <method name="global_menu_add_check_item"> @@ -362,6 +377,14 @@ [b]Note:[/b] This method is implemented on macOS. </description> </method> + <method name="global_menu_get_item_count" qualifiers="const"> + <return type="int" /> + <param index="0" name="menu_root" type="String" /> + <description> + Returns number of items in the global menu with ID [param menu_root]. + [b]Note:[/b] This method is implemented on macOS. + </description> + </method> <method name="global_menu_get_item_icon" qualifiers="const"> <return type="Texture2D" /> <param index="0" name="menu_root" type="String" /> @@ -665,37 +688,42 @@ <return type="bool" /> <param index="0" name="feature" type="int" enum="DisplayServer.Feature" /> <description> + Returns [code]true[/code] if the specified [param feature] is supported by the current [DisplayServer], [code]false[/code] otherwise. </description> </method> <method name="ime_get_selection" qualifiers="const"> <return type="Vector2i" /> <description> + Returns the text selection in the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] composition string, with the [Vector2i]'s [code]x[/code] component being the caret position and [code]y[/code] being the length of the selection. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="ime_get_text" qualifiers="const"> <return type="String" /> <description> + Returns the composition string contained within the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] window. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="is_dark_mode" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if OS is using dark mode. - [b]Note:[/b] This method is implemented on macOS, Windows and Linux. + [b]Note:[/b] This method is implemented on macOS, Windows and Linux (X11). </description> </method> <method name="is_dark_mode_supported" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if OS supports dark mode. - [b]Note:[/b] This method is implemented on macOS, Windows and Linux. + [b]Note:[/b] This method is implemented on macOS, Windows and Linux (X11). </description> </method> <method name="keyboard_get_current_layout" qualifiers="const"> <return type="int" /> <description> Returns active keyboard layout index. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="keyboard_get_keycode_from_physical" qualifiers="const"> @@ -703,14 +731,14 @@ <param index="0" name="keycode" type="int" enum="Key" /> <description> Converts a physical (US QWERTY) [param keycode] to one in the active keyboard layout. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="keyboard_get_layout_count" qualifiers="const"> <return type="int" /> <description> Returns the number of keyboard layouts. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="keyboard_get_layout_language" qualifiers="const"> @@ -718,7 +746,7 @@ <param index="0" name="index" type="int" /> <description> Returns the ISO-639/BCP-47 language code of the keyboard layout at position [param index]. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="keyboard_get_layout_name" qualifiers="const"> @@ -726,25 +754,27 @@ <param index="0" name="index" type="int" /> <description> Returns the localized name of the keyboard layout at position [param index]. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="keyboard_set_current_layout"> <return type="void" /> <param index="0" name="index" type="int" /> <description> - Sets active keyboard layout. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + Sets the active keyboard layout. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="mouse_get_button_state" qualifiers="const"> <return type="int" enum="MouseButton" /> <description> + Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method Input.get_mouse_button_mask]. </description> </method> <method name="mouse_get_mode" qualifiers="const"> <return type="int" enum="DisplayServer.MouseMode" /> <description> + Returns the current mouse mode. See also [method mouse_set_mode]. </description> </method> <method name="mouse_get_position" qualifiers="const"> @@ -757,11 +787,13 @@ <return type="void" /> <param index="0" name="mouse_mode" type="int" enum="DisplayServer.MouseMode" /> <description> + Sets the current mouse mode. See also [method mouse_get_mode]. </description> </method> <method name="process_events"> <return type="void" /> <description> + Perform window manager processing, including input flushing. See also [method force_process_and_drop_events], [method Input.flush_buffered_events] and [member Input.use_accumulated_input]. </description> </method> <method name="screen_get_dpi" qualifiers="const"> @@ -779,7 +811,7 @@ xxhdpi - 480 dpi xxxhdpi - 640 dpi [/codeblock] - [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms. + [b]Note:[/b] This method is implemented on Android, Linux (X11), macOS and Windows. Returns [code]72[/code] on unsupported platforms. </description> </method> <method name="screen_get_max_scale" qualifiers="const"> @@ -794,12 +826,24 @@ <return type="int" enum="DisplayServer.ScreenOrientation" /> <param index="0" name="screen" type="int" default="-1" /> <description> + Returns the [param screen]'s current orientation. See also [method screen_set_orientation]. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="screen_get_position" qualifiers="const"> <return type="Vector2i" /> <param index="0" name="screen" type="int" default="-1" /> <description> + Returns the screen's top-left corner position in pixels. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + [codeblock] + * (0, 0) +-------+ + | | + +-------------+ | | + | | | | + | | | | + +-------------+ +-------+ + [/codeblock] + See also [method screen_get_size]. </description> </method> <method name="screen_get_refresh_rate" qualifiers="const"> @@ -829,29 +873,34 @@ <return type="Vector2i" /> <param index="0" name="screen" type="int" default="-1" /> <description> + Returns the screen's size in pixels. See also [method screen_get_position] and [method screen_get_usable_rect]. </description> </method> <method name="screen_get_usable_rect" qualifiers="const"> <return type="Rect2i" /> <param index="0" name="screen" type="int" default="-1" /> <description> + Returns the portion of the screen that is not obstructed by a status bar in pixels. See also [method screen_get_size]. </description> </method> <method name="screen_is_kept_on" qualifiers="const"> <return type="bool" /> <description> + Returns [code]true[/code] if the screen should never be turned off by the operating system's power-saving measures. See also [method screen_set_keep_on]. </description> </method> <method name="screen_is_touchscreen" qualifiers="const"> <return type="bool" /> <param index="0" name="screen" type="int" default="-1" /> <description> + Returns [code]true[/code] if the screen can send touch events or if [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is [code]true[/code]. </description> </method> <method name="screen_set_keep_on"> <return type="void" /> <param index="0" name="enable" type="bool" /> <description> + Sets whether the screen should never be turned off by the operating system's power-saving measures. See also [method screen_is_kept_on]. </description> </method> <method name="screen_set_orientation"> @@ -859,18 +908,21 @@ <param index="0" name="orientation" type="int" enum="DisplayServer.ScreenOrientation" /> <param index="1" name="screen" type="int" default="-1" /> <description> + Sets the [param screen]'s [param orientation]. See also [method screen_get_orientation]. </description> </method> <method name="set_icon"> <return type="void" /> <param index="0" name="image" type="Image" /> <description> + Sets the window icon (usually displayed in the top-left corner) in the operating system's [i]native[/i] format. To use icons in the operating system's native format, use [method set_native_icon] instead. </description> </method> <method name="set_native_icon"> <return type="void" /> <param index="0" name="filename" type="String" /> <description> + Sets the window icon (usually displayed in the top-left corner) in the operating system's [i]native[/i] format. The file at [param filename] must be in [code].ico[/code] format on Windows or [code].icns[/code] on macOS. By using specially crafted [code].ico[/code] or [code].icns[/code] icons, [method set_native_icon] allows specifying different icons depending on the size the icon is displayed at. This size is determined by the operating system and user preferences (including the display scale factor). To use icons in other formats, use [method set_icon] instead. </description> </method> <method name="tablet_get_current_driver" qualifiers="const"> @@ -911,7 +963,7 @@ - [code]name[/code] is voice name. - [code]id[/code] is voice identifier. - [code]language[/code] is language code in [code]lang_Variant[/code] format. [code]lang[/code] part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. And [code]Variant[/code] part is an engine dependent string describing country, region or/and dialect. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_get_voices_for_language" qualifiers="const"> @@ -919,35 +971,35 @@ <param index="0" name="language" type="String" /> <description> Returns an [PackedStringArray] of voice identifiers for the [param language]. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_is_paused" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if the synthesizer is in a paused state. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_is_speaking" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if the synthesizer is generating speech, or have utterance waiting in the queue. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_pause"> <return type="void" /> <description> Puts the synthesizer into a paused state. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_resume"> <return type="void" /> <description> Resumes the synthesizer if it was paused. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_set_utterance_callback"> @@ -956,10 +1008,10 @@ <param index="1" name="callable" type="Callable" /> <description> Adds a callback, which is called when the utterance has started, finished, canceled or reached a text boundary. - - [code]TTS_UTTERANCE_STARTED[/code], [code]TTS_UTTERANCE_ENDED[/code], and [code]TTS_UTTERANCE_CANCELED[/code] callable's method should take one [int] parameter, the utterance id. - - [code]TTS_UTTERANCE_BOUNDARY[/code] callable's method should take two [int] parameters, the index of the character and the utterance id. + - [constant TTS_UTTERANCE_STARTED], [constant TTS_UTTERANCE_ENDED], and [constant TTS_UTTERANCE_CANCELED] callable's method should take one [int] parameter, the utterance id. + - [constant TTS_UTTERANCE_BOUNDARY] callable's method should take two [int] parameters, the index of the character and the utterance id. [b]Note:[/b] The granularity of the boundary callbacks is engine dependent. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_speak"> @@ -978,16 +1030,16 @@ - [param pitch] ranges from [code]0.0[/code] (lowest) to [code]2.0[/code] (highest), [code]1.0[/code] is default pitch for the current voice. - [param rate] ranges from [code]0.1[/code] (lowest) to [code]10.0[/code] (highest), [code]1.0[/code] is a normal speaking rate. Other values act as a percentage relative. - [param utterance_id] is passed as a parameter to the callback functions. - [b]Note:[/b] On Windows and Linux, utterance [param text] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak]. + [b]Note:[/b] On Windows and Linux (X11), utterance [param text] can use SSML markup. SSML support is engine and voice dependent. If the engine does not support SSML, you should strip out all XML markup before calling [method tts_speak]. [b]Note:[/b] The granularity of pitch, rate, and volume is engine and voice dependent. Values may be truncated. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="tts_stop"> <return type="void" /> <description> Stops synthesis in progress and removes all utterances from the queue. - [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux, macOS, and Windows. + [b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows. </description> </method> <method name="virtual_keyboard_get_height" qualifiers="const"> @@ -1028,17 +1080,11 @@ Sets the mouse cursor position to the given [param position] relative to an origin at the upper left corner of the currently focused game Window Manager window. </description> </method> - <method name="window_attach_instance_id"> - <return type="void" /> - <param index="0" name="instance_id" type="int" /> - <param index="1" name="window_id" type="int" default="0" /> - <description> - </description> - </method> <method name="window_can_draw" qualifiers="const"> <return type="bool" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns [code]true[/code] if anything can be drawn in the window specified by [param window_id], [code]false[/code] otherwise. Using the [code]--disable-render-loop[/code] command line argument or a headless build will return [code]false[/code]. </description> </method> <method name="window_get_active_popup" qualifiers="const"> @@ -1051,12 +1097,14 @@ <return type="int" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the [method Object.get_instance_id] of the [Window] the [param window_id] is attached to. also [method window_get_attached_instance_id]. </description> </method> <method name="window_get_current_screen" qualifiers="const"> <return type="int" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the screen the window specified by [param window_id] is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also [method window_set_current_screen]. </description> </method> <method name="window_get_flag" qualifiers="const"> @@ -1071,12 +1119,14 @@ <return type="Vector2i" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the window's maximum size (in pixels). See also [method window_set_max_size]. </description> </method> <method name="window_get_min_size" qualifiers="const"> <return type="Vector2i" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the window's minimum size (in pixels). See also [method window_set_min_size]. </description> </method> <method name="window_get_mode" qualifiers="const"> @@ -1092,7 +1142,7 @@ <param index="1" name="window_id" type="int" default="0" /> <description> Returns internal structure pointers for use in plugins. - [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. + [b]Note:[/b] This method is implemented on Android, Linux (X11), macOS and Windows. </description> </method> <method name="window_get_popup_safe_rect" qualifiers="const"> @@ -1113,19 +1163,21 @@ <return type="Vector2i" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the size of the window specified by [param window_id] (in pixels), including the borders drawn by the operating system. See also [method window_get_size]. </description> </method> <method name="window_get_safe_title_margins" qualifiers="const"> <return type="Vector3i" /> <param index="0" name="window_id" type="int" default="0" /> <description> - Returns left margins ([code]x[/code]), right margins ([code]y[/code]) adn height ([code]z[/code]) of the title that are safe to use (contains no buttons or other elements) when [constant WINDOW_FLAG_EXTEND_TO_TITLE] flag is set. + Returns left margins ([code]x[/code]), right margins ([code]y[/code]) and height ([code]z[/code]) of the title that are safe to use (contains no buttons or other elements) when [constant WINDOW_FLAG_EXTEND_TO_TITLE] flag is set. </description> </method> <method name="window_get_size" qualifiers="const"> <return type="Vector2i" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Returns the size of the window specified by [param window_id] (in pixels), excluding the borders drawn by the operating system. This is also called the "client area". See also [method window_get_real_size], [method window_set_size] and [method window_get_position]. </description> </method> <method name="window_get_vsync_mode" qualifiers="const"> @@ -1135,6 +1187,13 @@ Returns the V-Sync mode of the given window. </description> </method> + <method name="window_is_maximize_allowed" qualifiers="const"> + <return type="bool" /> + <param index="0" name="window_id" type="int" default="0" /> + <description> + Returns [code]true[/code] if the given window can be maximized (the maximize button is enabled). + </description> + </method> <method name="window_maximize_on_title_dbl_click" qualifiers="const"> <return type="bool" /> <description> @@ -1153,12 +1212,14 @@ <return type="void" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Moves the window specified by [param window_id] to the foreground, so that it is visible over other windows. </description> </method> <method name="window_request_attention"> <return type="void" /> <param index="0" name="window_id" type="int" default="0" /> <description> + Makes the window specified by [param window_id] request attention, which is materialized by the window title and taskbar entry blinking until the window is focused. This usually has no visible effect if the window is currently focused. The exact behavior varies depending on the operating system. </description> </method> <method name="window_set_current_screen"> @@ -1166,6 +1227,7 @@ <param index="0" name="screen" type="int" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Moves the window specified by [param window_id] to the specified [param screen]. See also [method window_get_current_screen]. </description> </method> <method name="window_set_drop_files_callback"> @@ -1173,6 +1235,8 @@ <param index="0" name="callback" type="Callable" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the [param callback] that should be called when files are dropped from the operating system's file manager to the window specified by [param window_id]. + [b]Note:[/b] This method is implemented on Windows, macOS, Linux (X11) and Web. </description> </method> <method name="window_set_exclusive"> @@ -1199,6 +1263,7 @@ <param index="0" name="active" type="bool" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets whether [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] should be enabled for the window specified by [param window_id]. See also [method window_set_ime_position]. </description> </method> <method name="window_set_ime_position"> @@ -1206,6 +1271,7 @@ <param index="0" name="position" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the position of the [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url] popup for the specified [param window_id]. Only effective if [method window_set_ime_active] was set to [code]true[/code] for the specified [param window_id]. </description> </method> <method name="window_set_input_event_callback"> @@ -1213,6 +1279,7 @@ <param index="0" name="callback" type="Callable" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the [param callback] that should be called when any [InputEvent] is sent to the window specified by [param window_id]. </description> </method> <method name="window_set_input_text_callback"> @@ -1220,6 +1287,7 @@ <param index="0" name="callback" type="Callable" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the [param callback] that should be called when text is entered using the virtual keyboard to the window specified by [param window_id]. </description> </method> <method name="window_set_max_size"> @@ -1227,6 +1295,8 @@ <param index="0" name="max_size" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the maximum size of the window specified by [param window_id] in pixels. Normally, the user will not be able to drag the window to make it smaller than the specified size. See also [method window_get_max_size]. + [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. </description> </method> <method name="window_set_min_size"> @@ -1234,8 +1304,9 @@ <param index="0" name="min_size" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Sets the minimum size for the given window to [param min_size] (in pixels). + Sets the minimum size for the given window to [param min_size] (in pixels). Normally, the user will not be able to drag the window to make it larger than the specified size. See also [method window_get_min_size]. [b]Note:[/b] By default, the main window has a minimum size of [code]Vector2i(64, 64)[/code]. This prevents issues that can arise when the window is resized to a near-zero size. + [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. </description> </method> <method name="window_set_mode"> @@ -1276,8 +1347,8 @@ DisplayServer.WindowSetMousePassthrough(new Vector2[] {}); [/csharp] [/codeblocks] - [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux and macOS it is. - [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + [b]Note:[/b] On Windows, the portion of a window that lies outside the region is not drawn, while on Linux (X11) and macOS it is. + [b]Note:[/b] This method is implemented on Linux (X11), macOS and Windows. </description> </method> <method name="window_set_popup_safe_rect"> @@ -1293,7 +1364,16 @@ <param index="0" name="position" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Sets the position of the given window to [param position]. + Sets the position of the given window to [param position]. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: + [codeblock] + * (0, 0) +-------+ + | | + +-------------+ | | + | | | | + | | | | + +-------------+ +-------+ + [/codeblock] + See also [method window_get_position] and [method window_set_size]. </description> </method> <method name="window_set_rect_changed_callback"> @@ -1301,6 +1381,7 @@ <param index="0" name="callback" type="Callable" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the [param callback] that will be called when the window specified by [param window_id] is moved or resized. </description> </method> <method name="window_set_size"> @@ -1308,7 +1389,7 @@ <param index="0" name="size" type="Vector2i" /> <param index="1" name="window_id" type="int" default="0" /> <description> - Sets the size of the given window to [param size]. + Sets the size of the given window to [param size] (in pixels). See also [method window_get_size] and [method window_get_position]. </description> </method> <method name="window_set_title"> @@ -1317,6 +1398,7 @@ <param index="1" name="window_id" type="int" default="0" /> <description> Sets the title of the given window to [param title]. + [b]Note:[/b] Avoid changing the window title every frame, as this can cause performance issues on certain window managers. Try to change the window title only a few times per second at most. </description> </method> <method name="window_set_transient"> @@ -1352,51 +1434,70 @@ <param index="0" name="callback" type="Callable" /> <param index="1" name="window_id" type="int" default="0" /> <description> + Sets the [param callback] that will be called when an event occurs in the window specified by [param window_id]. </description> </method> </methods> <constants> <constant name="FEATURE_GLOBAL_MENU" value="0" enum="Feature"> + Display server supports global menu. This allows the application to display its menu items in the operating system's top bar. [b]macOS[/b] </constant> <constant name="FEATURE_SUBWINDOWS" value="1" enum="Feature"> + Display server supports multiple windows that can be moved outside of the main window. [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_TOUCHSCREEN" value="2" enum="Feature"> + Display server supports touchscreen input. [b]Windows, Linux (X11), Android, iOS, Web[/b] </constant> <constant name="FEATURE_MOUSE" value="3" enum="Feature"> + Display server supports mouse input. [b]Windows, macOS, Linux (X11), Android, Web[/b] </constant> <constant name="FEATURE_MOUSE_WARP" value="4" enum="Feature"> + Display server supports warping mouse coordinates to keep the mouse cursor constrained within an area, but looping when one of the edges is reached. [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_CLIPBOARD" value="5" enum="Feature"> + Display server supports setting and getting clipboard data. See also [constant FEATURE_CLIPBOARD_PRIMARY]. [b]Windows, macOS, Linux (X11), Android, iOS, Web[/b] </constant> <constant name="FEATURE_VIRTUAL_KEYBOARD" value="6" enum="Feature"> + Display server supports popping up a virtual keyboard when requested to input text without a physical keyboard. [b]Android, iOS, Web[/b] </constant> <constant name="FEATURE_CURSOR_SHAPE" value="7" enum="Feature"> + Display server supports setting the mouse cursor shape to be different from the default. [b]Windows, macOS, Linux (X11), Android, Web[/b] </constant> <constant name="FEATURE_CUSTOM_CURSOR_SHAPE" value="8" enum="Feature"> + Display server supports setting the mouse cursor shape to a custom image. [b]Windows, macOS, Linux (X11), Web[/b] </constant> <constant name="FEATURE_NATIVE_DIALOG" value="9" enum="Feature"> + Display server supports spawning dialogs using the operating system's native look-and-feel. [b]macOS[/b] </constant> <constant name="FEATURE_IME" value="10" enum="Feature"> + Display server supports [url=https://en.wikipedia.org/wiki/Input_method]Input Method Editor[/url], which is commonly used for inputting Chinese/Japanese/Korean text. This is handled by the operating system, rather than by Godot. [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_WINDOW_TRANSPARENCY" value="11" enum="Feature"> + Display server supports windows can use per-pixel transparency to make windows behind them partially or fully visible. [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_HIDPI" value="12" enum="Feature"> + Display server supports querying the operating system's display scale factor. This allows for [i]reliable[/i] automatic hiDPI display detection, as opposed to guessing based on the screen resolution and reported display DPI (which can be unreliable due to broken monitor EDID). [b]Windows, macOS[/b] </constant> <constant name="FEATURE_ICON" value="13" enum="Feature"> + Display server supports changing the window icon (usually displayed in the top-left corner). [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_NATIVE_ICON" value="14" enum="Feature"> + Display server supports changing the window icon (usually displayed in the top-left corner). [b]Windows, macOS[/b] </constant> <constant name="FEATURE_ORIENTATION" value="15" enum="Feature"> + Display server supports changing the screen orientation. [b]Android, iOS[/b] </constant> <constant name="FEATURE_SWAP_BUFFERS" value="16" enum="Feature"> + Display server supports V-Sync status can be changed from the default (which is forced to be enabled platforms not supporting this feature). [b]Windows, macOS, Linux (X11)[/b] </constant> <constant name="FEATURE_CLIPBOARD_PRIMARY" value="18" enum="Feature"> + Display server supports Primary clipboard can be used. This is a different clipboard from [constant FEATURE_CLIPBOARD]. [b]Linux (X11)[/b] </constant> <constant name="FEATURE_TEXT_TO_SPEECH" value="19" enum="Feature"> - Display server supports text-to-speech. See [code]tts_*[/code] methods. + Display server supports text-to-speech. See [code]tts_*[/code] methods. [b]Windows, macOS, Linux (X11), Android, iOS, Web[/b] </constant> <constant name="FEATURE_EXTEND_TO_TITLE" value="20" enum="Feature"> - Display server supports expanding window content to the title. See [constant WINDOW_FLAG_EXTEND_TO_TITLE]. + Display server supports expanding window content to the title. See [constant WINDOW_FLAG_EXTEND_TO_TITLE]. [b]macOS[/b] </constant> <constant name="MOUSE_MODE_VISIBLE" value="0" enum="MouseMode"> Makes the mouse cursor visible if it is hidden. @@ -1415,24 +1516,34 @@ Confines the mouse cursor to the game window, and make it hidden. </constant> <constant name="SCREEN_OF_MAIN_WINDOW" value="-1"> + Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. </constant> <constant name="MAIN_WINDOW_ID" value="0"> + The ID of the main window spawned by the engine, which can be passed to methods expecting a [code]window_id[/code]. </constant> <constant name="INVALID_WINDOW_ID" value="-1"> + The ID that refers to a nonexisting window. This is be returned by some [DisplayServer] methods if no window matches the requested result. </constant> <constant name="SCREEN_LANDSCAPE" value="0" enum="ScreenOrientation"> + Default landscape orientation. </constant> <constant name="SCREEN_PORTRAIT" value="1" enum="ScreenOrientation"> + Default portrait orienstation. </constant> <constant name="SCREEN_REVERSE_LANDSCAPE" value="2" enum="ScreenOrientation"> + Reverse landscape orientation (upside down). </constant> <constant name="SCREEN_REVERSE_PORTRAIT" value="3" enum="ScreenOrientation"> + Reverse portrait orientation (upside down). </constant> <constant name="SCREEN_SENSOR_LANDSCAPE" value="4" enum="ScreenOrientation"> + Automatic landscape orientation (default or reverse depending on sensor). </constant> <constant name="SCREEN_SENSOR_PORTRAIT" value="5" enum="ScreenOrientation"> + Automatic portrait orientation (default or reverse depending on sensor). </constant> <constant name="SCREEN_SENSOR" value="6" enum="ScreenOrientation"> + Automatic landscape or portrait orientation (default or reverse depending on sensor). </constant> <constant name="KEYBOARD_TYPE_DEFAULT" value="0" enum="VirtualKeyboardType"> Default text virtual keyboard. @@ -1460,40 +1571,58 @@ Virtual keyboard with additional keys to assist with typing URLs. </constant> <constant name="CURSOR_ARROW" value="0" enum="CursorShape"> + Arrow cursor shape. This is the default when not pointing anything that overrides the mouse cursor, such as a [LineEdit] or [TextEdit]. </constant> <constant name="CURSOR_IBEAM" value="1" enum="CursorShape"> + I-beam cursor shape. This is used by default when hovering a control that accepts text input, such as [LineEdit] or [TextEdit]. </constant> <constant name="CURSOR_POINTING_HAND" value="2" enum="CursorShape"> + Pointing hand cursor shape. This is used by default when hovering a [LinkButton] or an URL tag in a [RichTextLabel].⋅ </constant> <constant name="CURSOR_CROSS" value="3" enum="CursorShape"> + Crosshair cursor. This is intended to be displayed when the user needs precise aim over an element, such as a rectangle selection tool or a color picker. </constant> <constant name="CURSOR_WAIT" value="4" enum="CursorShape"> + Wait cursor. On most cursor themes, this displays a spinning icon [i]besides[/i] the arrow. Intended to be used for non-blocking operations (when the user can do something else at the moment). See also [constant CURSOR_BUSY]. </constant> <constant name="CURSOR_BUSY" value="5" enum="CursorShape"> + Wait cursor. On most cursor themes, this [i]replaces[/i] the arrow with a spinning icon. Intended to be used for blocking operations (when the user can't do anything else at the moment). See also [constant CURSOR_WAIT]. </constant> <constant name="CURSOR_DRAG" value="6" enum="CursorShape"> + Dragging hand cursor. This is displayed during drag-and-drop operations. See also [constant CURSOR_CAN_DROP]. </constant> <constant name="CURSOR_CAN_DROP" value="7" enum="CursorShape"> + "Can drop" cursor. This is displayed during drag-and-drop operations if hovering over a [Control] that can accept the drag-and-drop event. On most cursor themes, this displays a dragging hand with an arrow symbol besides it. See also [constant CURSOR_DRAG]. </constant> <constant name="CURSOR_FORBIDDEN" value="8" enum="CursorShape"> + Forbidden cursor. This is displayed during drag-and-drop operations if the hovered [Control] can't accept the drag-and-drop event. </constant> <constant name="CURSOR_VSIZE" value="9" enum="CursorShape"> + Vertical resize cursor. Intended to be displayed when the hovered [Control] can be vertically resized using the mouse. See also [constant CURSOR_VSPLIT]. </constant> <constant name="CURSOR_HSIZE" value="10" enum="CursorShape"> + Horizontal resize cursor. Intended to be displayed when the hovered [Control] can be horizontally resized using the mouse. See also [constant CURSOR_HSPLIT]. </constant> <constant name="CURSOR_BDIAGSIZE" value="11" enum="CursorShape"> + Secondary diagonal resize cursor (top-right/bottom-left). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse. </constant> <constant name="CURSOR_FDIAGSIZE" value="12" enum="CursorShape"> + Main diagonal resize cursor (top-left/bottom-right). Intended to be displayed when the hovered [Control] can be resized on both axes at once using the mouse. </constant> <constant name="CURSOR_MOVE" value="13" enum="CursorShape"> + Move cursor. Intended to be displayed when the hovered [Control] can be moved using the mouse. </constant> <constant name="CURSOR_VSPLIT" value="14" enum="CursorShape"> + Vertical split cursor. This is displayed when hovering a [Control] with splits that can be vertically resized using the mouse, such as [VSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_VSIZE]. </constant> <constant name="CURSOR_HSPLIT" value="15" enum="CursorShape"> + Horizontal split cursor. This is displayed when hovering a [Control] with splits that can be horizontally resized using the mouse, such as [HSplitContainer]. On some cursor themes, this cursor may have the same appearance as [constant CURSOR_HSIZE]. </constant> <constant name="CURSOR_HELP" value="16" enum="CursorShape"> + Help cursor. On most cursor themes, this displays a question mark icon instead of the mouse cursor. Intended to be used when the user has requested help on the next element that will be clicked. </constant> <constant name="CURSOR_MAX" value="17" enum="CursorShape"> + Represents the size of the [enum CursorShape] enum. </constant> <constant name="WINDOW_MODE_WINDOWED" value="0" enum="WindowMode"> Windowed mode, i.e. [Window] doesn't occupy the whole screen (unless set to the size of the screen). @@ -1505,7 +1634,7 @@ Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is pressed. </constant> <constant name="WINDOW_MODE_FULLSCREEN" value="3" enum="WindowMode"> - Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux, a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project. + Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux (X11), a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project. Regardless of the platform, enabling full screen will change the window size to match the monitor's size. Therefore, make sure your project supports [url=$DOCS_URL/tutorials/rendering/multiple_resolutions.html]multiple resolutions[/url] when enabling full screen mode. </constant> <constant name="WINDOW_MODE_EXCLUSIVE_FULLSCREEN" value="4" enum="WindowMode"> @@ -1525,7 +1654,7 @@ <constant name="WINDOW_FLAG_TRANSPARENT" value="3" enum="WindowFlags"> The window background can be transparent. [b]Note:[/b] This flag has no effect if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code]. - [b]Note:[/b] Transparency support is implemented on Linux, macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. + [b]Note:[/b] Transparency support is implemented on Linux (X11), macOS and Windows, but availability might vary depending on GPU driver, display manager, and compositor capabilities. </constant> <constant name="WINDOW_FLAG_NO_FOCUS" value="4" enum="WindowFlags"> The window can't be focused. No-focus window will ignore all input, except mouse clicks. @@ -1570,26 +1699,26 @@ [b]Note:[/b] This flag is implemented on macOS. </constant> <constant name="VSYNC_DISABLED" value="0" enum="VSyncMode"> - No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). + No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). Framerate is unlimited (nonwithstanding [member Engine.max_fps]). </constant> <constant name="VSYNC_ENABLED" value="1" enum="VSyncMode"> - Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). + Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). Framerate is limited by the monitor refresh rate (nonwithstanding [member Engine.max_fps]). </constant> <constant name="VSYNC_ADAPTIVE" value="2" enum="VSyncMode"> - Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible), otherwise vertical synchronization is enabled to avoid tearing. + Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible). Otherwise, vertical synchronization is enabled to avoid tearing. Framerate is limited by the monitor refresh rate (nonwithstanding [member Engine.max_fps]). </constant> <constant name="VSYNC_MAILBOX" value="3" enum="VSyncMode"> - Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). - Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag. + Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). Framerate is unlimited (nonwithstanding [member Engine.max_fps]). + Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag (also called "Fast" V-Sync mode). [constant VSYNC_MAILBOX] works best when at least twice as many frames as the display refresh rate are rendered. </constant> <constant name="DISPLAY_HANDLE" value="0" enum="HandleType"> Display handle: - - Linux: [code]X11::Display*[/code] for the display. + - Linux (X11): [code]X11::Display*[/code] for the display. </constant> <constant name="WINDOW_HANDLE" value="1" enum="HandleType"> Window handle: - Windows: [code]HWND[/code] for the window. - - Linux: [code]X11::Window*[/code] for the window. + - Linux (X11): [code]X11::Window*[/code] for the window. - macOS: [code]NSWindow*[/code] for the window. - iOS: [code]UIViewController*[/code] for the view controller. - Android: [code]jObject[/code] for the activity. diff --git a/doc/classes/EditorCommandPalette.xml b/doc/classes/EditorCommandPalette.xml index 53a3fe5d19..380c79fc1a 100644 --- a/doc/classes/EditorCommandPalette.xml +++ b/doc/classes/EditorCommandPalette.xml @@ -5,7 +5,7 @@ </brief_description> <description> Object that holds all the available Commands and their shortcuts text. These Commands can be accessed through [b]Editor > Command Palette[/b] menu. - Command key names use slash delimiters to distinguish sections Example: [code]"example/command1"[/code] then [code]example[/code] will be the section name. + Command key names use slash delimiters to distinguish sections, for example: [code]"example/command1"[/code] then [code]example[/code] will be the section name. [codeblocks] [gdscript] var command_palette = get_editor_interface().get_command_palette() diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml index e216059364..99e97fc25f 100644 --- a/doc/classes/EditorFeatureProfile.xml +++ b/doc/classes/EditorFeatureProfile.xml @@ -28,7 +28,7 @@ <return type="bool" /> <param index="0" name="class_name" type="StringName" /> <description> - Returns [code]true[/code] if editing for the class specified by [param class_name] is disabled. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class. + Returns [code]true[/code] if editing for the class specified by [param class_name] is disabled. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class. </description> </method> <method name="is_class_property_disabled" qualifiers="const"> @@ -36,7 +36,7 @@ <param index="0" name="class_name" type="StringName" /> <param index="1" name="property" type="StringName" /> <description> - Returns [code]true[/code] if [param property] is disabled in the class specified by [param class_name]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [param class_name]. + Returns [code]true[/code] if [param property] is disabled in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name]. </description> </method> <method name="is_feature_disabled" qualifiers="const"> @@ -73,7 +73,7 @@ <param index="0" name="class_name" type="StringName" /> <param index="1" name="disable" type="bool" /> <description> - If [param disable] is [code]true[/code], disables editing for the class specified by [param class_name]. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class. + If [param disable] is [code]true[/code], disables editing for the class specified by [param class_name]. When disabled, the class will still appear in the Create New Node dialog but the Inspector will be read-only when selecting a node that extends the class. </description> </method> <method name="set_disable_class_property"> @@ -82,7 +82,7 @@ <param index="1" name="property" type="StringName" /> <param index="2" name="disable" type="bool" /> <description> - If [param disable] is [code]true[/code], disables editing for [param property] in the class specified by [param class_name]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [param class_name]. + If [param disable] is [code]true[/code], disables editing for [param property] in the class specified by [param class_name]. When a property is disabled, it won't appear in the Inspector when selecting a node that extends the class specified by [param class_name]. </description> </method> <method name="set_disable_feature"> diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index 51e3706981..29a8f470a1 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -4,7 +4,7 @@ A modified version of [FileDialog] used by the editor. </brief_description> <description> - [EditorFileDialog] is an enhanced version of [FileDialog] avaiable only to editor plugins. Additional features include list of favorited/recent files and ability to see files as thumbnails grid instead of list. + [EditorFileDialog] is an enhanced version of [FileDialog] available only to editor plugins. Additional features include list of favorited/recent files and ability to see files as thumbnails grid instead of list. </description> <tutorials> </tutorials> diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index a1a43dd5bf..0cda49f1bf 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -7,8 +7,8 @@ This is the control that implements property editing in the editor's Settings dialogs, the Inspector dock, etc. To get the [EditorInspector] used in the editor's Inspector dock, use [method EditorInterface.get_inspector]. [EditorInspector] will show properties in the same order as the array returned by [method Object.get_property_list]. If a property's name is path-like (i.e. if it contains forward slashes), [EditorInspector] will create nested sections for "directories" along the path. For example, if a property is named [code]highlighting/gdscript/node_path_color[/code], it will be shown as "Node Path Color" inside the "GDScript" section nested inside the "Highlighting" section. - If a property has [constant @GlobalScope.PROPERTY_USAGE_GROUP] usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. [EditorInspector] will create a top-level section for each group. For example, if a property with group usage is named [code]Collide With[/code] and its hint string is [code]collide_with_[/code], a subsequent [code]collide_with_area[/code] property will be shown as "Area" inside the "Collide With" section. - If a property has [constant @GlobalScope.PROPERTY_USAGE_SUBGROUP] usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup. + If a property has [constant PROPERTY_USAGE_GROUP] usage, it will group subsequent properties whose name starts with the property's hint string. The group ends when a property does not start with that hint string or when a new group starts. An empty group name effectively ends the current group. [EditorInspector] will create a top-level section for each group. For example, if a property with group usage is named [code]Collide With[/code] and its hint string is [code]collide_with_[/code], a subsequent [code]collide_with_area[/code] property will be shown as "Area" inside the "Collide With" section. + If a property has [constant PROPERTY_USAGE_SUBGROUP] usage, a subgroup will be created in the same way as a group, and a second-level section will be created for each subgroup. [b]Note:[/b] Unlike sections created from path-like property names, [EditorInspector] won't capitalize the name for sections created from groups. So properties with group usage usually use capitalized names instead of snake_cased names. </description> <tutorials> @@ -33,7 +33,7 @@ <signal name="object_id_selected"> <param index="0" name="id" type="int" /> <description> - Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree inspector. + Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree Inspector. </description> </signal> <signal name="property_deleted"> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index c8a499260e..ba2f7b24bf 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorInspectorPlugin" inherits="RefCounted" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - Plugin for adding custom property editors on inspector. + Plugin for adding custom property editors on the inspector. </brief_description> <description> [EditorInspectorPlugin] allows adding custom property editors to [EditorInspector]. diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index 0beb2459a3..bb319cb5a3 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -152,6 +152,12 @@ Shows the given property on the given [param object] in the editor's Inspector dock. If [param inspector_only] is [code]true[/code], plugins will not attempt to edit [param object]. </description> </method> + <method name="is_movie_maker_enabled" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if Movie Maker mode is enabled in the editor. See also [method set_movie_maker_enabled]. See [MovieWriter] for more information. + </description> + </method> <method name="is_playing_scene" qualifiers="const"> <return type="bool" /> <description> @@ -216,7 +222,7 @@ <method name="save_scene"> <return type="int" enum="Error" /> <description> - Saves the scene. Returns either [code]OK[/code] or [code]ERR_CANT_CREATE[/code] (see [@GlobalScope] constants). + Saves the scene. Returns either [constant OK] or [constant ERR_CANT_CREATE]. </description> </method> <method name="save_scene_as"> @@ -241,6 +247,13 @@ Sets the editor's current main screen to the one specified in [param name]. [param name] must match the text of the tab in question exactly ([code]2D[/code], [code]3D[/code], [code]Script[/code], [code]AssetLib[/code]). </description> </method> + <method name="set_movie_maker_enabled"> + <return type="void" /> + <param index="0" name="enabled" type="bool" /> + <description> + Sets whether Movie Maker mode is enabled in the editor. See also [method is_movie_maker_enabled]. See [MovieWriter] for more information. + </description> + </method> <method name="set_plugin_enabled"> <return type="void" /> <param index="0" name="plugin" type="String" /> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index e413c526f4..2289a373bf 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -100,7 +100,8 @@ <param index="0" name="viewport_camera" type="Camera3D" /> <param index="1" name="event" type="InputEvent" /> <description> - Called when there is a root node in the current edited scene, [method _handles] is implemented, and an [InputEvent] happens in the 3D viewport. The return value decides whether the [InputEvent] is consumed or forwarded to other [EditorPlugin]s. See [enum AfterGUIInput] for options. Example: + Called when there is a root node in the current edited scene, [method _handles] is implemented, and an [InputEvent] happens in the 3D viewport. The return value decides whether the [InputEvent] is consumed or forwarded to other [EditorPlugin]s. See [enum AfterGUIInput] for options. + [b]Example:[/b] [codeblocks] [gdscript] # Prevents the InputEvent from reaching other Editor classes. @@ -115,7 +116,8 @@ } [/csharp] [/codeblocks] - Must [code]return EditorPlugin.AFTER_GUI_INPUT_PASS[/code] in order to forward the [InputEvent] to other Editor classes. Example: + Must [code]return EditorPlugin.AFTER_GUI_INPUT_PASS[/code] in order to forward the [InputEvent] to other Editor classes. + [b]Example:[/b] [codeblocks] [gdscript] # Consumes InputEventMouseMotion and forwards other InputEvent types. @@ -182,7 +184,8 @@ <return type="bool" /> <param index="0" name="event" type="InputEvent" /> <description> - Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [param event], otherwise forwards [param event] to other Editor classes. Example: + Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [param event], otherwise forwards [param event] to other Editor classes. + [b]Example:[/b] [codeblocks] [gdscript] # Prevents the InputEvent from reaching other Editor classes. @@ -197,7 +200,8 @@ } [/csharp] [/codeblocks] - Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes. Example: + Must [code]return false[/code] in order to forward the [InputEvent] to other Editor classes. + [b]Example:[/b] [codeblocks] [gdscript] # Consumes InputEventMouseMotion and forwards other InputEvent types. diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 818dda59bc..07457387a0 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -196,10 +196,10 @@ The thumbnail size to use in the FileSystem dock (in pixels). See also [member filesystem/file_dialog/thumbnail_size]. </member> <member name="docks/property_editor/auto_refresh_interval" type="float" setter="" getter=""> - The refresh interval to use for the inspector dock's properties. The effect of this setting is mainly noticeable when adjusting gizmos in the 2D/3D editor and looking at the inspector at the same time. Lower values make the inspector more often, but take up more CPU time. + The refresh interval to use for the Inspector dock's properties. The effect of this setting is mainly noticeable when adjusting gizmos in the 2D/3D editor and looking at the inspector at the same time. Lower values make the inspector more often, but take up more CPU time. </member> <member name="docks/property_editor/subresource_hue_tint" type="float" setter="" getter=""> - The tint intensity to use for the subresources background in the inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference. + The tint intensity to use for the subresources background in the Inspector dock. The tint is used to distinguish between different subresources in the inspector. Higher values result in a more noticeable background color difference. </member> <member name="docks/scene_tree/auto_expand_to_selected" type="bool" setter="" getter=""> If [code]true[/code], the scene tree dock will automatically unfold nodes when a node that has folded parents is selected. @@ -516,7 +516,7 @@ If set to [b]Auto[/b], the font hinting mode will be set to match the current operating system in use. This means the [b]Light[/b] hinting mode will be used on Windows and Linux, and the [b]None[/b] hinting mode will be used on macOS. </member> <member name="interface/editor/font_subpixel_positioning" type="int" setter="" getter=""> - The subpixel positioning mode to use when rendering editor font glyphs. This affects both the main and code fonts. [b]Disabled[/b] is the fastest to render and uses the least memory. [b]Auto[/b] only uses subpixel positioning for small font sizes (where the benefit is the most noticeable). [b]One half of a pixel[/b] and [b]One quarter of a pixel[/b] force the same subpixel positioning mode for all editor fonts, regardless of their size (with [b]One quarter of a pixel[/b] being the highest-quality option). + The subpixel positioning mode to use when rendering editor font glyphs. This affects both the main and code fonts. [b]Disabled[/b] is the fastest to render and uses the least memory. [b]Auto[/b] only uses subpixel positioning for small font sizes (where the benefit is the most noticeable). [b]One Half of a Pixel[/b] and [b]One Quarter of a Pixel[/b] force the same subpixel positioning mode for all editor fonts, regardless of their size (with [b]One Quarter of a Pixel[/b] being the highest-quality option). </member> <member name="interface/editor/low_processor_mode_sleep_usec" type="float" setter="" getter=""> The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU/GPU usage, which can improve battery life on laptops. However, higher values will result in a less responsive editor. The default value is set to allow for maximum smoothness on monitors up to 144 Hz. See also [member interface/editor/unfocused_low_processor_mode_sleep_usec]. diff --git a/doc/classes/EditorUndoRedoManager.xml b/doc/classes/EditorUndoRedoManager.xml index 1350e4487c..c1e771d653 100644 --- a/doc/classes/EditorUndoRedoManager.xml +++ b/doc/classes/EditorUndoRedoManager.xml @@ -107,6 +107,18 @@ </description> </method> </methods> + <signals> + <signal name="history_changed"> + <description> + Emitted when the list of actions in any history has changed, either when an action is commited or a history is cleared. + </description> + </signal> + <signal name="version_changed"> + <description> + Emitted when the version of any history has changed as a result of undo or redo call. + </description> + </signal> + </signals> <constants> <constant name="GLOBAL_HISTORY" value="0" enum="SpecialHistory"> Global history not associated with any scene, but with external resources etc. diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index 3a397f56a9..4670e0c382 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -12,7 +12,7 @@ var expression = Expression.new() func _ready(): - $LineEdit.connect("text_submitted", self, "_on_text_submitted") + $LineEdit.text_submitted.connect(self._on_text_submitted) func _on_text_submitted(command): var error = expression.parse(command) @@ -28,7 +28,7 @@ public override void _Ready() { - GetNode("LineEdit").Connect("text_submitted", this, nameof(OnTextEntered)); + GetNode("LineEdit").TextSubmitted += OnTextEntered; } private void OnTextEntered(string command) diff --git a/doc/classes/FlowContainer.xml b/doc/classes/FlowContainer.xml index d449049ef1..7a324160c9 100644 --- a/doc/classes/FlowContainer.xml +++ b/doc/classes/FlowContainer.xml @@ -18,11 +18,25 @@ </method> </methods> <members> + <member name="alignment" type="int" setter="set_alignment" getter="get_alignment" enum="FlowContainer.AlignmentMode" default="0"> + The alignment of the container's children (must be one of [constant ALIGNMENT_BEGIN], [constant ALIGNMENT_CENTER], or [constant ALIGNMENT_END]). + </member> <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false"> If [code]true[/code], the [FlowContainer] will arrange its children vertically, rather than horizontally. Can't be changed when using [HFlowContainer] and [VFlowContainer]. </member> </members> + <constants> + <constant name="ALIGNMENT_BEGIN" value="0" enum="AlignmentMode"> + The child controls will be arranged at the beginning of the container, i.e. top if orientation is vertical, left if orientation is horizontal (right for RTL layout). + </constant> + <constant name="ALIGNMENT_CENTER" value="1" enum="AlignmentMode"> + The child controls will be centered in the container. + </constant> + <constant name="ALIGNMENT_END" value="2" enum="AlignmentMode"> + The child controls will be arranged at the end of the container, i.e. bottom if orientation is vertical, right if orientation is horizontal (left for RTL layout). + </constant> + </constants> <theme_items> <theme_item name="h_separation" data_type="constant" type="int" default="4"> The horizontal separation of children nodes. diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml index df378d9d2f..271f6a13e0 100644 --- a/doc/classes/FontFile.xml +++ b/doc/classes/FontFile.xml @@ -14,7 +14,6 @@ [b]Note:[/b] A character is a symbol that represents an item (letter, digit etc.) in an abstract way. [b]Note:[/b] A glyph is a bitmap or shape used to draw a one or more characters in a context-dependent manner. Glyph indices are bound to the specific font data source. [b]Note:[/b] If a none of the font data sources contain glyphs for a character used in a string, the character in question will be replaced with a box displaying its hexadecimal code. - [codeblocks] [gdscript] var f = load("res://BarlowCondensed-Bold.ttf") @@ -262,7 +261,7 @@ <param index="1" name="size" type="Vector2i" /> <param index="2" name="texture_index" type="int" /> <description> - Returns a copy of the array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty. + Returns a copy of the array containing glyph packing data. </description> </method> <method name="get_transform" qualifiers="const"> @@ -522,7 +521,7 @@ <param index="2" name="texture_index" type="int" /> <param index="3" name="offset" type="PackedInt32Array" /> <description> - Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty (for the fonts without dynamic glyph generation support). + Sets array containing glyph packing data. </description> </method> <method name="set_transform"> @@ -589,7 +588,7 @@ Font style name. </member> <member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1"> - Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size. + Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size. </member> </members> </class> diff --git a/doc/classes/FontVariation.xml b/doc/classes/FontVariation.xml index 6aa381c2de..e0fad126b9 100644 --- a/doc/classes/FontVariation.xml +++ b/doc/classes/FontVariation.xml @@ -5,7 +5,6 @@ </brief_description> <description> OpenType variations, simulated bold / slant, and additional font settings like OpenType features and extra spacing. - To use simulated bold font variant: [codeblocks] [gdscript] diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index 043c08eed5..4916171900 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -9,7 +9,8 @@ </description> <tutorials> <link title="Particle systems (2D)">$DOCS_URL/tutorials/2d/particle_systems_2d.html</link> - <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> + <link title="2D Particles Demo">https://godotengine.org/asset-library/asset/118</link> + <link title="2D Dodge The Creeps Demo (uses GPUParticles2D for the trail behind the player)">https://godotengine.org/asset-library/asset/515</link> </tutorials> <methods> <method name="capture_rect" qualifiers="const"> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 64a3315308..c504e26d58 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -30,7 +30,6 @@ if error != OK: push_error("An error occurred in the HTTP request.") - # Called when the HTTP request is completed. func _http_request_completed(result, response_code, headers, body): var json = JSON.new() @@ -95,7 +94,6 @@ if error != OK: push_error("An error occurred in the HTTP request.") - # Called when the HTTP request is completed. func _http_request_completed(result, response_code, headers, body): if result != HTTPRequest.RESULT_SUCCESS: diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 88cea6820e..bbd633819b 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -241,11 +241,11 @@ This is the same as [method get_pixel], but with a [Vector2i] argument instead of two integer arguments. </description> </method> - <method name="get_rect" qualifiers="const"> + <method name="get_region" qualifiers="const"> <return type="Image" /> - <param index="0" name="rect" type="Rect2i" /> + <param index="0" name="region" type="Rect2i" /> <description> - Returns a new image that is a copy of the image's area specified with [param rect]. + Returns a new [Image] that is a copy of this [Image]'s area specified with [param region]. </description> </method> <method name="get_size" qualifiers="const"> @@ -471,7 +471,8 @@ <param index="1" name="y" type="int" /> <param index="2" name="color" type="Color" /> <description> - Sets the [Color] of the pixel at [code](x, y)[/code] to [param color]. Example: + Sets the [Color] of the pixel at [code](x, y)[/code] to [param color]. + [b]Example:[/b] [codeblocks] [gdscript] var img_width = 10 @@ -498,7 +499,8 @@ <param index="0" name="point" type="Vector2i" /> <param index="1" name="color" type="Color" /> <description> - Sets the [Color] of the pixel at [param point] to [param color]. Example: + Sets the [Color] of the pixel at [param point] to [param color]. + [b]Example:[/b] [codeblocks] [gdscript] var img_width = 10 diff --git a/doc/classes/ImporterMesh.xml b/doc/classes/ImporterMesh.xml index 1c9655c266..b80857a7bf 100644 --- a/doc/classes/ImporterMesh.xml +++ b/doc/classes/ImporterMesh.xml @@ -5,7 +5,6 @@ </brief_description> <description> ImporterMesh is a type of [Resource] analogous to [ArrayMesh]. It contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. - Unlike its runtime counterpart, [ImporterMesh] contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling [method clear], followed by [method add_surface] for each surface. </description> <tutorials> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 56b95fc755..d246e64251 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -157,7 +157,7 @@ <method name="get_mouse_button_mask" qualifiers="const"> <return type="int" enum="MouseButton" /> <description> - Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. + Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method DisplayServer.mouse_get_button_state]. </description> </method> <method name="get_vector" qualifiers="const"> @@ -254,7 +254,7 @@ <param index="0" name="event" type="InputEvent" /> <description> Feeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls. - Example: + [b]Example:[/b] [codeblocks] [gdscript] var cancel_event = InputEventAction.new() @@ -366,7 +366,7 @@ <param index="0" name="position" type="Vector2" /> <description> Sets the mouse position to the specified vector, provided in pixels and relative to an origin at the upper left corner of the currently focused Window Manager game window. - Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if [enum MouseMode] is set to [code]MOUSE_MODE_CONFINED[/code] or [code]MOUSE_MODE_CONFINED_HIDDEN[/code]. + Mouse position is clipped to the limits of the screen resolution, or to the limits of the game window if [enum MouseMode] is set to [constant MOUSE_MODE_CONFINED] or [constant MOUSE_MODE_CONFINED_HIDDEN]. </description> </method> </methods> diff --git a/doc/classes/InputEventMIDI.xml b/doc/classes/InputEventMIDI.xml index 04d8cab065..67e7ced2e8 100644 --- a/doc/classes/InputEventMIDI.xml +++ b/doc/classes/InputEventMIDI.xml @@ -69,18 +69,18 @@ The MIDI channel of this input event. There are 16 channels, so this value ranges from 0 to 15. MIDI channel 9 is reserved for the use with percussion instruments, the rest of the channels are for non-percussion instruments. </member> <member name="controller_number" type="int" setter="set_controller_number" getter="get_controller_number" default="0"> - If the message is [code]MIDI_MESSAGE_CONTROL_CHANGE[/code], this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers. + If the message is [constant MIDI_MESSAGE_CONTROL_CHANGE], this indicates the controller number, otherwise this is zero. Controllers include devices such as pedals and levers. </member> <member name="controller_value" type="int" setter="set_controller_value" getter="get_controller_value" default="0"> - If the message is [code]MIDI_MESSAGE_CONTROL_CHANGE[/code], this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers. + If the message is [constant MIDI_MESSAGE_CONTROL_CHANGE], this indicates the controller value, otherwise this is zero. Controllers include devices such as pedals and levers. </member> <member name="instrument" type="int" setter="set_instrument" getter="get_instrument" default="0"> The instrument of this input event. This value ranges from 0 to 127. Refer to the instrument list on the General MIDI wikipedia article to see a list of instruments, except that this value is 0-index, so subtract one from every number on that chart. A standard piano will have an instrument number of 0. </member> <member name="message" type="int" setter="set_message" getter="get_message" enum="MIDIMessage" default="0"> - Returns a value indicating the type of message for this MIDI signal. This is a member of the [enum @GlobalScope.MIDIMessage] enum. + Returns a value indicating the type of message for this MIDI signal. This is a member of the [enum MIDIMessage] enum. For MIDI messages between 0x80 and 0xEF, only the left half of the bits are returned as this value, as the other part is the channel (ex: 0x94 becomes 0x9). For MIDI messages from 0xF0 to 0xFF, the value is returned as-is. - Notes will return [code]MIDI_MESSAGE_NOTE_ON[/code] when activated, but they might not always return [code]MIDI_MESSAGE_NOTE_OFF[/code] when deactivated, therefore your code should treat the input as stopped if some period of time has passed. + Notes will return [constant MIDI_MESSAGE_NOTE_ON] when activated, but they might not always return [constant 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. </member> <member name="pitch" type="int" setter="set_pitch" getter="get_pitch" default="0"> diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml index 125d016632..93731cf553 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -54,7 +54,7 @@ <param index="0" name="json_string" type="String" /> <description> Attempts to parse the [param json_string] provided. - Returns an [enum Error]. If the parse was successful, it returns [code]OK[/code] and the result can be retrieved using [member data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure. + Returns an [enum Error]. If the parse was successful, it returns [constant OK] and the result can be retrieved using [member data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure. Non-static variant of [method parse_string], if you want custom error handling. </description> </method> diff --git a/doc/classes/JavaScriptObject.xml b/doc/classes/JavaScriptObject.xml index 26792bd19e..7132cc5cad 100644 --- a/doc/classes/JavaScriptObject.xml +++ b/doc/classes/JavaScriptObject.xml @@ -5,7 +5,7 @@ </brief_description> <description> JavaScriptObject is used to interact with JavaScript objects retrieved or created via [method JavaScriptBridge.get_interface], [method JavaScriptBridge.create_object], or [method JavaScriptBridge.create_callback]. - Example: + [b]Example:[/b] [codeblock] extends Node diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 14fb864ca8..e57cc68b36 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -224,6 +224,9 @@ <member name="secret_character" type="String" setter="set_secret_character" getter="get_secret_character" default=""•""> The character to use to mask secret input (defaults to "•"). Only a single character can be used as the secret character. </member> + <member name="select_all_on_focus" type="bool" setter="set_select_all_on_focus" getter="is_select_all_on_focus" default="false"> + If [code]true[/code], the [LineEdit] will select the whole text when it gains focus. + </member> <member name="selecting_enabled" type="bool" setter="set_selecting_enabled" getter="is_selecting_enabled" default="true"> If [code]false[/code], it's impossible to select the text using mouse nor keyboard. </member> diff --git a/doc/classes/Marker3D.xml b/doc/classes/Marker3D.xml index 5ad1cdf513..0d49b376a8 100644 --- a/doc/classes/Marker3D.xml +++ b/doc/classes/Marker3D.xml @@ -8,4 +8,9 @@ </description> <tutorials> </tutorials> + <members> + <member name="gizmo_extents" type="float" setter="set_gizmo_extents" getter="get_gizmo_extents" default="0.25"> + Size of the gizmo cross that appears in the editor. + </member> + </members> </class> diff --git a/doc/classes/MovieWriter.xml b/doc/classes/MovieWriter.xml index f2509ad2b2..1652dd52aa 100644 --- a/doc/classes/MovieWriter.xml +++ b/doc/classes/MovieWriter.xml @@ -4,7 +4,7 @@ Abstract class for non-real-time video recording encoders. </brief_description> <description> - Godot can record videos with non-real-time simulation. Like the [code]--fixed-fps[/code] command line argument, this forces the reported [code]delta[/code] in [method Node._process] functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities. + Godot can record videos with non-real-time simulation. Like the [code]--fixed-fps[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url], this forces the reported [code]delta[/code] in [method Node._process] functions to be identical across frames, regardless of how long it actually took to render the frame. This can be used to record high-quality videos with perfect frame pacing regardless of your hardware's capabilities. Godot has 2 built-in [MovieWriter]s: - AVI container with MJPEG for video and uncompressed audio ([code].avi[/code] file extension). Lossy compression, medium file sizes, fast encoding. The lossy compression quality can be adjusted by changing [member ProjectSettings.editor/movie_writer/mjpeg_quality]. The resulting file can be viewed in most video players, but it must be converted to another format for viewing on the web or by Godot with [VideoStreamPlayer]. MJPEG does not support transparency. AVI output is currently limited to a file of 4 GB in size at most. - PNG image sequence for video and WAV for audio ([code].png[/code] file extension). Lossless compression, large file sizes, slow encoding. Designed to be encoded to a video file with another tool such as [url=https://ffmpeg.org/]FFmpeg[/url] after recording. Transparency is currently not supported, even if the root viewport is set to be transparent. @@ -46,7 +46,7 @@ <param index="1" name="fps" type="int" /> <param index="2" name="base_path" type="String" /> <description> - Called once before the engine starts writing video and audio data. [param movie_size] is the width and height of the video to save. [param fps] is the number of frames per second specified in the project settings or using the [code]--fixed-fps <fps>[/code] command line argument. + Called once before the engine starts writing video and audio data. [param movie_size] is the width and height of the video to save. [param fps] is the number of frames per second specified in the project settings or using the [code]--fixed-fps <fps>[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </description> </method> <method name="_write_end" qualifiers="virtual"> diff --git a/doc/classes/MultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml index ba6c60a088..dd7dac3f23 100644 --- a/doc/classes/MultiplayerPeer.xml +++ b/doc/classes/MultiplayerPeer.xml @@ -1,11 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="MultiplayerPeer" inherits="PacketPeer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - A high-level network interface to simplify multiplayer interactions. + Abstract class for specialized [PacketPeer]s used by the [MultiplayerAPI]. </brief_description> <description> - Manages the connection to multiplayer peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI]. - [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. + Manages the connection with one or more remote peers acting as server or client and assigning unique IDs to each of them. See also [MultiplayerAPI]. + [b]Note:[/b] The [MultiplayerAPI] protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. [b]Note:[/b] When exporting to Android, make sure to enable the [code]INTERNET[/code] permission in the Android export preset before exporting the project or using one-click deploy. Otherwise, network communication of any kind will be blocked by Android. </description> <tutorials> @@ -13,6 +13,20 @@ <link title="WebRTC Signaling Demo">https://godotengine.org/asset-library/asset/537</link> </tutorials> <methods> + <method name="close"> + <return type="void" /> + <description> + Immediately close the multiplayer peer returning to the state [constant CONNECTION_DISCONNECTED]. Connected peers will be dropped without emitting [signal peer_disconnected]. + </description> + </method> + <method name="disconnect_peer"> + <return type="void" /> + <param index="0" name="peer" type="int" /> + <param index="1" name="force" type="bool" default="false" /> + <description> + Disconnects the given [param peer] from this host. If [param force] is [code]true[/code] the [signal peer_disconnected] signal will not be emitted for this peer. + </description> + </method> <method name="generate_unique_id" qualifiers="const"> <return type="int" /> <description> @@ -79,53 +93,38 @@ [b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_UNRELIABLE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly. </member> <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="MultiplayerPeer.TransferMode" default="2"> - The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode]. + The manner in which to send packets to the target peer. See [enum TransferMode], and the [method set_target_peer] method. </member> </members> <signals> - <signal name="connection_failed"> - <description> - Emitted when a connection attempt fails. - </description> - </signal> - <signal name="connection_succeeded"> - <description> - Emitted when a connection attempt succeeds. - </description> - </signal> <signal name="peer_connected"> <param index="0" name="id" type="int" /> <description> - Emitted by the server when a client connects. + Emitted when a remote peer connects. </description> </signal> <signal name="peer_disconnected"> <param index="0" name="id" type="int" /> <description> - Emitted by the server when a client disconnects. - </description> - </signal> - <signal name="server_disconnected"> - <description> - Emitted by clients when the server disconnects. + Emitted when a remote peer has disconnected. </description> </signal> </signals> <constants> <constant name="CONNECTION_DISCONNECTED" value="0" enum="ConnectionStatus"> - The ongoing connection disconnected. + The MultiplayerPeer is disconnected. </constant> <constant name="CONNECTION_CONNECTING" value="1" enum="ConnectionStatus"> - A connection attempt is ongoing. + The MultiplayerPeer is currently connecting to a server. </constant> <constant name="CONNECTION_CONNECTED" value="2" enum="ConnectionStatus"> - The connection attempt succeeded. + This MultiplayerPeer is connected. </constant> <constant name="TARGET_PEER_BROADCAST" value="0"> - Packets are sent to the server and then redistributed to other peers. + Packets are sent to all connected peers. </constant> <constant name="TARGET_PEER_SERVER" value="1"> - Packets are sent to the server alone. + Packets are sent to the remote peer acting as server. </constant> <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode"> Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters. diff --git a/doc/classes/MultiplayerPeerExtension.xml b/doc/classes/MultiplayerPeerExtension.xml index 18bc18e6e7..5717135b80 100644 --- a/doc/classes/MultiplayerPeerExtension.xml +++ b/doc/classes/MultiplayerPeerExtension.xml @@ -9,6 +9,20 @@ <tutorials> </tutorials> <methods> + <method name="_close" qualifiers="virtual"> + <return type="void" /> + <description> + Called when the multiplayer peer should be immediately closed (see [method MultiplayerPeer.close]). + </description> + </method> + <method name="_disconnect_peer" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="p_peer" type="int" /> + <param index="1" name="p_force" type="bool" /> + <description> + Called when the connected [param p_peer] should be forcibly disconnected (see [method MultiplayerPeer.disconnect_peer]). + </description> + </method> <method name="_get_available_packet_count" qualifiers="virtual const"> <return type="int" /> <description> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 3437e0eca4..8cf7824ff7 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -5,7 +5,7 @@ </brief_description> <description> 2D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent2D] is physics safe. - [b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. + [b]Note:[/b] After setting [member target_location] it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. </description> <tutorials> </tutorials> @@ -13,7 +13,7 @@ <method name="distance_to_target" qualifiers="const"> <return type="float" /> <description> - Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate. + Returns the distance to the target location, using the agent's global position. The user must set [member target_location] in order for this to be accurate. </description> </method> <method name="get_final_location"> @@ -59,12 +59,6 @@ Returns the [RID] of this agent on the [NavigationServer2D]. </description> </method> - <method name="get_target_location" qualifiers="const"> - <return type="Vector2" /> - <description> - Returns the user defined [Vector2] after setting the target location. - </description> - </method> <method name="is_navigation_finished"> <return type="bool" /> <description> @@ -74,13 +68,13 @@ <method name="is_target_reachable"> <return type="bool" /> <description> - Returns true if the target location is reachable. The target location is set using [method set_target_location]. + Returns true if [member target_location] is reachable. </description> </method> <method name="is_target_reached" qualifiers="const"> <return type="bool" /> <description> - Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. + Returns true if [member target_location] is reached. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. </description> </method> <method name="set_navigation_layer_value"> @@ -98,13 +92,6 @@ Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the [code]agent[/code] on the NavigationServer. </description> </method> - <method name="set_target_location"> - <return type="void" /> - <param index="0" name="location" type="Vector2" /> - <description> - Sets the user desired final location. This will clear the current navigation path. - </description> - </method> <method name="set_velocity"> <return type="void" /> <param index="0" name="velocity" type="Vector2" /> @@ -142,6 +129,9 @@ <member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0"> The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. </member> + <member name="target_location" type="Vector2" setter="set_target_location" getter="get_target_location" default="Vector2(0, 0)"> + The user-defined target location. Setting this property will clear the current navigation path. + </member> <member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="20.0"> The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. </member> @@ -159,11 +149,11 @@ </signal> <signal name="target_reached"> <description> - Notifies when the player defined target, set with [method set_target_location], is reached. + Notifies when the player-defined [member target_location] is reached. </description> </signal> <signal name="velocity_computed"> - <param index="0" name="safe_velocity" type="Vector3" /> + <param index="0" name="safe_velocity" type="Vector2" /> <description> Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. Only emitted when [member avoidance_enabled] is true. </description> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index 3bb5b361ca..44c17647f7 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -5,7 +5,7 @@ </brief_description> <description> 3D Agent that is used in navigation to reach a location while avoiding static and dynamic obstacles. The dynamic obstacles are avoided using RVO collision avoidance. The agent needs navigation data to work correctly. [NavigationAgent3D] is physics safe. - [b]Note:[/b] After [method set_target_location] is used it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. + [b]Note:[/b] After setting [member target_location] it is required to use the [method get_next_location] function once every physics frame to update the internal path logic of the NavigationAgent. The returned vector position from this function should be used as the next movement position for the agent's parent Node. </description> <tutorials> </tutorials> @@ -13,7 +13,7 @@ <method name="distance_to_target" qualifiers="const"> <return type="float" /> <description> - Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate. + Returns the distance to the target location, using the agent's global position. The user must set [member target_location] in order for this to be accurate. </description> </method> <method name="get_final_location"> @@ -59,12 +59,6 @@ Returns the [RID] of this agent on the [NavigationServer3D]. </description> </method> - <method name="get_target_location" qualifiers="const"> - <return type="Vector3" /> - <description> - Returns the user defined [Vector3] after setting the target location. - </description> - </method> <method name="is_navigation_finished"> <return type="bool" /> <description> @@ -74,13 +68,13 @@ <method name="is_target_reachable"> <return type="bool" /> <description> - Returns true if the target location is reachable. The target location is set using [method set_target_location]. + Returns true if [member target_location] is reachable. </description> </method> <method name="is_target_reached" qualifiers="const"> <return type="bool" /> <description> - Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. + Returns true if [member target_location] is reached. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. </description> </method> <method name="set_navigation_layer_value"> @@ -98,13 +92,6 @@ Sets the [RID] of the navigation map this NavigationAgent node should use and also updates the [code]agent[/code] on the NavigationServer. </description> </method> - <method name="set_target_location"> - <return type="void" /> - <param index="0" name="location" type="Vector3" /> - <description> - Sets the user desired final location. This will clear the current navigation path. - </description> - </method> <method name="set_velocity"> <return type="void" /> <param index="0" name="velocity" type="Vector3" /> @@ -148,6 +135,9 @@ <member name="target_desired_distance" type="float" setter="set_target_desired_distance" getter="get_target_desired_distance" default="1.0"> The distance threshold before the final target point is considered to be reached. This will allow an agent to not have to hit the point of the final target exactly, but only the area. If this value is set to low the NavigationAgent will be stuck in a repath loop cause it will constantly overshoot or undershoot the distance to the final target point on each physics frame update. </member> + <member name="target_location" type="Vector3" setter="set_target_location" getter="get_target_location" default="Vector3(0, 0, 0)"> + The user-defined target location. Setting this property will clear the current navigation path. + </member> <member name="time_horizon" type="float" setter="set_time_horizon" getter="get_time_horizon" default="5.0"> The minimal amount of time for which this agent's velocities, that are computed with the collision avoidance algorithm, are safe with respect to other agents. The larger the number, the sooner the agent will respond to other agents, but less freedom in choosing its velocities. Must be positive. </member> @@ -165,7 +155,7 @@ </signal> <signal name="target_reached"> <description> - Notifies when the player defined target, set with [method set_target_location], is reached. + Notifies when the player-defined [member target_location] is reached. </description> </signal> <signal name="velocity_computed"> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 620895d8d8..b83bff5d5e 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -39,7 +39,7 @@ <method name="_get_configuration_warnings" qualifiers="virtual const"> <return type="PackedStringArray" /> <description> - The elements in the array returned from this method are displayed as warnings in the Scene Dock if the script that overrides it is a [code]tool[/code] script. + The elements in the array returned from this method are displayed as warnings in the Scene dock if the script that overrides it is a [code]tool[/code] script. Returning an empty array produces no warnings. Call [method update_configuration_warnings] when the warnings need to be updated for this node. </description> @@ -560,7 +560,7 @@ <method name="print_tree_pretty"> <return type="void" /> <description> - Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees. + Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the Scene Dock. It is useful for inspecting larger trees. [b]Example output:[/b] [codeblock] ┖╴TheGame @@ -630,7 +630,7 @@ <return type="int" enum="Error" /> <param index="0" name="method" type="StringName" /> <description> - Sends a remote procedure call request for the given [param method] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns [code]null[/code]. + Sends a remote procedure call request for the given [param method] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behavior depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns [code]null[/code]. [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [code]server_disconnected[/code] or by checking [code]get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED[/code]. </description> </method> diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index bc2570b183..b6024b1887 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -290,7 +290,7 @@ <member name="rotation_edit_mode" type="int" setter="set_rotation_edit_mode" getter="get_rotation_edit_mode" enum="Node3D.RotationEditMode" default="0"> Specify how rotation (and scale) will be presented in the editor. </member> - <member name="rotation_order" type="int" setter="set_rotation_order" getter="get_rotation_order" enum="Node3D.RotationOrder" default="2"> + <member name="rotation_order" type="int" setter="set_rotation_order" getter="get_rotation_order" enum="EulerOrder" default="2"> Specify the axis rotation order of the [member rotation] property. The final orientation is constructed by rotating the Euler angles in the order specified by this property. </member> <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)"> @@ -342,17 +342,5 @@ </constant> <constant name="ROTATION_EDIT_MODE_BASIS" value="2" enum="RotationEditMode"> </constant> - <constant name="ROTATION_ORDER_XYZ" value="0" enum="RotationOrder"> - </constant> - <constant name="ROTATION_ORDER_XZY" value="1" enum="RotationOrder"> - </constant> - <constant name="ROTATION_ORDER_YXZ" value="2" enum="RotationOrder"> - </constant> - <constant name="ROTATION_ORDER_YZX" value="3" enum="RotationOrder"> - </constant> - <constant name="ROTATION_ORDER_ZXY" value="4" enum="RotationOrder"> - </constant> - <constant name="ROTATION_ORDER_ZYX" value="5" enum="RotationOrder"> - </constant> </constants> </class> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index c8491b3a03..f4a5288481 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -4,7 +4,8 @@ Operating System functions. </brief_description> <description> - Operating System functions. OS wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, delays, environment variables, execution of binaries, command line, etc. + Operating System functions. [OS] wraps the most common functionality to communicate with the host operating system, such as the clipboard, video driver, delays, environment variables, execution of binaries, command line, etc. + [b]Note:[/b] In Godot 4, [OS] functions related to window management were moved to the [DisplayServer] singleton. </description> <tutorials> <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> @@ -133,7 +134,7 @@ <method name="get_cache_dir" qualifiers="const"> <return type="String" /> <description> - Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir]. + Returns the [i]global[/i] cache data directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. </description> </method> @@ -191,7 +192,7 @@ <method name="get_config_dir" qualifiers="const"> <return type="String" /> <description> - Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir]. + Returns the [i]global[/i] user configuration directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. </description> </method> @@ -199,14 +200,14 @@ <return type="PackedStringArray" /> <description> Returns an array of MIDI device names. - The returned array will be empty if the system MIDI driver has not previously been initialised with [method open_midi_inputs]. + The returned array will be empty if the system MIDI driver has not previously been initialized with [method open_midi_inputs]. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_data_dir" qualifiers="const"> <return type="String" /> <description> - Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir]. + Returns the [i]global[/i] user data directory according to the operating system's standards. On the Linux/BSD platform, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=$DOCS_URL/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. </description> </method> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index e663f47ddf..318f2cfade 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -108,7 +108,8 @@ <return type="Variant" /> <param index="0" name="method" type="StringName" /> <description> - Calls the [param method] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: + Calls the [param method] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. + [b]Example:[/b] [codeblocks] [gdscript] var node = Node3D.new() @@ -126,7 +127,8 @@ <return type="Variant" /> <param index="0" name="method" type="StringName" /> <description> - Calls the [param method] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: + Calls the [param method] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. + [b]Example:[/b] [codeblocks] [gdscript] var node = Node3D.new() @@ -318,7 +320,8 @@ <return type="int" enum="Error" /> <param index="0" name="signal" type="StringName" /> <description> - Emits the given [param signal]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: + Emits the given [param signal]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. + [b]Example:[/b] [codeblocks] [gdscript] emit_signal("hit", "sword", 100) @@ -366,7 +369,8 @@ <return type="Variant" /> <param index="0" name="property_path" type="NodePath" /> <description> - Gets the object's property indexed by the given [param property_path]. The path should be a [NodePath] relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code]. + Gets the object's property indexed by the given [param property_path]. The path should be a [NodePath] relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. + [b]Examples:[/b] [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code]. [b]Note:[/b] Even though the method takes [NodePath] argument, it doesn't support actual paths to [Node]s in the scene tree, only colon-separated sub-property paths. For the purpose of nodes, use [method Node.get_node_and_resource] instead. </description> </method> @@ -384,7 +388,7 @@ <description> Returns the object's metadata entry for the given [param name]. Throws error if the entry does not exist, unless [param default] is not [code]null[/code] (in which case the default value will be returned). See also [method has_meta], [method set_meta] and [method remove_meta]. - [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited. </description> </method> <method name="get_meta_list" qualifiers="const"> @@ -430,7 +434,7 @@ <param index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if a metadata entry is found with the given [param name]. See also [method get_meta], [method set_meta] and [method remove_meta]. - [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited. </description> </method> <method name="has_method" qualifiers="const"> @@ -502,7 +506,7 @@ <param index="0" name="name" type="StringName" /> <description> Removes a given entry from the object's metadata. See also [method has_meta], [method get_meta] and [method set_meta]. - [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited. </description> </method> <method name="set"> @@ -535,7 +539,8 @@ <param index="0" name="property_path" type="NodePath" /> <param index="1" name="value" type="Variant" /> <description> - Assigns a new value to the property identified by the [param property_path]. The path should be a [NodePath] relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Example: + Assigns a new value to the property identified by the [param property_path]. The path should be a [NodePath] relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. + [b]Example:[/b] [codeblocks] [gdscript] var node = Node2D.new() @@ -566,7 +571,7 @@ <description> Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [Variant] value. To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code]. See also [method has_meta] and [method get_meta]. - [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the inspector and should not be edited. + [b]Note:[/b] Metadata that has a [param name] starting with an underscore ([code]_[/code]) is considered editor-only. Editor-only metadata is not displayed in the Inspector and should not be edited. </description> </method> <method name="set_script"> diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml index 0bebc7ea43..bc16fba500 100644 --- a/doc/classes/OccluderInstance3D.xml +++ b/doc/classes/OccluderInstance3D.xml @@ -42,7 +42,7 @@ </member> <member name="occluder" type="Occluder3D" setter="set_occluder" getter="get_occluder"> The occluder resource for this [OccluderInstance3D]. You can generate an occluder resource by selecting an [OccluderInstance3D] node then using the [b]Bake Occluders[/b] button at the top of the editor. - You can also draw your own 2D occluder polygon by adding a new [PolygonOccluder3D] resource to the [member occluder] property in the inspector. + You can also draw your own 2D occluder polygon by adding a new [PolygonOccluder3D] resource to the [member occluder] property in the Inspector. Alternatively, you can select a primitive occluder to use: [QuadOccluder3D], [BoxOccluder3D] or [SphereOccluder3D]. </member> </members> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 199535298c..e63e822648 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -216,7 +216,7 @@ <signal name="item_focused"> <param index="0" name="index" type="int" /> <description> - Emitted when the user navigates to an item using the [code]ui_up[/code] or [code]ui_down[/code] actions. The index of the item selected is passed as argument. + Emitted when the user navigates to an item using the [member ProjectSettings.input/ui_up] or [member ProjectSettings.input/ui_down] input actions. The index of the item selected is passed as argument. </description> </signal> <signal name="item_selected"> diff --git a/doc/classes/PhysicsTestMotionParameters2D.xml b/doc/classes/PhysicsTestMotionParameters2D.xml index d8f96511dd..5b969ea869 100644 --- a/doc/classes/PhysicsTestMotionParameters2D.xml +++ b/doc/classes/PhysicsTestMotionParameters2D.xml @@ -30,7 +30,7 @@ </member> <member name="recovery_as_collision" type="bool" setter="set_recovery_as_collision_enabled" getter="is_recovery_as_collision_enabled" default="false"> If set to [code]true[/code], any depenetration from the recovery phase is reported as a collision; this is used e.g. by [CharacterBody2D] for improving floor detection during floor snapping. - If set to [code]false[/code], only collisions resulting from the motion are reported, which is generally the desired behaviour. + If set to [code]false[/code], only collisions resulting from the motion are reported, which is generally the desired behavior. </member> </members> </class> diff --git a/doc/classes/PhysicsTestMotionParameters3D.xml b/doc/classes/PhysicsTestMotionParameters3D.xml index e8f80ae131..ea9bca6a35 100644 --- a/doc/classes/PhysicsTestMotionParameters3D.xml +++ b/doc/classes/PhysicsTestMotionParameters3D.xml @@ -33,7 +33,7 @@ </member> <member name="recovery_as_collision" type="bool" setter="set_recovery_as_collision_enabled" getter="is_recovery_as_collision_enabled" default="false"> If set to [code]true[/code], any depenetration from the recovery phase is reported as a collision; this is used e.g. by [CharacterBody3D] for improving floor detection during floor snapping. - If set to [code]false[/code], only collisions resulting from the motion are reported, which is generally the desired behaviour. + If set to [code]false[/code], only collisions resulting from the motion are reported, which is generally the desired behavior. </member> </members> </class> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 12f8055180..a3fc326351 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -92,6 +92,7 @@ [b]Note:[/b] This returns a copy of the [PackedVector2Array] rather than a reference. </member> <member name="polygons" type="Array" setter="set_polygons" getter="get_polygons" default="[]"> + The list of polygons, in case more than one is being represented. Every individual polygon is stored as a [PackedInt32Array] where each [int] is an index to a point in [member polygon]. If empty, this property will be ignored, and the resulting single polygon will be composed of all points in [member polygon], using the order they are stored in. </member> <member name="skeleton" type="NodePath" setter="set_skeleton" getter="get_skeleton" default="NodePath("")"> </member> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index c99760996f..0dcb33ac4c 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -526,15 +526,14 @@ <signal name="id_focused"> <param index="0" name="id" type="int" /> <description> - Emitted when user navigated to an item of some [param id] using [code]ui_up[/code] or [code]ui_down[/code] action. + Emitted when the user navigated to an item of some [param id] using the [member ProjectSettings.input/ui_up] or [member ProjectSettings.input/ui_down] input action. </description> </signal> <signal name="id_pressed"> <param index="0" name="id" type="int" /> <description> Emitted when an item of some [param id] is pressed or its accelerator is activated. - - [b]Note:[/b] If [param id] is negative (either explicitly or due to overflow), this will return the correponding index instead. + [b]Note:[/b] If [param id] is negative (either explicitly or due to overflow), this will return the corresponding index instead. </description> </signal> <signal name="index_pressed"> diff --git a/doc/classes/PortableCompressedTexture2D.xml b/doc/classes/PortableCompressedTexture2D.xml index c7e2f2fbdc..a0492f2c07 100644 --- a/doc/classes/PortableCompressedTexture2D.xml +++ b/doc/classes/PortableCompressedTexture2D.xml @@ -22,7 +22,7 @@ <description> Initializes the compressed texture from a base image. The compression mode must be provided. If this image will be used as a normal map, the "normal map" flag is recommended, to ensure optimum quality. - If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WEBP compression quality. + If lossy compression is requested, the quality setting can optionally be provided. This maps to Lossy WebP compression quality. </description> </method> <method name="get_compression_mode" qualifiers="const"> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 7843104a59..fae88a401b 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -251,7 +251,7 @@ Changes to this setting will only be applied upon restarting the application. </member> <member name="application/run/disable_stdout" type="bool" setter="" getter="" default="false"> - If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] command line argument. See also [member application/run/disable_stderr]. + If [code]true[/code], disables printing to standard output. This is equivalent to starting the editor or project with the [code]--quiet[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. See also [member application/run/disable_stderr]. Changes to this setting will only be applied upon restarting the application. </member> <member name="application/run/flush_stdout_on_print" type="bool" setter="" getter="" default="false"> @@ -297,7 +297,7 @@ <member name="audio/driver/driver" type="String" setter="" getter=""> Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used. The [code]Dummy[/code] audio driver disables all audio playback and recording, which is useful for non-game applications as it reduces CPU usage. It also prevents the engine from appearing as an application playing audio in the OS' audio mixer. - [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--audio-driver[/code] command line argument. + [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--audio-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </member> <member name="audio/driver/enable_input" type="bool" setter="" getter="" default="false"> If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS. @@ -480,7 +480,7 @@ Print GPU profile information to standard output every second. This includes how long each frame takes the GPU to render on average, broken down into different steps of the render pipeline, such as CanvasItems, shadows, glow, etc. </member> <member name="debug/settings/stdout/verbose_stdout" type="bool" setter="" getter="" default="false"> - Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the [code]--verbose[/code] or [code]-v[/code] command line argument, even on an exported project. See also [method OS.is_stdout_verbose] and [method @GlobalScope.print_verbose]. + Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. This can also be enabled using the [code]--verbose[/code] or [code]-v[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url], even on an exported project. See also [method OS.is_stdout_verbose] and [method @GlobalScope.print_verbose]. </member> <member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color(1, 0.2, 0.1, 0.8)"> Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. @@ -565,6 +565,9 @@ The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values. [b]Note:[/b] When set to a portrait orientation, this project setting does not flip the project resolution's width and height automatically. Instead, you have to set [member display/window/size/viewport_width] and [member display/window/size/viewport_height] accordingly. </member> + <member name="display/window/ios/allow_high_refresh_rate" type="bool" setter="" getter="" default="true"> + If [code]true[/code], iOS devices that support high refresh rate/"ProMotion" will be allowed to render at up to 120 frames per second. + </member> <member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true"> If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button. </member> @@ -630,7 +633,7 @@ </member> <member name="editor/movie_writer/fps" type="int" setter="" getter="" default="60"> The number of frames per second to record in the video when writing a movie. Simulation speed will adjust to always match the specified framerate, which means the engine will appear to run slower at higher [member editor/movie_writer/fps] values. Certain FPS values will require you to adjust [member editor/movie_writer/mix_rate] to prevent audio from desynchronizing over time. - This can be specified manually on the command line using the [code]--fixed-fps <fps>[/code] command line argument. + This can be specified manually on the command line using the [code]--fixed-fps <fps>[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </member> <member name="editor/movie_writer/mix_rate" type="int" setter="" getter="" default="48000"> The audio mix rate to use in the recorded audio when writing a movie (in Hz). This can be different from [member audio/driver/mix_rate], but this value must be divisible by [member editor/movie_writer/fps] to prevent audio from desynchronizing over time. @@ -694,7 +697,8 @@ Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden. </member> <member name="gui/common/swap_cancel_ok" type="bool" setter="" getter=""> - If [code]true[/code], swaps Cancel and OK buttons in dialogs on Windows and UWP to follow interface conventions. + If [code]true[/code], swaps [b]Cancel[/b] and [b]OK[/b] buttons in dialogs on Windows and UWP to follow interface conventions. [method DisplayServer.get_swap_cancel_ok] can be used to query whether buttons are swapped at run-time. + [b]Note:[/b] This doesn't affect native dialogs such as the ones spawned by [method DisplayServer.dialog_show]. </member> <member name="gui/common/text_edit_undo_stack_max_size" type="int" setter="" getter="" default="1024"> Maximum undo/redo history size for [TextEdit] fields. @@ -722,14 +726,14 @@ [b]Note:[/b] This setting does not affect custom [Font]s used within the project. </member> <member name="gui/theme/default_font_subpixel_positioning" type="int" setter="" getter="" default="1"> - Default font glyph sub-pixel positioning mode. See [member FontFile.subpixel_positioning]. + Default font glyph subpixel positioning mode. See [member FontFile.subpixel_positioning]. </member> <member name="gui/theme/default_theme_scale" type="float" setter="" getter="" default="1.0"> - The default scale factor for [Control]s, when not overriden by a [Theme]. + The default scale factor for [Control]s, when not overridden by a [Theme]. [b]Note:[/b] This property is only read when the project starts. To change the default scale at runtime, set [member ThemeDB.fallback_base_scale] instead. </member> <member name="gui/theme/lcd_subpixel_layout" type="int" setter="" getter="" default="1"> - LCD sub-pixel layout used for font anti-aliasing. See [enum TextServer.FontLCDSubpixelLayout]. + LCD subpixel layout used for font anti-aliasing. See [enum TextServer.FontLCDSubpixelLayout]. </member> <member name="gui/timers/incremental_search_max_interval_msec" type="int" setter="" getter="" default="2000"> Timer setting for incremental search in [Tree], [ItemList], etc. controls (in milliseconds). @@ -855,6 +859,18 @@ <member name="input/ui_text_backspace_word.macos" type="Dictionary" setter="" getter=""> macOS specific override for the shortcut to delete a word. </member> + <member name="input/ui_text_caret_add_above" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to add an additional caret above every caret of a text + </member> + <member name="input/ui_text_caret_add_above.macos" type="Dictionary" setter="" getter=""> + macOS specific override for the shortcut to add a caret above every caret + </member> + <member name="input/ui_text_caret_add_below" type="Dictionary" setter="" getter=""> + Default [InputEventAction] to add an additional caret below every caret of a text + </member> + <member name="input/ui_text_caret_add_below.macos" type="Dictionary" setter="" getter=""> + macOS specific override for the shortcut to add a caret below every caret + </member> <member name="input/ui_text_caret_document_end" type="Dictionary" setter="" getter=""> Default [InputEventAction] to move the text cursor the the end of the text. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. @@ -921,6 +937,11 @@ <member name="input/ui_text_caret_word_right.macos" type="Dictionary" setter="" getter=""> macOS specific override for the shortcut to move the text cursor forward one word. </member> + <member name="input/ui_text_clear_carets_and_selection" type="Dictionary" setter="" getter=""> + If there's only one caret active and with a selection, clears the selection. + In case there's more than one caret active, removes the secondary carets and clears their selections. + [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. + </member> <member name="input/ui_text_completion_accept" type="Dictionary" setter="" getter=""> Default [InputEventAction] to accept an autocompetion hint. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. @@ -998,7 +1019,7 @@ [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> <member name="input/ui_text_toggle_insert_mode" type="Dictionary" setter="" getter=""> - Default [InputEventAction] to toggle [i]instert mode[/i] in a text field. While in insert mode, inserting new text overrides the character after the cursor, unless the next character is a new line. + Default [InputEventAction] to toggle [i]insert mode[/i] in a text field. While in insert mode, inserting new text overrides the character after the cursor, unless the next character is a new line. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> <member name="input/ui_undo" type="Dictionary" setter="" getter=""> @@ -1017,7 +1038,7 @@ </member> <member name="input_devices/pen_tablet/driver" type="String" setter="" getter=""> Specifies the tablet driver to use. If left empty, the default driver will be used. - [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--tablet-driver[/code] command line argument. + [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--tablet-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </member> <member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter=""> Override for [member input_devices/pen_tablet/driver] on Windows. @@ -1082,8 +1103,8 @@ <member name="internationalization/rendering/text_driver" type="String" setter="" getter="" default=""""> Specifies the [TextServer] to use. If left empty, the default will be used. "ICU / HarfBuzz / Graphite" is the most advanced text driver, supporting right-to-left typesetting and complex scripts (for languages like Arabic, Hebrew, etc). The "Fallback" text driver does not support right-to-left typesetting and complex scripts. - [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--text-driver[/code] command line argument. - [b]Note:[/b] There is an additional [code]Dummy[/code] text driver available, which disables all text rendering and font-related functionality. This driver is not listed in the project settings, but it can be enabled when running the editor or project using the [code]--text-driver Dummy[/code] command line argument. + [b]Note:[/b] The driver in use can be overridden at runtime via the [code]--text-driver[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. + [b]Note:[/b] There is an additional [code]Dummy[/code] text driver available, which disables all text rendering and font-related functionality. This driver is not listed in the project settings, but it can be enabled when running the editor or project using the [code]--text-driver Dummy[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. </member> <member name="layer_names/2d_navigation/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1". @@ -1870,7 +1891,7 @@ Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better. </member> <member name="rendering/environment/ssao/adaptive_target" type="float" setter="" getter="" default="0.5"> - Quality target to use when [member rendering/environment/ssao/quality] is set to [code]ULTRA[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]MEDIUM[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. + Quality target to use when [member rendering/environment/ssao/quality] is set to [code]Ultra[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]Medium[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. </member> <member name="rendering/environment/ssao/blur_passes" type="int" setter="" getter="" default="2"> Number of blur passes to use when computing screen-space ambient occlusion. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail. @@ -1885,10 +1906,10 @@ If [code]true[/code], screen-space ambient occlusion will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details. If [code]false[/code], screen-space ambient occlusion will be rendered at full size. </member> <member name="rendering/environment/ssao/quality" type="int" setter="" getter="" default="2"> - Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssao/adaptive_target] setting. + Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]Ultra[/code] will use the [member rendering/environment/ssao/adaptive_target] setting. </member> <member name="rendering/environment/ssil/adaptive_target" type="float" setter="" getter="" default="0.5"> - Quality target to use when [member rendering/environment/ssil/quality] is set to [code]ULTRA[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]MEDIUM[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. When using the adaptive target, the performance cost scales with the complexity of the scene. + Quality target to use when [member rendering/environment/ssil/quality] is set to [code]Ultra[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]Medium[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. When using the adaptive target, the performance cost scales with the complexity of the scene. </member> <member name="rendering/environment/ssil/blur_passes" type="int" setter="" getter="" default="4"> Number of blur passes to use when computing screen-space indirect lighting. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail. @@ -1903,7 +1924,7 @@ If [code]true[/code], screen-space indirect lighting will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details and may result in some objects appearing to glow at their edges. </member> <member name="rendering/environment/ssil/quality" type="int" setter="" getter="" default="2"> - Sets the quality of the screen-space indirect lighting effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssil/adaptive_target] setting. + Sets the quality of the screen-space indirect lighting effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]Ultra[/code] will use the [member rendering/environment/ssil/adaptive_target] setting. </member> <member name="rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale" type="float" setter="" getter="" default="0.01"> Scales the depth over which the subsurface scattering effect is applied. A high value may allow light to scatter into a part of the mesh or another mesh that is close in screen space but far in depth. @@ -2240,7 +2261,7 @@ Action map configuration to load by default. </member> <member name="xr/openxr/enabled" type="bool" setter="" getter="" default="false"> - If [code]true[/code] Godot will setup and initialise OpenXR on startup. + If [code]true[/code] Godot will setup and initialize OpenXR on startup. </member> <member name="xr/openxr/form_factor" type="int" setter="" getter="" default=""0""> Specify whether OpenXR should be configured for an HMD or a hand held device. diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml index 78ead65cdd..61e8357809 100644 --- a/doc/classes/PropertyTweener.xml +++ b/doc/classes/PropertyTweener.xml @@ -13,7 +13,8 @@ <method name="as_relative"> <return type="PropertyTweener" /> <description> - When called, the final value will be used as a relative value instead. Example: + When called, the final value will be used as a relative value instead. + [b]Example:[/b] [codeblock] var tween = get_tree().create_tween() tween.tween_property(self, "position", Vector2.RIGHT * 100, 1).as_relative() #the node will move by 100 pixels to the right @@ -24,7 +25,8 @@ <return type="PropertyTweener" /> <param index="0" name="value" type="Variant" /> <description> - Sets a custom initial value to the [PropertyTweener]. Example: + Sets a custom initial value to the [PropertyTweener]. + [b]Example:[/b] [codeblock] var tween = get_tree().create_tween() tween.tween_property(self, "position", Vector2(200, 100), 1).from(Vector2(100, 100)) #this will move the node from position (100, 100) to (200, 100) diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml index 99dffeff9d..ac2eda9f28 100644 --- a/doc/classes/Quaternion.xml +++ b/doc/classes/Quaternion.xml @@ -43,12 +43,6 @@ </constructor> <constructor name="Quaternion"> <return type="Quaternion" /> - <param index="0" name="euler_yxz" type="Vector3" /> - <description> - </description> - </constructor> - <constructor name="Quaternion"> - <return type="Quaternion" /> <param index="0" name="from" type="Basis" /> <description> Constructs a quaternion from the given [Basis]. @@ -86,6 +80,13 @@ <description> </description> </method> + <method name="from_euler" qualifiers="static"> + <return type="Quaternion" /> + <param index="0" name="euler" type="Vector3" /> + <description> + Constructs a Quaternion from Euler angles in YXZ rotation order. + </description> + </method> <method name="get_angle" qualifiers="const"> <return type="float" /> <description> @@ -98,8 +99,9 @@ </method> <method name="get_euler" qualifiers="const"> <return type="Vector3" /> + <param index="0" name="order" type="int" default="2" /> <description> - Returns Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). + Returns the quaternion's rotation in the form of Euler angles. The Euler order depends on the [param order] parameter, for example using the YXZ convention: since this method decomposes, first Z, then X, and Y last. See the [enum EulerOrder] enum for possible values. The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). </description> </method> <method name="inverse" qualifiers="const"> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index 16e6e86f9e..9764318ee4 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -16,6 +16,13 @@ Called when the [Range]'s value is changed (following the same conditions as [signal value_changed]). </description> </method> + <method name="set_value_no_signal"> + <return type="void" /> + <param index="0" name="value" type="float" /> + <description> + Sets the [Range]'s current value to the specified [param value], without emitting the [signal value_changed] signal. + </description> + </method> <method name="share"> <return type="void" /> <param index="0" name="with" type="Node" /> @@ -59,7 +66,7 @@ If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer. </member> <member name="value" type="float" setter="set_value" getter="get_value"> - Range's current value. + Range's current value. Changing this property (even via code) will trigger [signal value_changed] signal. Use [method set_value_no_signal] if you want to avoid it. </member> </members> <signals> diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 51c2498ea7..cb13697cc2 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -232,7 +232,7 @@ <param index="0" name="draw_list" type="int" /> <param index="1" name="color" type="Color" /> <description> - Sets blend constants for draw list, blend constants are used only if the graphics pipeline is created with [code]DYNAMIC_STATE_BLEND_CONSTANTS[/code] flag set. + Sets blend constants for draw list, blend constants are used only if the graphics pipeline is created with [constant DYNAMIC_STATE_BLEND_CONSTANTS] flag set. </description> </method> <method name="draw_list_set_push_constant"> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 376ba34056..1c02d58299 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -13,6 +13,7 @@ Similarly, in 2D, a canvas is needed to draw all canvas items. In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible. In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. + [b]Headless mode:[/b] Starting the engine with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url] disables all rendering and window management functions. Most functions from [RenderingServer] will return dummy values in this case. </description> <tutorials> <link title="Optimization using Servers">$DOCS_URL/tutorials/performance/using_servers.html</link> @@ -498,6 +499,14 @@ Sets if the [CanvasItem] uses its parent's material. </description> </method> + <method name="canvas_item_set_visibility_layer"> + <return type="void" /> + <param index="0" name="item" type="RID" /> + <param index="1" name="visibility_layer" type="int" /> + <description> + Sets the rendering visibility layer associated with this [CanvasItem]. Only [Viewport] nodes with a matching rendering mask will render this [CanvasItem]. + </description> + </method> <method name="canvas_item_set_visibility_notifier"> <return type="void" /> <param index="0" name="item" type="RID" /> @@ -3142,6 +3151,14 @@ If [code]true[/code], sets the viewport active, else sets it inactive. </description> </method> + <method name="viewport_set_canvas_cull_mask"> + <return type="void" /> + <param index="0" name="viewport" type="RID" /> + <param index="1" name="canvas_cull_mask" type="int" /> + <description> + Sets the rendering mask associated with this [Viewport]. Only [CanvasItem] nodes with a matching rendering visibility layer will be rendered by this [Viewport]. + </description> + </method> <method name="viewport_set_canvas_stacking"> <return type="void" /> <param index="0" name="viewport" type="RID" /> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index b2b8a37e39..e533fc1e32 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -24,7 +24,7 @@ <param index="0" name="subresources" type="bool" default="false" /> <description> Duplicates this resource, returning a new resource with its [code]export[/code]ed or [constant PROPERTY_USAGE_STORAGE] properties copied from the original. - If [param subresources] is [code]false[/code], a shallow copy is returned. Nested resources within subresources are not duplicated and are shared from the original resource. This behavior can be overriden by the [constant PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE] flag. + If [param subresources] is [code]false[/code], a shallow copy is returned. Nested resources within subresources are not duplicated and are shared from the original resource. This behavior can be overridden by the [constant PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE] flag. [b]Note:[/b] For custom resources, this method will fail if [method Object._init] has been defined with required parameters. </description> </method> @@ -51,7 +51,7 @@ <method name="get_rid" qualifiers="const"> <return type="RID" /> <description> - Returns the [RID] of this resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], and so on) are high-level abstractions of resources stored in a specialised server ([DisplayServer], [RenderingServer], etc.), so this function will return the original [RID]. + Returns the [RID] of this resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], and so on) are high-level abstractions of resources stored in a specialized server ([DisplayServer], [RenderingServer], etc.), so this function will return the original [RID]. </description> </method> <method name="setup_local_to_scene"> diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index 05bfcf3446..1f2af6d157 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -24,6 +24,15 @@ Returns whether the given resource object can be saved by this saver. </description> </method> + <method name="_recognize_path" qualifiers="virtual const"> + <return type="bool" /> + <param index="0" name="resource" type="Resource" /> + <param index="1" name="path" type="String" /> + <description> + Returns [code]true[/code] if this saver handles a given save path and [code]false[/code] otherwise. + If this method is not implemented, the default behavior returns whether the path's extension is within the ones provided by [method _get_recognized_extensions]. + </description> + </method> <method name="_save" qualifiers="virtual"> <return type="int" /> <param index="0" name="resource" type="Resource" /> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index b5a917b2bb..cb2481f705 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -479,9 +479,6 @@ <member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true"> If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code]. </member> - <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> - If [code]true[/code], the label uses the custom font color. - </member> <member name="progress_bar_delay" type="int" setter="set_progress_bar_delay" getter="get_progress_bar_delay" default="1000"> The delay after which the loading progress bar is displayed, in milliseconds. Set to [code]-1[/code] to disable progress bar entirely. [b]Note:[/b] Progress bar is displayed only if [member threaded] is enabled. @@ -629,8 +626,8 @@ <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The default tint of text outline. </theme_item> - <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> - The color of selected text, used when [member selection_enabled] is [code]true[/code]. + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> + The color of selected text, used when [member selection_enabled] is [code]true[/code]. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored. </theme_item> <theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> The color of the font's shadow. @@ -668,6 +665,12 @@ <theme_item name="table_v_separation" data_type="constant" type="int" default="3"> The vertical separation of elements in a table. </theme_item> + <theme_item name="text_highlight_h_padding" data_type="constant" type="int" default="3"> + The horizontal padding around a highlighting and background color box. + </theme_item> + <theme_item name="text_highlight_v_padding" data_type="constant" type="int" default="3"> + The vertical padding around a highlighting and background color box. + </theme_item> <theme_item name="bold_font" data_type="font" type="Font"> The font used for bold text. </theme_item> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index f5018c25ff..b96b7187e4 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -6,7 +6,7 @@ <description> A ScrollContainer node meant to contain a [Control] child. ScrollContainers will automatically create a scrollbar child ([HScrollBar], [VScrollBar], or both) when needed and will only draw the Control within the ScrollContainer area. Scrollbars will automatically be drawn at the right (for vertical) or bottom (for horizontal) and will enable dragging to move the viewable Control (and its children) within the ScrollContainer. Scrollbars will also automatically resize the grabber based on the [member Control.custom_minimum_size] of the Control relative to the ScrollContainer. - Works great with a [Panel] control. You can set [code]EXPAND[/code] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). + Works great with a [Panel] control. You can set [constant Control.SIZE_EXPAND] on the children's size flags, so they will upscale to the ScrollContainer's size if it's larger (scroll is invisible for the chosen dimension). </description> <tutorials> <link title="GUI containers">$DOCS_URL/tutorials/ui/gui_containers.html</link> diff --git a/doc/classes/ShapeCast2D.xml b/doc/classes/ShapeCast2D.xml index 36c3beecb1..5a8eec3921 100644 --- a/doc/classes/ShapeCast2D.xml +++ b/doc/classes/ShapeCast2D.xml @@ -58,6 +58,13 @@ Returns the collided [Object] of one of the multiple collisions at [param index], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> + <method name="get_collider_rid" qualifiers="const"> + <return type="RID" /> + <param index="0" name="index" type="int" /> + <description> + Returns the [RID] of the collided object of one of the multiple collisions at [param index]. + </description> + </method> <method name="get_collider_shape" qualifiers="const"> <return type="int" /> <param index="0" name="index" type="int" /> diff --git a/doc/classes/ShapeCast3D.xml b/doc/classes/ShapeCast3D.xml index cbdf660133..735b91cee9 100644 --- a/doc/classes/ShapeCast3D.xml +++ b/doc/classes/ShapeCast3D.xml @@ -58,6 +58,13 @@ Returns the collided [Object] of one of the multiple collisions at [param index], or [code]null[/code] if no object is intersecting the shape (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> + <method name="get_collider_rid" qualifiers="const"> + <return type="RID" /> + <param index="0" name="index" type="int" /> + <description> + Returns the [RID] of the collided object of one of the multiple collisions at [param index]. + </description> + </method> <method name="get_collider_shape" qualifiers="const"> <return type="int" /> <param index="0" name="index" type="int" /> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index 8df039794a..93799b58f0 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -56,6 +56,9 @@ <member name="prefix" type="String" setter="set_prefix" getter="get_prefix" default=""""> Adds the specified [code]prefix[/code] string before the numerical value of the [SpinBox]. </member> + <member name="select_all_on_focus" type="bool" setter="set_select_all_on_focus" getter="is_select_all_on_focus" default="false"> + If [code]true[/code], the [SpinBox] will select the whole text when the [LineEdit] gains focus. Clicking the up and down arrows won't trigger this behavior. + </member> <member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default=""""> Adds the specified [code]suffix[/code] string after the numerical value of the [SpinBox]. </member> diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml index 83532721b2..235fef0bdd 100644 --- a/doc/classes/Sprite2D.xml +++ b/doc/classes/Sprite2D.xml @@ -13,7 +13,8 @@ <method name="get_rect" qualifiers="const"> <return type="Rect2" /> <description> - Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. Example: + Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. + [b]Example:[/b] [codeblocks] [gdscript] func _input(event): diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 4188563695..f05b5f7dbf 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -44,7 +44,7 @@ <return type="Array" /> <param index="0" name="bytes" type="int" /> <description> - Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the [param bytes] argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum @GlobalScope.Error] code and a data array. + Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the [param bytes] argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum Error] code and a data array. </description> </method> <method name="get_double"> @@ -63,7 +63,7 @@ <return type="Array" /> <param index="0" name="bytes" type="int" /> <description> - Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum @GlobalScope.Error] code, and a data array. + Returns a chunk data with the received bytes. The number of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum Error] code, and a data array. </description> </method> <method name="get_string"> @@ -144,7 +144,7 @@ <return type="int" enum="Error" /> <param index="0" name="data" type="PackedByteArray" /> <description> - Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum @GlobalScope.Error] code. + Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum Error] code. </description> </method> <method name="put_double"> @@ -165,7 +165,7 @@ <return type="Array" /> <param index="0" name="data" type="PackedByteArray" /> <description> - Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum @GlobalScope.Error] code and an integer, describing how much data was actually sent. + Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum Error] code and an integer, describing how much data was actually sent. </description> </method> <method name="put_string"> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 320b9fd737..b0b4f74b46 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -239,7 +239,7 @@ <description> Splits a string using a [param delimiter] and returns a substring at index [param slice]. Returns an empty string if the index doesn't exist. This is a more performant alternative to [method split] for cases when you need only one element from the array at a fixed index. - Example: + [b]Example:[/b] [codeblock] print("i/am/example/string".get_slice("/", 2)) # Prints 'example'. [/codeblock] @@ -408,7 +408,7 @@ <param index="0" name="parts" type="PackedStringArray" /> <description> Returns a [String] which is the concatenation of the [param parts]. The separator between elements is the string providing this method. - Example: + [b]Example:[/b] [codeblocks] [gdscript] print(", ".join(["One", "Two", "Three", "Four"])) @@ -430,7 +430,7 @@ <param index="0" name="length" type="int" /> <description> Returns a number of characters from the left of the string. If negative [param length] is used, the characters are counted downwards from [String]'s length. - Examples: + [b]Example:[/b] [codeblock] print("sample text".left(3)) #prints "sam" print("sample text".left(-3)) #prints "sample t" @@ -514,7 +514,7 @@ Converts a [float] to a string representation of a decimal number. The number of decimal places can be specified with [param decimals]. If [param decimals] is [code]-1[/code] (default), decimal places will be automatically adjusted so that the string representation has 14 significant digits (counting both digits to the left and the right of the decimal point). Trailing zeros are not included in the string. The last digit will be rounded and not truncated. - Some examples: + [b]Example:[/b] [codeblock] String.num(3.141593) # "3.141593" String.num(3.141593, 3) # "3.142" @@ -617,7 +617,7 @@ <param index="0" name="length" type="int" /> <description> Returns a number of characters from the right of the string. If negative [param length] is used, the characters are counted downwards from [String]'s length. - Examples: + [b]Example:[/b] [codeblock] print("sample text".right(3)) #prints "ext" print("sample text".right(-3)) #prints "ple text" @@ -634,15 +634,15 @@ </method> <method name="rsplit" qualifiers="const"> <return type="PackedStringArray" /> - <param index="0" name="delimiter" type="String" /> + <param index="0" name="delimiter" type="String" default="""" /> <param index="1" name="allow_empty" type="bool" default="true" /> <param index="2" name="maxsplit" type="int" default="0" /> <description> - Splits the string by a [param delimiter] string and returns an array of the substrings, starting from right. + Splits the string by a [param delimiter] string and returns an array of the substrings, starting from right. If [param delimiter] is an empty string, each substring will be a single character. The splits in the returned array are sorted in the same order as the original string, from left to right. If [param allow_empty] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. If [param maxsplit] is specified, it defines the number of splits to do from the right up to [param maxsplit]. The default value of 0 means that all items are split, thus giving the same result as [method split]. - Example: + [b]Example:[/b] [codeblocks] [gdscript] var some_string = "One,Two,Three,Four" @@ -710,15 +710,15 @@ </method> <method name="split" qualifiers="const"> <return type="PackedStringArray" /> - <param index="0" name="delimiter" type="String" /> + <param index="0" name="delimiter" type="String" default="""" /> <param index="1" name="allow_empty" type="bool" default="true" /> <param index="2" name="maxsplit" type="int" default="0" /> <description> - Splits the string by a [param delimiter] string and returns an array of the substrings. The [param delimiter] can be of any length. + Splits the string by a [param delimiter] string and returns an array of the substrings. The [param delimiter] can be of any length. If [param delimiter] is an empty string, each substring will be a single character. If [param allow_empty] is [code]true[/code], and there are two adjacent delimiters in the string, it will add an empty string to the array of substrings at this position. If [param maxsplit] is specified, it defines the number of splits to do from the left up to [param maxsplit]. The default value of [code]0[/code] means that all items are split. If you need only one element from the array at a specific index, [method get_slice] is a more performant option. - Example: + [b]Example:[/b] [codeblocks] [gdscript] var some_string = "One,Two,Three,Four" @@ -940,12 +940,6 @@ <description> </description> </operator> - <operator name="operator +"> - <return type="String" /> - <param index="0" name="right" type="int" /> - <description> - </description> - </operator> <operator name="operator <"> <return type="bool" /> <param index="0" name="right" type="String" /> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 7f6628f8ee..d6900f935c 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -9,7 +9,8 @@ - Border width (individual width for each border) - Rounded corners (individual radius for each corner) - Shadow (with blur and offset) - Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. Example: + Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. + [b]Example:[/b] [codeblock] height = 30 corner_radius_top_left = 50 diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index d56cc9a31b..9d73e9fb39 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -275,28 +275,28 @@ </methods> <constants> <constant name="CUSTOM_RGBA8_UNORM" value="0" enum="CustomFormat"> - Limits range of data passed to `set_custom` to unsigned normalized 0 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_UNORM]. + Limits range of data passed to [method set_custom] to unsigned normalized 0 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_UNORM]. </constant> <constant name="CUSTOM_RGBA8_SNORM" value="1" enum="CustomFormat"> - Limits range of data passed to `set_custom` to signed normalized -1 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_SNORM]. + Limits range of data passed to [method set_custom] to signed normalized -1 to 1 stored in 8 bits per channel. See [constant Mesh.ARRAY_CUSTOM_RGBA8_SNORM]. </constant> <constant name="CUSTOM_RG_HALF" value="2" enum="CustomFormat"> - Stores data passed to `set_custom` as half precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_HALF]. + Stores data passed to [method set_custom] as half precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_HALF]. </constant> <constant name="CUSTOM_RGBA_HALF" value="3" enum="CustomFormat"> - Stores data passed to `set_custom` as half precision floats and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_HALF]. + Stores data passed to [method set_custom] as half precision floats and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_HALF]. </constant> <constant name="CUSTOM_R_FLOAT" value="4" enum="CustomFormat"> - Stores data passed to `set_custom` as full precision floats, and uses only red color channel. See [constant Mesh.ARRAY_CUSTOM_R_FLOAT]. + Stores data passed to [method set_custom] as full precision floats, and uses only red color channel. See [constant Mesh.ARRAY_CUSTOM_R_FLOAT]. </constant> <constant name="CUSTOM_RG_FLOAT" value="5" enum="CustomFormat"> - Stores data passed to `set_custom` as full precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_FLOAT]. + Stores data passed to [method set_custom] as full precision floats, and uses only red and green color channels. See [constant Mesh.ARRAY_CUSTOM_RG_FLOAT]. </constant> <constant name="CUSTOM_RGB_FLOAT" value="6" enum="CustomFormat"> - Stores data passed to `set_custom` as full precision floats, and uses only red, green and blue color channels. See [constant Mesh.ARRAY_CUSTOM_RGB_FLOAT]. + Stores data passed to [method set_custom] as full precision floats, and uses only red, green and blue color channels. See [constant Mesh.ARRAY_CUSTOM_RGB_FLOAT]. </constant> <constant name="CUSTOM_RGBA_FLOAT" value="7" enum="CustomFormat"> - Stores data passed to `set_custom` as full precision floats, and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_FLOAT]. + Stores data passed to [method set_custom] as full precision floats, and uses all color channels. See [constant Mesh.ARRAY_CUSTOM_RGBA_FLOAT]. </constant> <constant name="CUSTOM_MAX" value="8" enum="CustomFormat"> Used to indicate a disabled custom channel. diff --git a/doc/classes/SystemFont.xml b/doc/classes/SystemFont.xml index c235843f3b..b47d6ded7d 100644 --- a/doc/classes/SystemFont.xml +++ b/doc/classes/SystemFont.xml @@ -41,7 +41,7 @@ Font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. </member> <member name="subpixel_positioning" type="int" setter="set_subpixel_positioning" getter="get_subpixel_positioning" enum="TextServer.SubpixelPositioning" default="1"> - Font glyph sub-pixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size. + Font glyph subpixel positioning mode. Subpixel positioning provides shaper text and better kerning for smaller font sizes, at the cost of memory usage and font rasterization speed. Use [constant TextServer.SUBPIXEL_POSITIONING_AUTO] to automatically enable it based on the font size. </member> </members> </class> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 302f9b329b..e2e7a0c37e 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -217,7 +217,7 @@ </theme_item> <theme_item name="side_margin" data_type="constant" type="int" default="8"> The space at the left or right edges of the tab bar, accordingly with the current [member tab_alignment]. - The margin is ignored with [code]ALIGNMENT_RIGHT[/code] if the tabs are clipped (see [member clip_tabs]) or a popup has been set (see [method set_popup]). The margin is always ignored with [code]ALIGNMENT_CENTER[/code]. + The margin is ignored with [constant TabBar.ALIGNMENT_RIGHT] if the tabs are clipped (see [member clip_tabs]) or a popup has been set (see [method set_popup]). The margin is always ignored with [constant TabBar.ALIGNMENT_CENTER]. </theme_item> <theme_item name="font" data_type="font" type="Font"> The font used to draw tab names. diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 879a355f25..d4f5233438 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -63,6 +63,13 @@ Adds a new caret at the given location. Returns the index of the new caret, or [code]-1[/code] if the location is invalid. </description> </method> + <method name="add_caret_at_carets"> + <return type="void" /> + <param index="0" name="below" type="bool" /> + <description> + Adds an additional caret above or below every caret. If [param below] is true the new caret will be added below and above otherwise. + </description> + </method> <method name="add_gutter"> <return type="void" /> <param index="0" name="at" type="int" default="-1" /> @@ -1103,9 +1110,6 @@ The width, in pixels, of the minimap. </member> <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" overrides="Control" enum="Control.CursorShape" default="1" /> - <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> - If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text. - </member> <member name="placeholder_text" type="String" setter="set_placeholder" getter="get_placeholder" default=""""> Text shown when the [TextEdit] is empty. It is [b]not[/b] the [TextEdit]'s default value (see [member text]). </member> @@ -1369,8 +1373,8 @@ <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 0.5)"> Sets the font [Color] when [member editable] is disabled. </theme_item> - <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> - Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled. + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> + Sets the [Color] of the selected text. If equal to [code]Color(0, 0, 0, 0)[/code], it will be ignored. </theme_item> <theme_item name="search_result_border_color" data_type="color" type="Color" default="Color(0.3, 0.3, 0.3, 0.4)"> [Color] of the border around text that matches the search query. diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 2512c563c5..f4d92ab9b6 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -380,7 +380,7 @@ <return type="int" enum="TextServer.SubpixelPositioning" /> <param index="0" name="font_rid" type="RID" /> <description> - Returns font sub-pixel glyph positioning mode. + Returns font subpixel glyph positioning mode. </description> </method> <method name="font_get_supported_chars" qualifiers="const"> @@ -413,7 +413,7 @@ <param index="1" name="size" type="Vector2i" /> <param index="2" name="texture_index" type="int" /> <description> - Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty. + Returns array containing glyph packing data. </description> </method> <method name="font_get_transform" qualifiers="const"> @@ -804,7 +804,7 @@ <param index="0" name="font_rid" type="RID" /> <param index="1" name="subpixel_positioning" type="int" enum="TextServer.SubpixelPositioning" /> <description> - Sets font sub-pixel glyph positioning mode. + Sets font subpixel glyph positioning mode. </description> </method> <method name="font_set_texture_image"> @@ -824,7 +824,7 @@ <param index="2" name="texture_index" type="int" /> <param index="3" name="offset" type="PackedInt32Array" /> <description> - Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty. + Sets array containing glyph packing data. </description> </method> <method name="font_set_transform"> @@ -1416,7 +1416,7 @@ <param index="0" name="shaped" type="RID" /> <param index="1" name="direction" type="int" enum="TextServer.Direction" default="0" /> <description> - Sets desired text direction. If set to [code]TEXT_DIRECTION_AUTO[/code], direction will be detected based on the buffer contents and current locale. + Sets desired text direction. If set to [constant DIRECTION_AUTO], direction will be detected based on the buffer contents and current locale. [b]Note:[/b] Direction is ignored if server does not support [constant FEATURE_BIDI_LAYOUT] feature (supported by [TextServerAdvanced]). </description> </method> @@ -1547,23 +1547,23 @@ </constant> <constant name="FONT_ANTIALIASING_LCD" value="2" enum="FontAntialiasing"> Font glyphs are rasterized for LCD screens. - LCD sub-pixel layout is determined by the value of [code]gui/theme/lcd_subpixel_layout[/code] project settings. - LCD sub-pixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D. + LCD subpixel layout is determined by the value of [code]gui/theme/lcd_subpixel_layout[/code] project settings. + LCD subpixel anti-aliasing mode is suitable only for rendering horizontal, unscaled text in 2D. </constant> <constant name="FONT_LCD_SUBPIXEL_LAYOUT_NONE" value="0" enum="FontLCDSubpixelLayout"> - Unknown or unsupported sub-pixel layout, LCD sub-pixel anti-aliasing is disabled. + Unknown or unsupported subpixel layout, LCD subpixel antialiasing is disabled. </constant> <constant name="FONT_LCD_SUBPIXEL_LAYOUT_HRGB" value="1" enum="FontLCDSubpixelLayout"> - Horizontal RGB sub-pixel layout. + Horizontal RGB subpixel layout. </constant> <constant name="FONT_LCD_SUBPIXEL_LAYOUT_HBGR" value="2" enum="FontLCDSubpixelLayout"> - Horizontal BGR sub-pixel layout. + Horizontal BGR subpixel layout. </constant> <constant name="FONT_LCD_SUBPIXEL_LAYOUT_VRGB" value="3" enum="FontLCDSubpixelLayout"> - Vertical RGB sub-pixel layout. + Vertical RGB subpixel layout. </constant> <constant name="FONT_LCD_SUBPIXEL_LAYOUT_VBGR" value="4" enum="FontLCDSubpixelLayout"> - Vertical BGR sub-pixel layout. + Vertical BGR subpixel layout. </constant> <constant name="FONT_LCD_SUBPIXEL_LAYOUT_MAX" value="5" enum="FontLCDSubpixelLayout"> </constant> @@ -1823,7 +1823,7 @@ Font have fixed-width characters. </constant> <constant name="STRUCTURED_TEXT_DEFAULT" value="0" enum="StructuredTextParser"> - Use default behavior. Same as [code]STRUCTURED_TEXT_NONE[/code] unless specified otherwise in the control description. + Use default behavior. Same as [constant STRUCTURED_TEXT_NONE] unless specified otherwise in the control description. </constant> <constant name="STRUCTURED_TEXT_URI" value="1" enum="StructuredTextParser"> BiDi override for URI. diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 7ced16d1af..5a24483774 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -7,7 +7,6 @@ A TileSet is a library of tiles for a [TileMap]. A TileSet handles a list of [TileSetSource], each of them storing a set of tiles. Tiles can either be from a [TileSetAtlasSource], that render tiles out of a texture with support for physics, navigation, etc... or from a [TileSetScenesCollectionSource] which exposes scene-based tiles. Tiles are referenced by using three IDs: their source ID, their atlas coordinates ID and their alternative tile ID. - A TileSet can be configured so that its tiles expose more or less properties. To do so, the TileSet resources uses property layers, that you can add or remove depending on your needs. For example, adding a physics layer allows giving collision shapes to your tiles. Each layer having dedicated properties (physics layer an mask), you may add several TileSet physics layers for each type of collision you need. See the functions to add new layers for more information. diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml index df469cd030..5efc1da6f9 100644 --- a/doc/classes/TileSetAtlasSource.xml +++ b/doc/classes/TileSetAtlasSource.xml @@ -6,9 +6,7 @@ <description> An atlas is a grid of tiles laid out on a texture. Each tile in the grid must be exposed using [method create_tile]. Those tiles are then indexed using their coordinates in the grid. Each tile can also have a size in the grid coordinates, making it more or less cells in the atlas. - Alternatives version of a tile can be created using [method create_alternative_tile], which are then indexed using an alternative ID. The main tile (the one in the grid), is accessed with an alternative ID equal to 0. - Each tile alternate has a set of properties that is defined by the source's [TileSet] layers. Those properties are stored in a TileData object that can be accessed and modified using [method get_tile_data]. As TileData properties are stored directly in the TileSetAtlasSource resource, their properties might also be set using [code]TileSetAtlasSource.set("<coords_x>:<coords_y>/<alternative_id>/<tile_data_property>")[/code]. </description> diff --git a/doc/classes/TileSetSource.xml b/doc/classes/TileSetSource.xml index e88e725bf4..4ebd7735b0 100644 --- a/doc/classes/TileSetSource.xml +++ b/doc/classes/TileSetSource.xml @@ -7,7 +7,6 @@ Exposes a set of tiles for a [TileSet] resource. Tiles in a source are indexed with two IDs, coordinates ID (of type Vector2i) and an alternative ID (of type int), named according to their use in the [TileSetAtlasSource] class. Depending on the TileSet source type, those IDs might have restrictions on their values, this is why the base [TileSetSource] class only exposes getters for them. - You can iterate over all tiles exposed by a TileSetSource by first iterating over coordinates IDs using [method get_tiles_count] and [method get_tile_id], then over alternative IDs using [method get_alternative_tiles_count] and [method get_alternative_tile_id]. </description> <tutorials> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 539ca38190..532f6703b2 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -251,7 +251,7 @@ <param index="0" name="column" type="int" /> <param index="1" name="min_width" type="int" /> <description> - Overrides the calculated minimum width of a column. It can be set to `0` to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio]. + Overrides the calculated minimum width of a column. It can be set to [code]0[/code] to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio]. </description> </method> <method name="set_column_expand"> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index acf900ae55..eef35049e5 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -177,7 +177,8 @@ <method name="parallel"> <return type="Tween" /> <description> - Makes the next [Tweener] run parallelly to the previous one. Example: + Makes the next [Tweener] run parallelly to the previous one. + [b]Example:[/b] [codeblocks] [gdscript] var tween = create_tween() @@ -272,7 +273,7 @@ <param index="0" name="callback" type="Callable" /> <description> Creates and appends a [CallbackTweener]. This method can be used to call an arbitrary method in any object. Use [method Callable.bind] to bind additional arguments for the call. - Example: object that keeps shooting every 1 second. + [b]Example:[/b] Object that keeps shooting every 1 second: [codeblocks] [gdscript] var tween = get_tree().create_tween().set_loops() @@ -283,7 +284,7 @@ tween.TweenCallback(new Callable(Shoot)).SetDelay(1.0f); [/csharp] [/codeblocks] - Example: turning a sprite red and then blue, with 2 second delay. + [b]Example:[/b] Turning a sprite red and then blue, with 2 second delay: [codeblocks] [gdscript] var tween = get_tree().create_tween() @@ -304,7 +305,7 @@ <param index="0" name="time" type="float" /> <description> Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative to using the delay in other [Tweener]s, or when there's no animation (in which case the [Tween] acts as a timer). [param time] is the length of the interval, in seconds. - Example: creating an interval in code execution. + [b]Example:[/b] Creating an interval in code execution: [codeblocks] [gdscript] # ... some code @@ -317,7 +318,7 @@ // ... more code [/csharp] [/codeblocks] - Example: creating an object that moves back and forth and jumps every few seconds. + [b]Example:[/b] Creating an object that moves back and forth and jumps every few seconds: [codeblocks] [gdscript] var tween = create_tween().set_loops() @@ -348,7 +349,7 @@ <param index="3" name="duration" type="float" /> <description> Creates and appends a [MethodTweener]. This method is similar to a combination of [method tween_callback] and [method tween_property]. It calls a method over time with a tweened value provided as an argument. The value is tweened between [param from] and [param to] over the time specified by [param duration], in seconds. Use [method Callable.bind] to bind additional arguments for the call. You can use [method MethodTweener.set_ease] and [method MethodTweener.set_trans] to tweak the easing and transition of the value or [method MethodTweener.set_delay] to delay the tweening. - Example: making a 3D object look from one point to another point. + [b]Example:[/b] Making a 3D object look from one point to another point: [codeblocks] [gdscript] var tween = create_tween() @@ -359,7 +360,7 @@ tween.TweenMethod(new Callable(() => LookAt(Vector3.Up)), new Vector3(-1.0f, 0.0f, -1.0f), new Vector3(1.0f, 0.0f, -1.0f), 1.0f); // The LookAt() method takes up vector as second argument. [/csharp] [/codeblocks] - Example: setting a text of a [Label], using an intermediate method and after a delay. + [b]Example:[/b] Setting the text of a [Label], using an intermediate method and after a delay: [codeblocks] [gdscript] func _ready(): @@ -393,7 +394,8 @@ <param index="2" name="final_val" type="Variant" /> <param index="3" name="duration" type="float" /> <description> - Creates and appends a [PropertyTweener]. This method tweens a [param property] of an [param object] between an initial value and [param final_val] in a span of time equal to [param duration], in seconds. The initial value by default is the property's value at the time the tweening of the [PropertyTweener] starts. For example: + Creates and appends a [PropertyTweener]. This method tweens a [param property] of an [param object] between an initial value and [param final_val] in a span of time equal to [param duration], in seconds. The initial value by default is the property's value at the time the tweening of the [PropertyTweener] starts. + [b]Example:[/b] [codeblocks] [gdscript] var tween = create_tween() @@ -408,7 +410,7 @@ [/codeblocks] will move the sprite to position (100, 200) and then to (200, 300). If you use [method PropertyTweener.from] or [method PropertyTweener.from_current], the starting position will be overwritten by the given value instead. See other methods in [PropertyTweener] to see how the tweening can be tweaked further. [b]Note:[/b] You can find the correct property name by hovering over the property in the Inspector. You can also provide the components of a property directly by using [code]"property:component"[/code] (eg. [code]position:x[/code]), where it would only apply to that particular component. - Example: moving object twice from the same position, with different transition types. + [b]Example:[/b] Moving an object twice from the same position, with different transition types: [codeblocks] [gdscript] var tween = create_tween() diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 5706d098e8..78013a8f4b 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -45,6 +45,13 @@ Returns the currently active 3D camera. </description> </method> + <method name="get_canvas_cull_mask_bit" qualifiers="const"> + <return type="bool" /> + <param index="0" name="layer" type="int" /> + <description> + Returns an individual bit on the rendering layer mask. + </description> + </method> <method name="get_final_transform" qualifiers="const"> <return type="Transform2D" /> <description> @@ -176,6 +183,14 @@ If none of the methods handle the event and [member physics_object_picking] is [code]true[/code], the event is used for physics object picking. </description> </method> + <method name="set_canvas_cull_mask_bit"> + <return type="void" /> + <param index="0" name="layer" type="int" /> + <param index="1" name="enable" type="bool" /> + <description> + Set/clear individual bits on the rendering layer mask. This simplifies editing this [Viewport]'s layers. + </description> + </method> <method name="set_input_as_handled"> <return type="void" /> <description> @@ -205,6 +220,9 @@ <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener_3d" getter="is_audio_listener_3d" default="false"> If [code]true[/code], the viewport will process 3D audio streams. </member> + <member name="canvas_cull_mask" type="int" setter="set_canvas_cull_mask" getter="get_canvas_cull_mask" default="4294967295"> + The rendering layers in which this [Viewport] renders [CanvasItem] nodes. + </member> <member name="canvas_item_default_texture_filter" type="int" setter="set_default_canvas_item_texture_filter" getter="get_default_canvas_item_texture_filter" enum="Viewport.DefaultCanvasItemTextureFilter" default="1"> Sets the default filter mode used by [CanvasItem]s in this Viewport. See [enum DefaultCanvasItemTextureFilter] for options. </member> diff --git a/doc/classes/VisualShaderNodeFloatParameter.xml b/doc/classes/VisualShaderNodeFloatParameter.xml index c0fd88294a..3b5bf57b4d 100644 --- a/doc/classes/VisualShaderNodeFloatParameter.xml +++ b/doc/classes/VisualShaderNodeFloatParameter.xml @@ -16,7 +16,7 @@ Enables usage of the [member default_value]. </member> <member name="hint" type="int" setter="set_hint" getter="get_hint" enum="VisualShaderNodeFloatParameter.Hint" default="0"> - A hint applied to the uniform, which controls the values it can take when set through the inspector. + A hint applied to the uniform, which controls the values it can take when set through the Inspector. </member> <member name="max" type="float" setter="set_max" getter="get_max" default="1.0"> Minimum value for range hints. Used if [member hint] is set to [constant HINT_RANGE] or [constant HINT_RANGE_STEP]. diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml index 6268a3fe09..2ebffcfe76 100644 --- a/doc/classes/VisualShaderNodeInput.xml +++ b/doc/classes/VisualShaderNodeInput.xml @@ -19,7 +19,7 @@ </methods> <members> <member name="input_name" type="String" setter="set_input_name" getter="get_input_name" default=""[None]""> - One of the several input constants in lower-case style like: "vertex"([code]VERTEX[/code]) or "point_size"([code]POINT_SIZE[/code]). + One of the several input constants in lower-case style like: "vertex" ([code]VERTEX[/code]) or "point_size" ([code]POINT_SIZE[/code]). </member> </members> <signals> diff --git a/doc/classes/VisualShaderNodeParameter.xml b/doc/classes/VisualShaderNodeParameter.xml index c66022f77d..55b10ac810 100644 --- a/doc/classes/VisualShaderNodeParameter.xml +++ b/doc/classes/VisualShaderNodeParameter.xml @@ -4,7 +4,7 @@ A base type for the parameters within the visual shader graph. </brief_description> <description> - A parameter represents a variable in the shader which is set externally, i.e. from the [ShaderMaterial]. Parameters are exposed as properties in the [ShaderMaterial] and can be assigned from the inspector or from a script. + A parameter represents a variable in the shader which is set externally, i.e. from the [ShaderMaterial]. Parameters are exposed as properties in the [ShaderMaterial] and can be assigned from the Inspector or from a script. </description> <tutorials> </tutorials> diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml index 92b2e66e5a..bd9df18394 100644 --- a/doc/classes/VoxelGIData.xml +++ b/doc/classes/VoxelGIData.xml @@ -5,7 +5,7 @@ </brief_description> <description> [VoxelGIData] contains baked voxel global illumination for use in a [VoxelGI] node. [VoxelGIData] also offers several properties to adjust the final appearance of the global illumination. These properties can be adjusted at run-time without having to bake the [VoxelGI] node again. - [b]Note:[/b] To prevent text-based scene files ([code].tscn[/code]) from growing too much and becoming slow to load and save, always save [VoxelGIData] to an external binary resource file ([code].res[/code]) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the [VoxelGIData] resource, choosing [b]Edit[/b], clicking the floppy disk icon at the top of the inspector then choosing [b]Save As...[/b]. + [b]Note:[/b] To prevent text-based scene files ([code].tscn[/code]) from growing too much and becoming slow to load and save, always save [VoxelGIData] to an external binary resource file ([code].res[/code]) instead of embedding it within the scene. This can be done by clicking the dropdown arrow next to the [VoxelGIData] resource, choosing [b]Edit[/b], clicking the floppy disk icon at the top of the Inspector then choosing [b]Save As...[/b]. </description> <tutorials> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index c278f7031f..8707ef003a 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -491,7 +491,7 @@ Minimized window mode, i.e. [Window] is not visible and available on window manager's window list. Normally happens when the minimize button is pressed. </constant> <constant name="MODE_MAXIMIZED" value="2" enum="Mode"> - Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the minimize button is pressed. + Maximized window mode, i.e. [Window] will occupy whole screen area except task bar and still display its borders. Normally happens when the maximize button is pressed. </constant> <constant name="MODE_FULLSCREEN" value="3" enum="Mode"> Full screen window mode. Note that this is not [i]exclusive[/i] full screen. On Windows and Linux, a borderless window is used to emulate full screen. On macOS, a new desktop is used to display the running project. diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml index 3e48b8284a..cc483dbd02 100644 --- a/doc/classes/XRInterface.xml +++ b/doc/classes/XRInterface.xml @@ -32,7 +32,7 @@ <method name="get_play_area" qualifiers="const"> <return type="PackedVector3Array" /> <description> - Returns an array of vectors that denotes the physical play area mapped to the virtual space around the [XROrigin3D] point. The points form a convex polygon that can be used to react to or visualise the play area. This returns an empty array if this feature is not supported or if the information is not yet available. + Returns an array of vectors that denotes the physical play area mapped to the virtual space around the [XROrigin3D] point. The points form a convex polygon that can be used to react to or visualize the play area. This returns an empty array if this feature is not supported or if the information is not yet available. </description> </method> <method name="get_render_target_size"> @@ -66,7 +66,7 @@ <method name="is_initialized" qualifiers="const"> <return type="bool" /> <description> - Is [code]true[/code] if this interface has been initialised. + Is [code]true[/code] if this interface has been initialized. </description> </method> <method name="is_passthrough_enabled"> diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml index 5958999037..c6b215daa3 100644 --- a/doc/classes/XRInterfaceExtension.xml +++ b/doc/classes/XRInterfaceExtension.xml @@ -138,7 +138,7 @@ <method name="_is_initialized" qualifiers="virtual const"> <return type="bool" /> <description> - Returns [code]true[/code] if this interface has been initialised. + Returns [code]true[/code] if this interface has been initialized. </description> </method> <method name="_notification" qualifiers="virtual"> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index d7232bb0e9..e3938fb5d5 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -114,12 +114,17 @@ <return type="Vector4" /> <param index="0" name="right" type="Vector4" /> <description> + Multiplies each component of the [Vector4] by the given [float]. </description> </operator> <operator name="operator *"> <return type="Vector4" /> <param index="0" name="right" type="Vector4i" /> <description> + Multiplies each component of the [Vector4i] by the given [float]. Returns a [Vector4]. + [codeblock] + print(0.9 * Vector4i(10, 15, 20, -10)) # Prints "(9, 13.5, 18, -9)" + [/codeblock] </description> </operator> <operator name="operator *"> @@ -140,12 +145,20 @@ <return type="float" /> <param index="0" name="right" type="float" /> <description> + Raises a [float] to a power of a [float]. + [codeblock] + print(39.0625**0.25) # 2.5 + [/codeblock] </description> </operator> <operator name="operator **"> <return type="float" /> <param index="0" name="right" type="int" /> <description> + Raises a [float] to a power of an [int]. The result is a [float]. + [codeblock] + print(0.9**3) # 0.729 + [/codeblock] </description> </operator> <operator name="operator +"> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 868a8e9944..65ab5d4656 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -161,12 +161,14 @@ <return type="Vector4" /> <param index="0" name="right" type="Vector4" /> <description> + Multiplies each component of the [Vector4] by the given [int]. </description> </operator> <operator name="operator *"> <return type="Vector4i" /> <param index="0" name="right" type="Vector4i" /> <description> + Multiplies each component of the [Vector4i] by the given [int]. </description> </operator> <operator name="operator *"> @@ -187,19 +189,20 @@ <return type="float" /> <param index="0" name="right" type="float" /> <description> + Raises an [int] to a power of a [float]. The result is a [float]. + [codeblock] + print(8**0.25) # 1.68179283050743 + [/codeblock] </description> </operator> <operator name="operator **"> <return type="int" /> <param index="0" name="right" type="int" /> <description> - </description> - </operator> - <operator name="operator +"> - <return type="String" /> - <param index="0" name="right" type="String" /> - <description> - Adds Unicode character with code [int] to the [String]. + Raises an [int] to a power of a [int]. + [codeblock] + print(5**5) # 3125 + [/codeblock] </description> </operator> <operator name="operator +"> |