diff options
Diffstat (limited to 'doc/classes')
86 files changed, 1304 insertions, 235 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 0307684588..bcab80ea94 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -604,7 +604,7 @@ is_same(arr_a, arr_b) # false [/codeblock] These are [Variant] value types: [code]null[/code], [bool], [int], [float], [String], [StringName], [Vector2], [Vector2i], [Vector3], [Vector3i], [Vector4], [Vector4i], [Rect2], [Rect2i], [Transform2D], [Transform3D], [Plane], [Quaternion], [AABB], [Basis], [Projection], [Color], [NodePath], [RID], [Callable] and [Signal]. - These are [Variant] reference types: [Object], [Dictionary], [Array], [PackedByteArray], [PackedInt32Array], [PackedInt64Array], [PackedFloat32Array], [PackedFloat64Array], [PackedStringArray], [PackedVector2Array], [PackedVector3Array] and [PackedColorArray]. + These are [Variant] reference types: [Object], [Dictionary], [Array], [PackedByteArray], [PackedInt32Array], [PackedInt64Array], [PackedFloat32Array], [PackedFloat64Array], [PackedStringArray], [PackedVector2Array], [PackedVector3Array], [PackedVector4Array], and [PackedColorArray]. </description> </method> <method name="is_zero_approx"> @@ -696,6 +696,7 @@ [codeblock] max(1, 7, 3, -6, 5) # Returns 7 [/codeblock] + [b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise maximum, and will pick the largest value when compared using [code]x < y[/code]. To perform component-wise maximum, use [method Vector2.max], [method Vector2i.max], [method Vector3.max], [method Vector3i.max], [method Vector4.max], and [method Vector4i.max]. </description> </method> <method name="maxf"> @@ -729,6 +730,7 @@ [codeblock] min(1, 7, 3, -6, 5) # Returns -6 [/codeblock] + [b]Note:[/b] When using this on vectors it will [i]not[/i] perform component-wise minimum, and will pick the smallest value when compared using [code]x < y[/code]. To perform component-wise minimum, use [method Vector2.min], [method Vector2i.min], [method Vector3.min], [method Vector3i.min], [method Vector4.min], and [method Vector4i.min]. </description> </method> <method name="minf"> @@ -1095,6 +1097,7 @@ remap(75, 0, 100, -1, 1) # Returns 0.5 [/codeblock] For complex use cases where multiple ranges are needed, consider using [Curve] or [Gradient] instead. + [b]Note:[/b] If [code]istart == istop[/code], the return value is undefined (most likely NaN, INF, or -INF). </description> </method> <method name="rid_allocate_id"> @@ -1568,9 +1571,6 @@ <member name="Geometry3D" type="Geometry3D" setter="" getter=""> The [Geometry3D] singleton. </member> - <member name="GodotSharp" type="GodotSharp" setter="" getter=""> - The [GodotSharp] singleton. - </member> <member name="IP" type="IP" setter="" getter=""> The [IP] singleton. </member> @@ -3167,7 +3167,10 @@ <constant name="TYPE_PACKED_COLOR_ARRAY" value="37" enum="Variant.Type"> Variable is of type [PackedColorArray]. </constant> - <constant name="TYPE_MAX" value="38" enum="Variant.Type"> + <constant name="TYPE_PACKED_VECTOR4_ARRAY" value="38" enum="Variant.Type"> + Variable is of type [PackedVector4Array]. + </constant> + <constant name="TYPE_MAX" value="39" enum="Variant.Type"> Represents the size of the [enum Variant.Type] enum. </constant> <constant name="OP_EQUAL" value="0" enum="Variant.Operator"> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index b00889f483..26ed881502 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -595,6 +595,9 @@ </method> </methods> <members> + <member name="capture_included" type="bool" setter="_set_capture_included" getter="is_capture_included" default="false"> + Returns [code]true[/code] if the capture track is included. This is a cached readonly value for performance. + </member> <member name="length" type="float" setter="set_length" getter="get_length" default="1.0"> The total length of the animation (in seconds). [b]Note:[/b] Length is not delimited by the last key, as this one may be before or after the end to ensure correct interpolation and looping. @@ -602,7 +605,7 @@ <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="Animation.LoopMode" default="0"> Determines the behavior of both ends of the animation timeline during animation playback. This is used for correct interpolation of animation cycles, and for hinting the player that it must restart the animation. </member> - <member name="step" type="float" setter="set_step" getter="get_step" default="0.1"> + <member name="step" type="float" setter="set_step" getter="get_step" default="0.0333333"> The animation step value. </member> </members> @@ -658,7 +661,7 @@ Update at the keyframes. </constant> <constant name="UPDATE_CAPTURE" value="2" enum="UpdateMode"> - Same as [constant UPDATE_CONTINUOUS] but works as a flag to capture the value of the current object and perform interpolation in some methods. See also [method AnimationMixer.capture] and [method AnimationPlayer.play_with_capture]. + Same as [constant UPDATE_CONTINUOUS] but works as a flag to capture the value of the current object and perform interpolation in some methods. See also [method AnimationMixer.capture], [member AnimationPlayer.playback_auto_capture], and [method AnimationPlayer.play_with_capture]. </constant> <constant name="LOOP_NONE" value="0" enum="LoopMode"> At both ends of the animation, the animation will stop playing. diff --git a/doc/classes/AnimationMixer.xml b/doc/classes/AnimationMixer.xml index a77e9e28c6..c635eba2ab 100644 --- a/doc/classes/AnimationMixer.xml +++ b/doc/classes/AnimationMixer.xml @@ -273,7 +273,7 @@ The number of possible simultaneous sounds for each of the assigned AudioStreamPlayers. For example, if this value is [code]32[/code] and the animation has two audio tracks, the two [AudioStreamPlayer]s assigned can play simultaneously up to [code]32[/code] voices each. </member> - <member name="callback_mode_discrete" type="int" setter="set_callback_mode_discrete" getter="get_callback_mode_discrete" enum="AnimationMixer.AnimationCallbackModeDiscrete" default="0"> + <member name="callback_mode_discrete" type="int" setter="set_callback_mode_discrete" getter="get_callback_mode_discrete" enum="AnimationMixer.AnimationCallbackModeDiscrete" default="1"> Ordinarily, tracks can be set to [constant Animation.UPDATE_DISCRETE] to update infrequently, usually when using nearest interpolation. However, when blending with [constant Animation.UPDATE_CONTINUOUS] several results are considered. The [member callback_mode_discrete] specify it explicitly. See also [enum AnimationCallbackModeDiscrete]. To make the blended results look good, it is recommended to set this to [constant ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS] to update every frame during blending. Other values exist for compatibility and they are fine if there is no blending, but not so, may produce artifacts. @@ -361,14 +361,14 @@ Make method calls immediately when reached in the animation. </constant> <constant name="ANIMATION_CALLBACK_MODE_DISCRETE_DOMINANT" value="0" enum="AnimationCallbackModeDiscrete"> - An [constant Animation.UPDATE_DISCRETE] track value takes precedence when blending [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and [constant Animation.UPDATE_DISCRETE] track values. This is the default behavior for [AnimationPlayer]. - [b]Note:[/b] If a value track has non-numeric type key values, it is internally converted to use [constant ANIMATION_CALLBACK_MODE_DISCRETE_DOMINANT] with [constant Animation.UPDATE_DISCRETE]. + An [constant Animation.UPDATE_DISCRETE] track value takes precedence when blending [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and [constant Animation.UPDATE_DISCRETE] track values. </constant> <constant name="ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE" value="1" enum="AnimationCallbackModeDiscrete"> - An [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track value takes precedence when blending the [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and the [constant Animation.UPDATE_DISCRETE] track values. + An [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track value takes precedence when blending the [constant Animation.UPDATE_CONTINUOUS] or [constant Animation.UPDATE_CAPTURE] track values and the [constant Animation.UPDATE_DISCRETE] track values. This is the default behavior for [AnimationPlayer]. </constant> <constant name="ANIMATION_CALLBACK_MODE_DISCRETE_FORCE_CONTINUOUS" value="2" enum="AnimationCallbackModeDiscrete"> Always treat the [constant Animation.UPDATE_DISCRETE] track value as [constant Animation.UPDATE_CONTINUOUS] with [constant Animation.INTERPOLATION_NEAREST]. This is the default behavior for [AnimationTree]. + If a value track has non-numeric type key values, it is internally converted to use [constant ANIMATION_CALLBACK_MODE_DISCRETE_RECESSIVE] with [constant Animation.UPDATE_DISCRETE]. </constant> </constants> </class> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 1b742bea28..302ca314bb 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -112,7 +112,7 @@ </method> <method name="play_with_capture"> <return type="void" /> - <param index="0" name="name" type="StringName" /> + <param index="0" name="name" type="StringName" default="&""" /> <param index="1" name="duration" type="float" default="-1.0" /> <param index="2" name="custom_blend" type="float" default="-1" /> <param index="3" name="custom_speed" type="float" default="1.0" /> @@ -120,12 +120,13 @@ <param index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0" /> <param index="6" name="ease_type" type="int" enum="Tween.EaseType" default="0" /> <description> - See [method AnimationMixer.capture]. It is almost the same as the following: + See also [method AnimationMixer.capture]. + You can use this method to use more detailed options for capture than those performed by [member playback_auto_capture]. When [member playback_auto_capture] is [code]false[/code], this method is almost the same as the following: [codeblock] capture(name, duration, trans_type, ease_type) play(name, custom_blend, custom_speed, from_end) [/codeblock] - If name is blank, it specifies [member assigned_animation]. + If [param name] is blank, it specifies [member assigned_animation]. If [param duration] is a negative value, the duration is set to the interval between the current position and the first key, when [param from_end] is [code]true[/code], uses the interval between the current position and the last key instead. [b]Note:[/b] The [param duration] takes [member speed_scale] into account, but [param custom_speed] does not, because the capture cache is interpolated with the blend result and the result may contain multiple animations. </description> @@ -210,6 +211,20 @@ If [code]true[/code] and the engine is running in Movie Maker mode (see [MovieWriter]), exits the engine with [method SceneTree.quit] as soon as an animation is done playing in this [AnimationPlayer]. A message is printed when the engine quits for this reason. [b]Note:[/b] This obeys the same logic as the [signal AnimationMixer.animation_finished] signal, so it will not quit the engine if the animation is set to be looping. </member> + <member name="playback_auto_capture" type="bool" setter="set_auto_capture" getter="is_auto_capture" default="true"> + If [code]true[/code], performs [method AnimationMixer.capture] before playback automatically. This means just [method play_with_capture] is executed with default arguments instead of [method play]. + [b]Note:[/b] Capture interpolation is only performed if the animation contains a capture track. See also [constant Animation.UPDATE_CAPTURE]. + </member> + <member name="playback_auto_capture_duration" type="float" setter="set_auto_capture_duration" getter="get_auto_capture_duration" default="-1.0"> + See also [method play_with_capture] and [method AnimationMixer.capture]. + If [member playback_auto_capture_duration] is negative value, the duration is set to the interval between the current position and the first key. + </member> + <member name="playback_auto_capture_ease_type" type="int" setter="set_auto_capture_ease_type" getter="get_auto_capture_ease_type" enum="Tween.EaseType" default="0"> + The ease type of the capture interpolation. See also [enum Tween.EaseType]. + </member> + <member name="playback_auto_capture_transition_type" type="int" setter="set_auto_capture_transition_type" getter="get_auto_capture_transition_type" enum="Tween.TransitionType" default="0"> + The transition type of the capture interpolation. See also [enum Tween.TransitionType]. + </member> <member name="playback_default_blend_time" type="float" setter="set_default_blend_time" getter="get_default_blend_time" default="0.0"> The default time in which to blend animations. Ranges from 0 to 4096 with 0.01 precision. </member> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index a72ac60536..326b71c588 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -154,6 +154,13 @@ Constructs an array from a [PackedVector3Array]. </description> </constructor> + <constructor name="Array"> + <return type="Array" /> + <param index="0" name="from" type="PackedVector4Array" /> + <description> + Constructs an array from a [PackedVector4Array]. + </description> + </constructor> </constructors> <methods> <method name="all" qualifiers="const"> diff --git a/doc/classes/AudioEffectSpectrumAnalyzer.xml b/doc/classes/AudioEffectSpectrumAnalyzer.xml index d9312cc87d..fbc0c2275f 100644 --- a/doc/classes/AudioEffectSpectrumAnalyzer.xml +++ b/doc/classes/AudioEffectSpectrumAnalyzer.xml @@ -9,7 +9,6 @@ </description> <tutorials> <link title="Audio Spectrum Visualizer Demo">https://godotengine.org/asset-library/asset/2762</link> - <link title="Godot 3.2 will get new audio features">https://godotengine.org/article/godot-32-will-get-new-audio-features</link> </tutorials> <members> <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="2.0"> diff --git a/doc/classes/AudioStreamWAV.xml b/doc/classes/AudioStreamWAV.xml index 206b6361cc..3df814cb7f 100644 --- a/doc/classes/AudioStreamWAV.xml +++ b/doc/classes/AudioStreamWAV.xml @@ -15,7 +15,7 @@ <return type="int" enum="Error" /> <param index="0" name="path" type="String" /> <description> - Saves the AudioStreamWAV as a WAV file to [param path]. Samples with IMA ADPCM format can't be saved. + Saves the AudioStreamWAV as a WAV file to [param path]. Samples with IMA ADPCM or QOA formats can't be saved. [b]Note:[/b] A [code].wav[/code] extension is automatically appended to [param path] if it is missing. </description> </method> @@ -56,6 +56,9 @@ <constant name="FORMAT_IMA_ADPCM" value="2" enum="Format"> Audio is compressed using IMA ADPCM. </constant> + <constant name="FORMAT_QOA" value="3" enum="Format"> + Audio is compressed as QOA ([url=https://qoaformat.org/]Quite OK Audio[/url]). + </constant> <constant name="LOOP_DISABLED" value="0" enum="LoopMode"> Audio does not loop. </constant> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 1bd4183b3c..fc8af02869 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -609,6 +609,9 @@ <constant name="BLEND_MODE_MUL" value="3" enum="BlendMode"> The color of the object is multiplied by the background. </constant> + <constant name="BLEND_MODE_PREMULT_ALPHA" value="4" enum="BlendMode"> + The color of the object is added to the background and the alpha channel is used to mask out the background. This is effectively a hybrid of the blend mix and add modes, useful for effects like fire where you want the flame to add but the smoke to mix. By default, this works with unshaded materials using premultiplied textures. For shaded materials, use the [code]PREMUL_ALPHA_FACTOR[/code] built-in so that lighting can be modulated as well. + </constant> <constant name="ALPHA_ANTIALIASING_OFF" value="0" enum="AlphaAntiAliasing"> Disables Alpha AntiAliasing for the material. </constant> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 30df4fd10d..d2af6179d9 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -122,7 +122,7 @@ The horizontal space between [Button]'s icon and text. Negative values will be treated as [code]0[/code] when used. </theme_item> <theme_item name="icon_max_width" data_type="constant" type="int" default="0"> - The maximum allowed width of the [Button]'s icon. This limit is applied on top of the default size of the icon, or its expanded size if [member expand_icon] is [code]true[/code]. The height is adjusted according to the icon's ratio. + The maximum allowed width of the [Button]'s icon. This limit is applied on top of the default size of the icon, or its expanded size if [member expand_icon] is [code]true[/code]. The height is adjusted according to the icon's ratio. If the button has additional icons (e.g. [CheckBox]), they will also be limited. </theme_item> <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index 1cfd44467f..207045b065 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -8,6 +8,7 @@ Any [CanvasItem] can draw. For this, [method queue_redraw] is called by the engine, then [constant NOTIFICATION_DRAW] will be received on idle time to request a redraw. Because of this, canvas items don't need to be redrawn on every frame, improving the performance significantly. Several functions for drawing on the [CanvasItem] are provided (see [code]draw_*[/code] functions). However, they can only be used inside [method _draw], its corresponding [method Object._notification] or methods connected to the [signal draw] signal. Canvas items are drawn in tree order on their canvas layer. By default, children are on top of their parents, so a root [CanvasItem] will be drawn behind everything. This behavior can be changed on a per-item basis. A [CanvasItem] can be hidden, which will also hide its children. By adjusting various other properties of a [CanvasItem], you can also modulate its color (via [member modulate] or [member self_modulate]), change its Z-index, blend mode, and more. + Note that properties like transform, modulation, and visibility are only propagated to [i]direct[/i] [CanvasItem] child nodes. If there is a non-[CanvasItem] node in between, like [Node] or [AnimationPlayer], the [CanvasItem] nodes below will have an independent position and [member modulate] chain. See also [member top_level]. </description> <tutorials> <link title="Viewport and canvas transforms">$DOCS_URL/tutorials/2d/2d_transforms.html</link> @@ -76,8 +77,15 @@ <param index="0" name="position" type="Vector2" /> <param index="1" name="radius" type="float" /> <param index="2" name="color" type="Color" /> + <param index="3" name="filled" type="bool" default="true" /> + <param index="4" name="width" type="float" default="-1.0" /> + <param index="5" name="antialiased" type="bool" default="false" /> <description> - Draws a colored, filled circle. See also [method draw_arc], [method draw_polyline] and [method draw_polygon]. + Draws a circle. See also [method draw_arc], [method draw_polyline], and [method draw_polygon]. + If [param filled] is [code]true[/code], the circle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the circle will be drawn as a stroke with the [param color] and [param width] specified. + If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. + If [param antialiased] is [code]true[/code], half transparent "feathers" will be attached to the boundary, making outlines smooth. + [b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code]. </description> </method> <method name="draw_colored_polygon"> @@ -98,9 +106,12 @@ <param index="3" name="width" type="float" default="-1.0" /> <param index="4" name="dash" type="float" default="2.0" /> <param index="5" name="aligned" type="bool" default="true" /> + <param index="6" name="antialiased" type="bool" default="false" /> <description> Draws a dashed line from a 2D point to another, with a given color and width. See also [method draw_multiline] and [method draw_polyline]. If [param width] is negative, then a two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the line parts will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. + If [param antialiased] is [code]true[/code], half transparent "feathers" will be attached to the boundary, making outlines smooth. + [b]Note:[/b] [param antialiased] is only effective if [param width] is greater than [code]0.0[/code]. </description> </method> <method name="draw_end_animation"> @@ -168,9 +179,11 @@ <param index="0" name="points" type="PackedVector2Array" /> <param index="1" name="color" type="Color" /> <param index="2" name="width" type="float" default="-1.0" /> + <param index="3" name="antialiased" type="bool" default="false" /> <description> Draws multiple disconnected lines with a uniform [param width] and [param color]. Each line is defined by two consecutive points from [param points] array, i.e. i-th segment consists of [code]points[2 * i][/code], [code]points[2 * i + 1][/code] endpoints. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline] instead. If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. + [b]Note:[/b] [param antialiased] is only effective if [param width] is greater than [code]0.0[/code]. </description> </method> <method name="draw_multiline_colors"> @@ -178,9 +191,11 @@ <param index="0" name="points" type="PackedVector2Array" /> <param index="1" name="colors" type="PackedColorArray" /> <param index="2" name="width" type="float" default="-1.0" /> + <param index="3" name="antialiased" type="bool" default="false" /> <description> Draws multiple disconnected lines with a uniform [param width] and segment-by-segment coloring. Each segment is defined by two consecutive points from [param points] array and a corresponding color from [param colors] array, i.e. i-th segment consists of [code]points[2 * i][/code], [code]points[2 * i + 1][/code] endpoints and has [code]colors[i][/code] color. When drawing large amounts of lines, this is faster than using individual [method draw_line] calls. To draw interconnected lines, use [method draw_polyline_colors] instead. If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. + [b]Note:[/b] [param antialiased] is only effective if [param width] is greater than [code]0.0[/code]. </description> </method> <method name="draw_multiline_string" qualifiers="const"> @@ -276,9 +291,11 @@ <param index="1" name="color" type="Color" /> <param index="2" name="filled" type="bool" default="true" /> <param index="3" name="width" type="float" default="-1.0" /> + <param index="4" name="antialiased" type="bool" default="false" /> <description> Draws a rectangle. If [param filled] is [code]true[/code], the rectangle will be filled with the [param color] specified. If [param filled] is [code]false[/code], the rectangle will be drawn as a stroke with the [param color] and [param width] specified. See also [method draw_texture_rect]. If [param width] is negative, then two-point primitives will be drawn instead of a four-point ones. This means that when the CanvasItem is scaled, the lines will remain thin. If this behavior is not desired, then pass a positive [param width] like [code]1.0[/code]. + If [param antialiased] is [code]true[/code], half transparent "feathers" will be attached to the boundary, making outlines smooth. [b]Note:[/b] [param width] is only effective if [param filled] is [code]false[/code]. [b]Note:[/b] Unfilled rectangles drawn with a negative [param width] may not display perfectly. For example, corners may be missing or brighter due to overlapping lines (for a translucent [param color]). </description> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index 7c6f1a51c4..d455799c29 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -14,7 +14,7 @@ <return type="void" /> <param index="0" name="replace" type="bool" /> <description> - Override this method to define how the selected entry should be inserted. If [param replace] is true, any existing text should be replaced. + Override this method to define how the selected entry should be inserted. If [param replace] is [code]true[/code], any existing text should be replaced. </description> </method> <method name="_filter_code_completion_candidates" qualifiers="virtual const"> @@ -29,7 +29,7 @@ <return type="void" /> <param index="0" name="force" type="bool" /> <description> - Override this method to define what happens when the user requests code completion. If [param force] is true, any checks should be bypassed. + Override this method to define what happens when the user requests code completion. If [param force] is [code]true[/code], any checks should be bypassed. </description> </method> <method name="add_auto_brace_completion_pair"> @@ -123,7 +123,7 @@ <return type="void" /> <param index="0" name="replace" type="bool" default="false" /> <description> - Inserts the selected entry into the text. If [param replace] is true, any existing text is replaced rather than merged. + Inserts the selected entry into the text. If [param replace] is [code]true[/code], any existing text is replaced rather than merged. </description> </method> <method name="convert_indent"> @@ -144,6 +144,12 @@ Code regions are delimited using start and end tags (respectively [code]region[/code] and [code]endregion[/code] by default) preceded by one line comment delimiter. (eg. [code]#region[/code] and [code]#endregion[/code]) </description> </method> + <method name="delete_lines"> + <return type="void" /> + <description> + Deletes all lines that are selected or have a caret on them. + </description> + </method> <method name="do_indent"> <return type="void" /> <description> @@ -156,6 +162,12 @@ Duplicates all lines currently selected with any caret. Duplicates the entire line beneath the current one no matter where the caret is within the line. </description> </method> + <method name="duplicate_selection"> + <return type="void" /> + <description> + Duplicates all selected text and duplicates all lines with a caret on them. + </description> + </method> <method name="fold_all_lines"> <return type="void" /> <description> @@ -379,6 +391,18 @@ Returns whether the line at the specified index is folded or not. </description> </method> + <method name="move_lines_down"> + <return type="void" /> + <description> + Moves all lines down that are selected or have a caret on them. + </description> + </method> + <method name="move_lines_up"> + <return type="void" /> + <description> + Moves all lines up that are selected or have a caret on them. + </description> + </method> <method name="remove_comment_delimiter"> <return type="void" /> <param index="0" name="start_key" type="String" /> @@ -397,7 +421,7 @@ <return type="void" /> <param index="0" name="force" type="bool" default="false" /> <description> - Emits [signal code_completion_requested], if [param force] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal. + Emits [signal code_completion_requested], if [param force] is [code]true[/code] will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path, or signal. </description> </method> <method name="set_code_completion_selected_index"> @@ -467,6 +491,12 @@ Toggle the folding of the code block at the given line. </description> </method> + <method name="toggle_foldable_lines_at_carets"> + <return type="void" /> + <description> + Toggle the folding of the code block on all lines with a caret on them. + </description> + </method> <method name="unfold_all_lines"> <return type="void" /> <description> diff --git a/doc/classes/Compositor.xml b/doc/classes/Compositor.xml index c030896b6f..7605083319 100644 --- a/doc/classes/Compositor.xml +++ b/doc/classes/Compositor.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Compositor" inherits="Resource" experimental="More customisation of the rendering pipeline will be added in the future." xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="Compositor" inherits="Resource" experimental="More customization of the rendering pipeline will be added in the future." xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Stores attributes used to customize how a Viewport is rendered. </brief_description> diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index 8fa5dac7bf..5cdff076bd 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_button().pressed.connect(self.canceled) + get_cancel_button().pressed.connect(_on_canceled) [/gdscript] [csharp] - GetCancelButton().Pressed += Canceled; + GetCancelButton().Pressed += OnCanceled; [/csharp] [/codeblocks] </description> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index 65abc4c641..0effd54fb9 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -8,66 +8,67 @@ Currently, this includes asymmetric key encryption/decryption, signing/verification, and generating cryptographically secure random bytes, RSA keys, HMAC digests, and self-signed [X509Certificate]s. [codeblocks] [gdscript] - extends Node - var crypto = Crypto.new() - var key = CryptoKey.new() - var cert = X509Certificate.new() - - func _ready(): - # Generate new RSA key. - key = crypto.generate_rsa(4096) - # Generate new self-signed certificate with the given key. - cert = crypto.generate_self_signed_certificate(key, "CN=mydomain.com,O=My Game Company,C=IT") - # Save key and certificate in the user folder. - key.save("user://generated.key") - cert.save("user://generated.crt") - # Encryption - var data = "Some data" - var encrypted = crypto.encrypt(key, data.to_utf8_buffer()) - # Decryption - var decrypted = crypto.decrypt(key, encrypted) - # Signing - var signature = crypto.sign(HashingContext.HASH_SHA256, data.sha256_buffer(), key) - # Verifying - var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key) - # Checks - assert(verified) - assert(data.to_utf8_buffer() == decrypted) + + # Generate new RSA key. + var key = crypto.generate_rsa(4096) + + # Generate new self-signed certificate with the given key. + var cert = crypto.generate_self_signed_certificate(key, "CN=mydomain.com,O=My Game Company,C=IT") + + # Save key and certificate in the user folder. + key.save("user://generated.key") + cert.save("user://generated.crt") + + # Encryption + var data = "Some data" + var encrypted = crypto.encrypt(key, data.to_utf8_buffer()) + + # Decryption + var decrypted = crypto.decrypt(key, encrypted) + + # Signing + var signature = crypto.sign(HashingContext.HASH_SHA256, data.sha256_buffer(), key) + + # Verifying + var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key) + + # Checks + assert(verified) + assert(data.to_utf8_buffer() == decrypted) [/gdscript] [csharp] using Godot; using System.Diagnostics; - public partial class MyNode : Node - { - private Crypto _crypto = new Crypto(); - private CryptoKey _key = new CryptoKey(); - private X509Certificate _cert = new X509Certificate(); - - public override void _Ready() - { - // Generate new RSA key. - _key = _crypto.GenerateRsa(4096); - // Generate new self-signed certificate with the given key. - _cert = _crypto.GenerateSelfSignedCertificate(_key, "CN=mydomain.com,O=My Game Company,C=IT"); - // Save key and certificate in the user folder. - _key.Save("user://generated.key"); - _cert.Save("user://generated.crt"); - // Encryption - string data = "Some data"; - byte[] encrypted = _crypto.Encrypt(_key, data.ToUtf8Buffer()); - // Decryption - byte[] decrypted = _crypto.Decrypt(_key, encrypted); - // Signing - byte[] signature = _crypto.Sign(HashingContext.HashType.Sha256, Data.Sha256Buffer(), _key); - // Verifying - bool verified = _crypto.Verify(HashingContext.HashType.Sha256, Data.Sha256Buffer(), signature, _key); - // Checks - Debug.Assert(verified); - Debug.Assert(data.ToUtf8Buffer() == decrypted); - } - } + Crypto crypto = new Crypto(); + + // Generate new RSA key. + CryptoKey key = crypto.GenerateRsa(4096); + + // Generate new self-signed certificate with the given key. + X509Certificate cert = crypto.GenerateSelfSignedCertificate(key, "CN=mydomain.com,O=My Game Company,C=IT"); + + // Save key and certificate in the user folder. + key.Save("user://generated.key"); + cert.Save("user://generated.crt"); + + // Encryption + string data = "Some data"; + byte[] encrypted = crypto.Encrypt(key, data.ToUtf8Buffer()); + + // Decryption + byte[] decrypted = crypto.Decrypt(key, encrypted); + + // Signing + byte[] signature = crypto.Sign(HashingContext.HashType.Sha256, Data.Sha256Buffer(), key); + + // Verifying + bool verified = crypto.Verify(HashingContext.HashType.Sha256, Data.Sha256Buffer(), signature, key); + + // Checks + Debug.Assert(verified); + Debug.Assert(data.ToUtf8Buffer() == decrypted); [/csharp] [/codeblocks] </description> diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index ff826a3ae5..dd128b6806 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CryptoKey" inherits="Resource" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> - A cryptographic key (RSA). + A cryptographic key (RSA or elliptic-curve). </brief_description> <description> The CryptoKey class represents a cryptographic key. Keys can be loaded and saved like any other [Resource]. diff --git a/doc/classes/DirAccess.xml b/doc/classes/DirAccess.xml index 03d7f68f43..9c71addf0c 100644 --- a/doc/classes/DirAccess.xml +++ b/doc/classes/DirAccess.xml @@ -94,6 +94,16 @@ Static version of [method copy]. Supports only absolute paths. </description> </method> + <method name="create_link"> + <return type="int" enum="Error" /> + <param index="0" name="source" type="String" /> + <param index="1" name="target" type="String" /> + <description> + Creates symbolic link between files or folders. + [b]Note:[/b] On Windows, this method works only if the application is running with elevated privileges or Developer Mode is enabled. + [b]Note:[/b] This method is implemented on macOS, Linux, and Windows. + </description> + </method> <method name="current_is_dir" qualifiers="const"> <return type="bool" /> <description> @@ -212,6 +222,14 @@ [b]Note:[/b] This method is implemented on macOS, Linux (for EXT4 and F2FS filesystems only) and Windows. On other platforms, it always returns [code]true[/code]. </description> </method> + <method name="is_link"> + <return type="bool" /> + <param index="0" name="path" type="String" /> + <description> + Returns [code]true[/code] if the file or directory is a symbolic link, directory junction, or other reparse point. + [b]Note:[/b] This method is implemented on macOS, Linux, and Windows. + </description> + </method> <method name="list_dir_begin"> <return type="int" enum="Error" /> <description> @@ -264,6 +282,14 @@ Returns [code]null[/code] if opening the directory failed. You can use [method get_open_error] to check the error that occurred. </description> </method> + <method name="read_link"> + <return type="String" /> + <param index="0" name="path" type="String" /> + <description> + Returns target of the symbolic link. + [b]Note:[/b] This method is implemented on macOS, Linux, and Windows. + </description> + </method> <method name="remove"> <return type="int" enum="Error" /> <param index="0" name="path" type="String" /> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 42ca336a25..ff1c390b3c 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -58,11 +58,12 @@ </method> <method name="create_status_indicator"> <return type="int" /> - <param index="0" name="icon" type="Image" /> + <param index="0" name="icon" type="Texture2D" /> <param index="1" name="tooltip" type="String" /> <param index="2" name="callback" type="Callable" /> <description> Creates a new application status indicator with the specified icon, tooltip, and activation callback. + [param callback] should take two arguments: the pressed mouse button (one of the [enum MouseButton] constants) and the click position in screen coordinates (a [Vector2i]). </description> </method> <method name="cursor_get_shape" qualifiers="const"> @@ -875,7 +876,7 @@ <param index="1" name="open_callback" type="Callable" /> <param index="2" name="close_callback" type="Callable" /> <description> - Registers callables to emit when the menu is respectively about to show or closed. + Registers callables to emit when the menu is respectively about to show or closed. Callback methods should have zero arguments. </description> </method> <method name="has_feature" qualifiers="const"> @@ -930,6 +931,12 @@ Returns [code]true[/code] if touch events are available (Android or iOS), the capability is detected on the Web platform or if [member ProjectSettings.input_devices/pointing/emulate_touch_from_mouse] is [code]true[/code]. </description> </method> + <method name="is_window_transparency_available" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the window background can be made transparent. This method returns [code]false[/code] if [member ProjectSettings.display/window/per_pixel_transparency/allowed] is set to [code]false[/code], or if transparency is not supported by the renderer or OS compositor. + </description> + </method> <method name="keyboard_get_current_layout" qualifiers="const"> <return type="int" /> <description> @@ -1103,8 +1110,9 @@ <param index="0" name="screen" type="int" default="-1" /> <description> Returns the scale factor of the specified screen by index. - [b]Note:[/b] On macOS returned value is [code]2.0[/code] for hiDPI (Retina) screen, and [code]1.0[/code] for all other cases. - [b]Note:[/b] This method is implemented only on macOS. + [b]Note:[/b] On macOS, the returned value is [code]2.0[/code] for hiDPI (Retina) screens, and [code]1.0[/code] for all other cases. + [b]Note:[/b] On Linux (Wayland), the returned value is accurate only when [param screen] is [constant SCREEN_OF_MAIN_WINDOW]. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. [code]1.25[/code] would get rounded up to [code]2.0[/code]). + [b]Note:[/b] This method is implemented only on macOS and Linux (Wayland). </description> </method> <method name="screen_get_size" qualifiers="const"> @@ -1167,20 +1175,41 @@ [b]Note:[/b] This method is implemented on Android, iOS, macOS, Windows, and Linux (X11/Wayland). </description> </method> + <method name="status_indicator_get_rect" qualifiers="const"> + <return type="Rect2" /> + <param index="0" name="id" type="int" /> + <description> + Returns the rectangle for the given status indicator [param id] in screen coordinates. If the status indicator is not visible, returns an empty [Rect2]. + [b]Note:[/b] This method is implemented on macOS and Windows. + </description> + </method> <method name="status_indicator_set_callback"> <return type="void" /> <param index="0" name="id" type="int" /> <param index="1" name="callback" type="Callable" /> <description> - Sets the application status indicator activation callback. + Sets the application status indicator activation callback. [param callback] should take two arguments: [int] mouse button index (one of [enum MouseButton] values) and [Vector2i] click position in screen coordinates. + [b]Note:[/b] This method is implemented on macOS and Windows. </description> </method> <method name="status_indicator_set_icon"> <return type="void" /> <param index="0" name="id" type="int" /> - <param index="1" name="icon" type="Image" /> + <param index="1" name="icon" type="Texture2D" /> <description> Sets the application status indicator icon. + [b]Note:[/b] This method is implemented on macOS and Windows. + </description> + </method> + <method name="status_indicator_set_menu"> + <return type="void" /> + <param index="0" name="id" type="int" /> + <param index="1" name="menu_rid" type="RID" /> + <description> + Sets the application status indicator native popup menu. + [b]Note:[/b] On macOS, the menu is activated by any mouse button. Its activation callback is [i]not[/i] triggered. + [b]Note:[/b] On Windows, the menu is activated by the right mouse button, selecting the status icon and pressing [kbd]Shift + F10[/kbd], or the applications key. The menu's activation callback for the other mouse buttons is still triggered. + [b]Note:[/b] Native popup is only supported if [NativeMenu] supports the [constant NativeMenu.FEATURE_POPUP_MENU] feature. </description> </method> <method name="status_indicator_set_tooltip"> @@ -1189,6 +1218,7 @@ <param index="1" name="tooltip" type="String" /> <description> Sets the application status indicator tooltip. + [b]Note:[/b] This method is implemented on macOS and Windows. </description> </method> <method name="tablet_get_current_driver" qualifiers="const"> @@ -1539,7 +1569,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 files are dropped from the operating system's file manager to the window specified by [param window_id]. + 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]. [param callback] should take one [PackedStringArray] argument, which is the list of dropped files. [b]Warning:[/b] Advanced users only! Adding such a callback to a [Window] node will override its default implementation, which can introduce bugs. [b]Note:[/b] This method is implemented on Windows, macOS, Linux (X11/Wayland), and Web. </description> @@ -1602,7 +1632,7 @@ <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]. + 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 larger than the specified size. See also [method window_get_max_size]. [b]Note:[/b] It's recommended to change this value using [member Window.max_size] instead. [b]Note:[/b] Using third-party tools, it is possible for users to disable window geometry restrictions and therefore bypass this limit. </description> @@ -1612,7 +1642,7 @@ <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). 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]. + 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 smaller than the specified size. See also [method window_get_min_size]. [b]Note:[/b] It's recommended to change this value using [member Window.min_size] instead. [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. @@ -2022,7 +2052,7 @@ </constant> <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] This flag has no effect if [method is_window_transparency_available] returns [code]false[/code]. [b]Note:[/b] Transparency support is implemented on Linux (X11/Wayland), 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"> diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index 4befcf5e69..d5c2ed55d7 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -90,6 +90,12 @@ Notify the [EditorFileDialog] that its view of the data is no longer accurate. Updates the view contents on next view update. </description> </method> + <method name="popup_file_dialog"> + <return type="void" /> + <description> + Shows the [EditorFileDialog] at the default size and position for file dialogs in the editor, and selects the file name if there is a current file. + </description> + </method> <method name="set_option_default"> <return type="void" /> <param index="0" name="option" type="int" /> diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 6b25be490e..cfdc172fd1 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -28,7 +28,6 @@ </method> </methods> <members> - <member name="follow_focus" type="bool" setter="set_follow_focus" getter="is_following_focus" overrides="ScrollContainer" default="true" /> <member name="horizontal_scroll_mode" type="int" setter="set_horizontal_scroll_mode" getter="get_horizontal_scroll_mode" overrides="ScrollContainer" enum="ScrollContainer.ScrollMode" default="0" /> </members> <signals> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index efa881591c..4f6ef76c4c 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -78,8 +78,11 @@ <param index="0" name="property" type="String" /> <param index="1" name="editor" type="Control" /> <param index="2" name="add_to_end" type="bool" default="false" /> + <param index="3" name="label" type="String" default="""" /> <description> Adds a property editor for an individual property. The [param editor] control must extend [EditorProperty]. + There can be multiple property editors for a property. If [param add_to_end] is [code]true[/code], this newly added editor will be displayed after all the other editors of the property whose [param add_to_end] is [code]false[/code]. For example, the editor uses this parameter to add an "Edit Region" button for [member Sprite2D.region_rect] below the regular [Rect2] editor. + [param label] can be used to choose a custom label for the property editor in the inspector. If left empty, the label is computed from the name of the property instead. </description> </method> <method name="add_property_editor_for_multiple_properties"> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index e874b44cfc..89b9e7d6c2 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -727,6 +727,14 @@ Removes a callback previously added by [method add_undo_redo_inspector_hook_callback]. </description> </method> + <method name="set_dock_tab_icon"> + <return type="void" /> + <param index="0" name="control" type="Control" /> + <param index="1" name="icon" type="Texture2D" /> + <description> + Sets the tab icon for the given control in a dock slot. Setting to [code]null[/code] removes the icon. + </description> + </method> <method name="set_force_draw_over_forwarding_enabled"> <return type="void" /> <description> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index c419c067da..7ee239415f 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -393,9 +393,6 @@ <member name="editors/3d_gizmos/gizmo_colors/joint" type="Color" setter="" getter=""> The 3D editor gizmo color for [Joint3D]s and [PhysicalBone3D]s. </member> - <member name="editors/3d_gizmos/gizmo_colors/shape" type="Color" setter="" getter=""> - The 3D editor gizmo color for [CollisionShape3D]s, [VehicleWheel3D]s, [RayCast3D]s and [SpringArm3D]s. - </member> <member name="editors/animation/autorename_animation_tracks" type="bool" setter="" getter=""> If [code]true[/code], automatically updates animation tracks' target paths when renaming or reparenting nodes in the Scene tree dock. </member> @@ -635,6 +632,9 @@ If set to [b]Auto[/b], the editor scale is automatically determined based on the screen resolution and reported display DPI. This heuristic is not always ideal, which means you can get better results by setting the editor scale manually. If set to [b]Custom[/b], the scaling value in [member interface/editor/custom_display_scale] will be used. </member> + <member name="interface/editor/dock_tab_style" type="int" setter="" getter=""> + Tab style of editor docks. + </member> <member name="interface/editor/editor_language" type="String" setter="" getter=""> The language to use for the editor interface. Translations are provided by the community. If you spot a mistake, [url=$DOCS_URL/contributing/documentation/editor_and_docs_localization.html]contribute to editor translations on Weblate![/url] @@ -649,6 +649,9 @@ <member name="interface/editor/font_antialiasing" type="int" setter="" getter=""> FreeType's font anti-aliasing mode used to render the editor fonts. Most fonts are not designed to look good with anti-aliasing disabled, so it's recommended to leave this enabled unless you're using a pixel art font. </member> + <member name="interface/editor/font_disable_embedded_bitmaps" type="bool" setter="" getter=""> + If set to [code]true[/code], embedded font bitmap loading is disabled (bitmap-only and color fonts ignore this property). + </member> <member name="interface/editor/font_hinting" type="int" setter="" getter=""> The font hinting mode to use for the editor fonts. FreeType supports the following font hinting modes: - [b]None:[/b] Don't use font hinting when rasterizing the font. This results in a smooth font, but it can look blurry. @@ -750,6 +753,10 @@ - [b]Localized:[/b] Displays the localized string for the current editor language if a translation is available for the given property. If no translation is available, falls back to [b]Capitalized[/b]. [b]Note:[/b] To display translated setting names in Project Settings and Editor Settings, use [member interface/editor/localize_settings] instead. </member> + <member name="interface/inspector/delimitate_all_container_and_resources" type="bool" setter="" getter=""> + If [code]true[/code], add a margin around Array, Dictionary, and Resource Editors that are not already colored. + [b]Note:[/b] If [member interface/inspector/nested_color_mode] is set to [b]Containers & Resources[/b] this parameter will have no effect since those editors will already be colored + </member> <member name="interface/inspector/disable_folding" type="bool" setter="" getter=""> If [code]true[/code], forces all property groups to be expanded in the Inspector dock and prevents collapsing them. </member> @@ -765,6 +772,12 @@ <member name="interface/inspector/max_array_dictionary_items_per_page" type="int" setter="" getter=""> The number of [Array] or [Dictionary] items to display on each "page" in the inspector. Higher values allow viewing more values per page, but take more time to load. This increased load time is noticeable when selecting nodes that have array or dictionary properties in the editor. </member> + <member name="interface/inspector/nested_color_mode" type="int" setter="" getter=""> + Control which property editors are colored when they are opened. + - [b]Containers & Resources:[/b] Color all Array, Dictionary, and Resource Editors. + - [b]Resources:[/b] Color all Resource Editors. + - [b]External Resources:[/b] Color Resource Editors that edits an external resource. + </member> <member name="interface/inspector/open_resources_in_current_inspector" type="bool" setter="" getter=""> If [code]true[/code], subresources can be edited in the current inspector view. If the resource type is defined in [member interface/inspector/resources_to_open_in_new_inspector] or if this setting is [code]false[/code], attempting to edit a subresource always opens a new inspector view. </member> @@ -881,7 +894,7 @@ All update modes will ignore builds with different major versions (e.g. Godot 4 -> Godot 5). </member> <member name="network/connection/network_mode" type="int" setter="" getter=""> - Determines whether online features are enabled in the editor, such as the Asset Library or update checks. Disabling these online features helps alleviate privacy concerns by preventing the editor from making HTTP requests to the Godot website, GitHub, or third-party platforms hosting assets from the Asset Library. + Determines whether online features are enabled in the editor, such as the Asset Library or update checks. Disabling these online features helps alleviate privacy concerns by preventing the editor from making HTTP requests to the Godot website or third-party platforms hosting assets from the Asset Library. </member> <member name="network/debug/remote_host" type="String" setter="" getter=""> The address to listen to when starting the remote debugger. This can be set to [code]0.0.0.0[/code] to allow external clients to connect to the remote debugger (instead of restricting the remote debugger to connections from [code]localhost[/code]). @@ -924,6 +937,9 @@ <member name="run/output/font_size" type="int" setter="" getter=""> The size of the font in the [b]Output[/b] panel at the bottom of the editor. This setting does not impact the font size of the script editor (see [member interface/editor/code_font_size]). </member> + <member name="run/output/max_lines" type="int" setter="" getter=""> + Maximum number of lines to show at any one time in the Output panel. + </member> <member name="run/platforms/linuxbsd/prefer_wayland" type="bool" setter="" getter=""> If [code]true[/code], on Linux/BSD, the editor will check for Wayland first instead of X11 (if available). </member> diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml index fafc02734a..99574da808 100644 --- a/doc/classes/FileAccess.xml +++ b/doc/classes/FileAccess.xml @@ -8,23 +8,23 @@ Here's a sample on how to write and read from a file: [codeblocks] [gdscript] - func save(content): + func save_to_file(content): var file = FileAccess.open("user://save_game.dat", FileAccess.WRITE) file.store_string(content) - func load(): + func load_from_file(): var file = FileAccess.open("user://save_game.dat", FileAccess.READ) var content = file.get_as_text() return content [/gdscript] [csharp] - public void Save(string content) + public void SaveToFile(string content) { using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Write); file.StoreString(content); } - public string Load() + public string LoadFromFile() { using var file = FileAccess.Open("user://save_game.dat", FileAccess.ModeFlags.Read); string content = file.GetAsText(); diff --git a/doc/classes/FlowContainer.xml b/doc/classes/FlowContainer.xml index 5e767acf7d..2839143960 100644 --- a/doc/classes/FlowContainer.xml +++ b/doc/classes/FlowContainer.xml @@ -21,6 +21,9 @@ <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="last_wrap_alignment" type="int" setter="set_last_wrap_alignment" getter="get_last_wrap_alignment" enum="FlowContainer.LastWrapAlignmentMode" default="0"> + The wrap behavior of the last, partially filled row or column (must be one of [constant LAST_WRAP_ALIGNMENT_INHERIT], [constant LAST_WRAP_ALIGNMENT_BEGIN], [constant LAST_WRAP_ALIGNMENT_CENTER], or [constant LAST_WRAP_ALIGNMENT_END]). + </member> <member name="reverse_fill" type="bool" setter="set_reverse_fill" getter="is_reverse_fill" default="false"> If [code]true[/code], reverses fill direction. Horizontal [FlowContainer]s will fill rows bottom to top, vertical [FlowContainer]s will fill columns right to left. When using a vertical [FlowContainer] with a right to left [member Control.layout_direction], columns will fill left to right instead. @@ -40,6 +43,18 @@ <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> + <constant name="LAST_WRAP_ALIGNMENT_INHERIT" value="0" enum="LastWrapAlignmentMode"> + The last partially filled row or column will wrap aligned to the previous row or column in accordance with [member alignment]. + </constant> + <constant name="LAST_WRAP_ALIGNMENT_BEGIN" value="1" enum="LastWrapAlignmentMode"> + The last partially filled row or column will wrap aligned to the beginning of the previous row or column. + </constant> + <constant name="LAST_WRAP_ALIGNMENT_CENTER" value="2" enum="LastWrapAlignmentMode"> + The last partially filled row or column will wrap aligned to the center of the previous row or column. + </constant> + <constant name="LAST_WRAP_ALIGNMENT_END" value="3" enum="LastWrapAlignmentMode"> + The last partially filled row or column will wrap aligned to the end of the previous row or column. + </constant> </constants> <theme_items> <theme_item name="h_separation" data_type="constant" type="int" default="4"> diff --git a/doc/classes/GDExtensionManager.xml b/doc/classes/GDExtensionManager.xml index 1ecb23a03b..211bc023c0 100644 --- a/doc/classes/GDExtensionManager.xml +++ b/doc/classes/GDExtensionManager.xml @@ -43,7 +43,7 @@ <return type="int" enum="GDExtensionManager.LoadStatus" /> <param index="0" name="path" type="String" /> <description> - Reloads the extension at the given file path. The [param path] needs to point to a valid [GDExtension], otherwise this method may return either [constant LOAD_STATUS_NOT_LOADED] or [constant LOAD_STATUS_FAILED]. + Reloads the extension at the given file path. The [param path] needs to point to a valid [GDExtension], otherwise this method may return either [constant LOAD_STATUS_NOT_LOADED] or [constant LOAD_STATUS_FAILED]. [b]Note:[/b] You can only reload extensions in the editor. In release builds, this method always fails and returns [constant LOAD_STATUS_FAILED]. </description> </method> diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index a7d89e8596..3c48f5ba31 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -43,7 +43,7 @@ <method name="restart"> <return type="void" /> <description> - Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling. + Restarts the particle emission cycle, clearing existing particles. To avoid particles vanishing from the viewport, wait for the [signal finished] signal before calling. [b]Note:[/b] The [signal finished] signal is only emitted by [member one_shot] emitters. </description> </method> diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml index dfcf299fe6..f21696d02c 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -116,6 +116,7 @@ <param index="0" name="polygon" type="PackedVector2Array" /> <description> Returns [code]true[/code] if [param polygon]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code]. + [b]Note:[/b] Assumes a Cartesian coordinate system where [code]+x[/code] is right and [code]+y[/code] is up. If using screen coordinates ([code]+y[/code] is down), the result will need to be flipped (i.e. a [code]true[/code] result will indicate counter-clockwise). </description> </method> <method name="line_intersects_line"> diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index e52a3d7683..f4075af186 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -66,6 +66,7 @@ The transparency applied to the whole geometry (as a multiplier of the materials' existing transparency). [code]0.0[/code] is fully opaque, while [code]1.0[/code] is fully transparent. Values greater than [code]0.0[/code] (exclusive) will force the geometry's materials to go through the transparent pipeline, which is slower to render and can exhibit rendering issues due to incorrect transparency sorting. However, unlike using a transparent material, setting [member transparency] to a value greater than [code]0.0[/code] (exclusive) will [i]not[/i] disable shadow rendering. In spatial shaders, [code]1.0 - transparency[/code] is set as the default value of the [code]ALPHA[/code] built-in. [b]Note:[/b] [member transparency] is clamped between [code]0.0[/code] and [code]1.0[/code], so this property cannot be used to make transparent materials more opaque than they originally are. + [b]Note:[/b] Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, [member transparency] is ignored and is considered as always being [code]0.0[/code]. </member> <member name="visibility_range_begin" type="float" setter="set_visibility_range_begin" getter="get_visibility_range_begin" default="0.0" keywords="lod_begin, hlod_begin"> Starting distance from which the GeometryInstance3D will be visible, taking [member visibility_range_begin_margin] into account as well. The default value of 0 is used to disable the range check. @@ -130,9 +131,11 @@ </constant> <constant name="VISIBILITY_RANGE_FADE_SELF" value="1" enum="VisibilityRangeFadeMode"> Will fade-out itself when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin]. + [b]Note:[/b] Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like [constant VISIBILITY_RANGE_FADE_DISABLED] but with hysteresis disabled. </constant> <constant name="VISIBILITY_RANGE_FADE_DEPENDENCIES" value="2" enum="VisibilityRangeFadeMode"> Will fade-in its visibility dependencies (see [member Node3D.visibility_parent]) when reaching the limits of its own visibility range. This is slower than [constant VISIBILITY_RANGE_FADE_DISABLED], but it can provide smoother transitions. The fading range is determined by [member visibility_range_begin_margin] and [member visibility_range_end_margin]. + [b]Note:[/b] Only supported when using the Forward+ rendering method. When using the Mobile or Compatibility rendering method, this mode acts like [constant VISIBILITY_RANGE_FADE_DISABLED] but with hysteresis disabled. </constant> </constants> </class> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index ad1028d7f4..cc3acad6d6 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -267,6 +267,9 @@ </method> </methods> <members> + <member name="ignore_invalid_connection_type" type="bool" setter="set_ignore_invalid_connection_type" getter="is_ignoring_valid_connection_type" default="false"> + If [code]true[/code], you can connect ports with different types, even if the connection was not explicitly allowed in the parent [GraphEdit]. + </member> <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="0" /> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> The text displayed in the GraphNode's title bar. diff --git a/doc/classes/HingeJoint3D.xml b/doc/classes/HingeJoint3D.xml index d150c79b78..f794853caf 100644 --- a/doc/classes/HingeJoint3D.xml +++ b/doc/classes/HingeJoint3D.xml @@ -53,7 +53,7 @@ <member name="angular_limit/relaxation" type="float" setter="set_param" getter="get_param" default="1.0"> The lower this value, the more the rotation gets slowed down. </member> - <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" default="0.9"> + <member name="angular_limit/softness" type="float" setter="set_param" getter="get_param" default="0.9" deprecated="This property is never set by the engine and is kept for compatibility purposes."> </member> <member name="angular_limit/upper" type="float" setter="set_param" getter="get_param" default="1.5708"> The maximum rotation. Only active if [member angular_limit/enable] is [code]true[/code]. @@ -84,7 +84,7 @@ <constant name="PARAM_LIMIT_BIAS" value="3" enum="Param"> The speed with which the rotation across the axis perpendicular to the hinge gets corrected. </constant> - <constant name="PARAM_LIMIT_SOFTNESS" value="4" enum="Param"> + <constant name="PARAM_LIMIT_SOFTNESS" value="4" enum="Param" deprecated="This property is never used by the engine and is kept for compatibility purpose."> </constant> <constant name="PARAM_LIMIT_RELAXATION" value="5" enum="Param"> The lower this value, the more the rotation gets slowed down. diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 119ecb7f0e..642bb76e75 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -397,11 +397,14 @@ <method name="vibrate_handheld"> <return type="void" /> <param index="0" name="duration_ms" type="int" default="500" /> + <param index="1" name="amplitude" type="float" default="-1.0" /> <description> + [b]Note:[/b] While [code skip-lint]amplitude[/code] expects a value between 0 and 1, -1 does the default amplitude for the device. Vibrate the handheld device for the specified duration in milliseconds. [b]Note:[/b] This method is implemented on Android, iOS, and Web. It has no effect on other platforms. [b]Note:[/b] For Android, [method vibrate_handheld] requires enabling the [code]VIBRATE[/code] permission in the export preset. Otherwise, [method vibrate_handheld] will have no effect. [b]Note:[/b] For iOS, specifying the duration is only supported in iOS 13 and later. + [b]Note:[/b] For Web, the amplitude cannot be changed. [b]Note:[/b] Some web browsers such as Safari and Firefox for Android do not support [method vibrate_handheld]. </description> </method> diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml index af0a54815f..0099c76d08 100644 --- a/doc/classes/Joint2D.xml +++ b/doc/classes/Joint2D.xml @@ -4,7 +4,7 @@ Abstract base class for all 2D physics joints. </brief_description> <description> - Abstract base class for all joints in 2D physics. 2D joints bind together two physics bodies and apply a constraint. + Abstract base class for all joints in 2D physics. 2D joints bind together two physics bodies ([member node_a] and [member node_b]) and apply a constraint. </description> <tutorials> </tutorials> @@ -12,7 +12,7 @@ <method name="get_rid" qualifiers="const"> <return type="RID" /> <description> - Returns the joint's [RID]. + Returns the joint's internal [RID] from the [PhysicsServer2D]. </description> </method> </methods> @@ -22,13 +22,13 @@ When set to [code]0[/code], the default value from [member ProjectSettings.physics/2d/solver/default_constraint_bias] is used. </member> <member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true"> - If [code]true[/code], [member node_a] and [member node_b] can not collide. + If [code]true[/code], the two bodies bound together do not collide with each other. </member> <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath("")"> - The first body attached to the joint. Must derive from [PhysicsBody2D]. + Path to the first body (A) attached to the joint. The node must inherit [PhysicsBody2D]. </member> <member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath("")"> - The second body attached to the joint. Must derive from [PhysicsBody2D]. + Path to the second body (B) attached to the joint. The node must inherit [PhysicsBody2D]. </member> </members> </class> diff --git a/doc/classes/Joint3D.xml b/doc/classes/Joint3D.xml index ea0dda881a..950129806a 100644 --- a/doc/classes/Joint3D.xml +++ b/doc/classes/Joint3D.xml @@ -4,7 +4,7 @@ Abstract base class for all 3D physics joints. </brief_description> <description> - Abstract base class for all joints in 3D physics. 3D joints bind together two physics bodies and apply a constraint. + Abstract base class for all joints in 3D physics. 3D joints bind together two physics bodies ([member node_a] and [member node_b]) and apply a constraint. If only one body is defined, it is attached to a fixed [StaticBody3D] without collision shapes. </description> <tutorials> <link title="3D Truck Town Demo">https://godotengine.org/asset-library/asset/2752</link> @@ -13,19 +13,21 @@ <method name="get_rid" qualifiers="const"> <return type="RID" /> <description> - Returns the joint's [RID]. + Returns the joint's internal [RID] from the [PhysicsServer3D]. </description> </method> </methods> <members> <member name="exclude_nodes_from_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true"> - If [code]true[/code], the two bodies of the nodes are not able to collide with each other. + If [code]true[/code], the two bodies bound together do not collide with each other. </member> <member name="node_a" type="NodePath" setter="set_node_a" getter="get_node_a" default="NodePath("")"> - The node attached to the first side (A) of the joint. + Path to the first node (A) attached to the joint. The node must inherit [PhysicsBody3D]. + If left empty and [member node_b] is set, the body is attached to a fixed [StaticBody3D] without collision shapes. </member> <member name="node_b" type="NodePath" setter="set_node_b" getter="get_node_b" default="NodePath("")"> - The node attached to the second side (B) of the joint. + Path to the second node (B) attached to the joint. The node must inherit [PhysicsBody3D]. + If left empty and [member node_a] is set, the body is attached to a fixed [StaticBody3D] without collision shapes. </member> <member name="solver_priority" type="int" setter="set_solver_priority" getter="get_solver_priority" default="1"> The priority used to define which solver is executed first for multiple joints. The lower the value, the higher the priority. diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index c1fc49cf9f..bda5fb69de 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -199,7 +199,7 @@ </constant> <constant name="BAKE_DISABLED" value="0" enum="BakeMode"> Light is ignored when baking. This is the fastest mode, but the light will be taken into account when baking global illumination. This mode should generally be used for dynamic lights that change quickly, as the effect of global illumination is less noticeable on those lights. - [b]Note:[/b] Hiding a light does [i]not[/i] affect baking [LightmapGI]. Hiding a light will still affect baking [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled). + [b]Note:[/b] Hiding a light does [i]not[/i] affect baking [LightmapGI]. Hiding a light will still affect baking [VoxelGI] and SDFGI (see [member Environment.sdfgi_enabled]). </constant> <constant name="BAKE_STATIC" value="1" enum="BakeMode"> Light is taken into account in static baking ([VoxelGI], [LightmapGI], SDFGI ([member Environment.sdfgi_enabled])). The light can be moved around or modified, but its global illumination will not update in real-time. This is suitable for subtle changes (such as flickering torches), but generally not large changes such as toggling a light on and off. diff --git a/doc/classes/LightmapGI.xml b/doc/classes/LightmapGI.xml index 13d48d8650..6fb15e4d21 100644 --- a/doc/classes/LightmapGI.xml +++ b/doc/classes/LightmapGI.xml @@ -28,6 +28,9 @@ <member name="camera_attributes" type="CameraAttributes" setter="set_camera_attributes" getter="get_camera_attributes"> The [CameraAttributes] resource that specifies exposure levels to bake at. Auto-exposure and non exposure properties will be ignored. Exposure settings should be used to reduce the dynamic range present when baking. If exposure is too high, the [LightmapGI] will have banding artifacts or may have over-exposure artifacts. </member> + <member name="denoiser_range" type="int" setter="set_denoiser_range" getter="get_denoiser_range" default="10"> + The distance in pixels from which the denoiser samples. Lower values preserve more details, but may give blotchy results if the lightmap quality is not high enough. Only effective if [member use_denoiser] is [code]true[/code] and [member ProjectSettings.rendering/lightmapping/denoising/denoiser] is set to JNLM. + </member> <member name="denoiser_strength" type="float" setter="set_denoiser_strength" getter="get_denoiser_strength" default="0.1"> The strength of denoising step applied to the generated lightmaps. Only effective if [member use_denoiser] is [code]true[/code] and [member ProjectSettings.rendering/lightmapping/denoising/denoiser] is set to JNLM. </member> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index 966e870940..6b5a50d97b 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -4,7 +4,7 @@ A [Resource] that contains vertex array-based geometry. </brief_description> <description> - Mesh is a type of [Resource] that 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. + Mesh is a type of [Resource] that 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. The maximum number of surfaces per mesh is [constant RenderingServer.MAX_MESH_SURFACES]. </description> <tutorials> <link title="3D Material Testers Demo">https://godotengine.org/asset-library/asset/2742</link> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index c5e8d8cbe7..f65e29af8e 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -29,7 +29,7 @@ <return type="int" /> <param index="0" name="name" type="String" /> <description> - Returns the first item with the given name. + Returns the first item with the given name, or [code]-1[/code] if no item is found. </description> </method> <method name="get_item_list" qualifiers="const"> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 6f0561e66e..94c372106b 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -261,7 +261,7 @@ <signal name="velocity_computed"> <param index="0" name="safe_velocity" type="Vector2" /> <description> - Notifies when the collision avoidance velocity is calculated. Emitted when [member velocity] is set. Only emitted when [member avoidance_enabled] is true. + Notifies when the collision avoidance velocity is calculated. Emitted every update as long as [member avoidance_enabled] is [code]true[/code] and the agent has a navigation map. </description> </signal> <signal name="waypoint_reached"> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index 64ee35a84b..5f9f4991d1 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -271,7 +271,7 @@ <signal name="velocity_computed"> <param index="0" name="safe_velocity" type="Vector3" /> <description> - Notifies when the collision avoidance velocity is calculated. Emitted when [member velocity] is set. Only emitted when [member avoidance_enabled] is true. + Notifies when the collision avoidance velocity is calculated. Emitted every update as long as [member avoidance_enabled] is [code]true[/code] and the agent has a navigation map. </description> </signal> <signal name="waypoint_reached"> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 37e64da8c8..176bdea4a1 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -619,6 +619,12 @@ [method request_ready] resets it back to [code]false[/code]. </description> </method> + <method name="is_part_of_edited_scene" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the node is part of the scene currently opened in the editor. + </description> + </method> <method name="is_physics_interpolated" qualifiers="const"> <return type="bool" /> <description> @@ -985,7 +991,7 @@ [b]Note:[/b] When changing the name, the following characters will be replaced with an underscore: ([code].[/code] [code]:[/code] [code]@[/code] [code]/[/code] [code]"[/code] [code]%[/code]). In particular, the [code]@[/code] character is reserved for auto-generated names. See also [method String.validate_node_name]. </member> <member name="owner" type="Node" setter="set_owner" getter="get_owner"> - The owner of this node. The owner must be an ancestor of this node. When packing the owner node in a [PackedScene], all the nodes it owns are also saved with it. + The owner of this node. The owner must be an ancestor of this node. When packing the owner node in a [PackedScene], all the nodes it owns are also saved with it. [b]Note:[/b] In the editor, nodes not owned by the scene root are usually not displayed in the Scene dock, and will [b]not[/b] be saved. To prevent this, remember to set the owner after calling [method add_child]. See also (see [member unique_name_in_owner]) </member> <member name="physics_interpolation_mode" type="int" setter="set_physics_interpolation_mode" getter="get_physics_interpolation_mode" enum="Node.PhysicsInterpolationMode" default="0"> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 091acdf6f2..851290de7b 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -44,7 +44,8 @@ <return type="void" /> <param index="0" name="point" type="Vector2" /> <description> - Rotates the node so it points towards the [param point], which is expected to use global coordinates. + Rotates the node so that its local +X axis points towards the [param point], which is expected to use global coordinates. + [param point] should not be the same as the node's position, otherwise the node always looks to the right. </description> </method> <method name="move_local_x"> diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index f294b64576..b4969b8906 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -30,7 +30,7 @@ [/codeblock] Node paths cannot check whether they are valid and may point to nodes or properties that do not exist. Their meaning depends entirely on the context in which they're used. You usually do not have to worry about the [NodePath] type, as strings are automatically converted to the type when necessary. There are still times when defining node paths is useful. For example, exported [NodePath] properties allow you to easily select any node within the currently edited scene. They are also automatically updated when moving, renaming or deleting nodes in the scene tree editor. See also [annotation @GDScript.@export_node_path]. - See also [StringName], which is a similar type designed for optimised strings. + See also [StringName], which is a similar type designed for optimized strings. [b]Note:[/b] In a boolean context, a [NodePath] will evaluate to [code]false[/code] if it is empty ([code]NodePath("")[/code]). Otherwise, a [NodePath] will always evaluate to [code]true[/code]. </description> <tutorials> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 68d2d6411c..b0dec2d00a 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -1034,6 +1034,7 @@ Translates a [param message], using the translation catalogs configured in the Project Settings. Further [param context] can be specified to help with the translation. Note that most [Control] nodes automatically translate their strings, so this method is mostly useful for formatted strings or custom drawn text. If [method can_translate_messages] is [code]false[/code], or no translation is available, this method returns the [param message] without changes. See [method set_message_translation]. For detailed examples, see [url=$DOCS_URL/tutorials/i18n/internationalizing_games.html]Internationalizing games[/url]. + [b]Note:[/b] This method can't be used without an [Object] instance, as it requires the [method can_translate_messages] method. To translate strings in a static context, use [method TranslationServer.translate]. </description> </method> <method name="tr_n" qualifiers="const"> @@ -1048,6 +1049,7 @@ The [param n] is the number, or amount, of the message's subject. It is used by the translation system to fetch the correct plural form for the current language. For detailed examples, see [url=$DOCS_URL/tutorials/i18n/localization_using_gettext.html]Localization using gettext[/url]. [b]Note:[/b] Negative and [float] numbers may not properly apply to some countable subjects. It's recommended to handle these cases with [method tr]. + [b]Note:[/b] This method can't be used without an [Object] instance, as it requires the [method can_translate_messages] method. To translate strings in a static context, use [method TranslationServer.translate_plural]. </description> </method> </methods> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index 579b4c5b9f..26d8fa8d5f 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -99,14 +99,14 @@ <return type="int" enum="Error" /> <param index="0" name="path" type="Node" /> <description> - Pack will ignore any sub-nodes not owned by given node. See [member Node.owner]. + Packs the [param path] node, and all owned sub-nodes, into this [PackedScene]. Any existing data will be cleared. See [member Node.owner]. </description> </method> </methods> <members> <member name="_bundled" type="Dictionary" setter="_set_bundled_scene" getter="_get_bundled_scene" default="{ "conn_count": 0, "conns": PackedInt32Array(), "editable_instances": [], "names": PackedStringArray(), "node_count": 0, "node_paths": [], "nodes": PackedInt32Array(), "variants": [], "version": 3 }"> A dictionary representation of the scene contents. - Available keys include "rnames" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for paths to overridden nodes, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene. + Available keys include "names" and "variants" for resources, "node_count", "nodes", "node_paths" for nodes, "editable_instances" for paths to overridden nodes, "conn_count" and "conns" for signal connections, and "version" for the format style of the PackedScene. </member> </members> <constants> diff --git a/doc/classes/PackedVector4Array.xml b/doc/classes/PackedVector4Array.xml new file mode 100644 index 0000000000..fd0cfeb74b --- /dev/null +++ b/doc/classes/PackedVector4Array.xml @@ -0,0 +1,225 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PackedVector4Array" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + A packed array of [Vector4]s. + </brief_description> + <description> + An array specifically designed to hold [Vector4]. Packs data tightly, so it saves memory for large array sizes. + [b]Note:[/b] Packed arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. This is [i]not[/i] the case for built-in properties and methods. The returned packed array of these are a copies, and changing it will [i]not[/i] affect the original value. To update a built-in property you need to modify the returned array, and then assign it to the property again. + </description> + <tutorials> + </tutorials> + <constructors> + <constructor name="PackedVector4Array"> + <return type="PackedVector4Array" /> + <description> + Constructs an empty [PackedVector4Array]. + </description> + </constructor> + <constructor name="PackedVector4Array"> + <return type="PackedVector4Array" /> + <param index="0" name="from" type="PackedVector4Array" /> + <description> + Constructs a [PackedVector4Array] as a copy of the given [PackedVector4Array]. + </description> + </constructor> + <constructor name="PackedVector4Array"> + <return type="PackedVector4Array" /> + <param index="0" name="from" type="Array" /> + <description> + Constructs a new [PackedVector4Array]. Optionally, you can pass in a generic [Array] that will be converted. + [b]Note:[/b] When initializing a [PackedVector4Array] with elements, it must be initialized with an [Array] of [Vector4] values: + [codeblock] + var array = PackedVector4Array([Vector4(12, 34, 56, 78), Vector4(90, 12, 34, 56)]) + [/codeblock] + </description> + </constructor> + </constructors> + <methods> + <method name="append"> + <return type="bool" /> + <param index="0" name="value" type="Vector4" /> + <description> + Appends an element at the end of the array (alias of [method push_back]). + </description> + </method> + <method name="append_array"> + <return type="void" /> + <param index="0" name="array" type="PackedVector4Array" /> + <description> + Appends a [PackedVector4Array] at the end of this array. + </description> + </method> + <method name="bsearch"> + <return type="int" /> + <param index="0" name="value" type="Vector4" /> + <param index="1" name="before" type="bool" default="true" /> + <description> + Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [param before] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. + [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. + [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + </description> + </method> + <method name="clear"> + <return type="void" /> + <description> + Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]. + </description> + </method> + <method name="count" qualifiers="const"> + <return type="int" /> + <param index="0" name="value" type="Vector4" /> + <description> + Returns the number of times an element is in the array. + [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + </description> + </method> + <method name="duplicate"> + <return type="PackedVector4Array" /> + <description> + Creates a copy of the array, and returns it. + </description> + </method> + <method name="fill"> + <return type="void" /> + <param index="0" name="value" type="Vector4" /> + <description> + Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. + </description> + </method> + <method name="find" qualifiers="const"> + <return type="int" /> + <param index="0" name="value" type="Vector4" /> + <param index="1" name="from" type="int" default="0" /> + <description> + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + </description> + </method> + <method name="has" qualifiers="const"> + <return type="bool" /> + <param index="0" name="value" type="Vector4" /> + <description> + Returns [code]true[/code] if the array contains [param value]. + [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + </description> + </method> + <method name="insert"> + <return type="int" /> + <param index="0" name="at_index" type="int" /> + <param index="1" name="value" type="Vector4" /> + <description> + Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). + </description> + </method> + <method name="is_empty" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the array is empty. + </description> + </method> + <method name="push_back"> + <return type="bool" /> + <param index="0" name="value" type="Vector4" /> + <description> + Inserts a [Vector4] at the end. + </description> + </method> + <method name="remove_at"> + <return type="void" /> + <param index="0" name="index" type="int" /> + <description> + Removes an element from the array by index. + </description> + </method> + <method name="resize"> + <return type="int" /> + <param index="0" name="new_size" type="int" /> + <description> + Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. + </description> + </method> + <method name="reverse"> + <return type="void" /> + <description> + Reverses the order of the elements in the array. + </description> + </method> + <method name="rfind" qualifiers="const"> + <return type="int" /> + <param index="0" name="value" type="Vector4" /> + <param index="1" name="from" type="int" default="-1" /> + <description> + Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. + [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + </description> + </method> + <method name="set"> + <return type="void" /> + <param index="0" name="index" type="int" /> + <param index="1" name="value" type="Vector4" /> + <description> + Changes the [Vector4] at the given index. + </description> + </method> + <method name="size" qualifiers="const"> + <return type="int" /> + <description> + Returns the number of elements in the array. + </description> + </method> + <method name="slice" qualifiers="const"> + <return type="PackedVector4Array" /> + <param index="0" name="begin" type="int" /> + <param index="1" name="end" type="int" default="2147483647" /> + <description> + Returns the slice of the [PackedVector4Array], from [param begin] (inclusive) to [param end] (exclusive), as a new [PackedVector4Array]. + The absolute value of [param begin] and [param end] will be clamped to the array size, so the default value for [param end] makes it slice to the size of the array by default (i.e. [code]arr.slice(1)[/code] is a shorthand for [code]arr.slice(1, arr.size())[/code]). + If either [param begin] or [param end] are negative, they will be relative to the end of the array (i.e. [code]arr.slice(0, -2)[/code] is a shorthand for [code]arr.slice(0, arr.size() - 2)[/code]). + </description> + </method> + <method name="sort"> + <return type="void" /> + <description> + Sorts the elements of the array in ascending order. + [b]Note:[/b] Vectors with [constant @GDScript.NAN] elements don't behave the same as other vectors. Therefore, the results from this method may not be accurate if NaNs are included. + </description> + </method> + <method name="to_byte_array" qualifiers="const"> + <return type="PackedByteArray" /> + <description> + Returns a [PackedByteArray] with each vector encoded as bytes. + </description> + </method> + </methods> + <operators> + <operator name="operator !="> + <return type="bool" /> + <param index="0" name="right" type="PackedVector4Array" /> + <description> + Returns [code]true[/code] if contents of the arrays differ. + </description> + </operator> + <operator name="operator +"> + <return type="PackedVector4Array" /> + <param index="0" name="right" type="PackedVector4Array" /> + <description> + Returns a new [PackedVector4Array] with contents of [param right] added at the end of this array. For better performance, consider using [method append_array] instead. + </description> + </operator> + <operator name="operator =="> + <return type="bool" /> + <param index="0" name="right" type="PackedVector4Array" /> + <description> + Returns [code]true[/code] if contents of both arrays are the same, i.e. they have all equal [Vector4]s at the corresponding indices. + </description> + </operator> + <operator name="operator []"> + <return type="Vector4" /> + <param index="0" name="index" type="int" /> + <description> + Returns the [Vector4] at index [param index]. Negative indices can be used to access the elements starting from the end. Using index out of array's bounds will result in an error. + </description> + </operator> + </operators> +</class> diff --git a/doc/classes/ParticleProcessMaterial.xml b/doc/classes/ParticleProcessMaterial.xml index 8d0ae317b9..1502690b45 100644 --- a/doc/classes/ParticleProcessMaterial.xml +++ b/doc/classes/ParticleProcessMaterial.xml @@ -185,6 +185,7 @@ </member> <member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents"> The box's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX]. + [b]Note:[/b] [member emission_box_extents] starts from the center point and applies the X, Y, and Z values in both directions. The size is twice the area of the extents. </member> <member name="emission_color_texture" type="Texture2D" setter="set_emission_color_texture" getter="get_emission_color_texture"> Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture]. diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml index 1601a1040e..03cbfb4ce7 100644 --- a/doc/classes/PhysicsMaterial.xml +++ b/doc/classes/PhysicsMaterial.xml @@ -14,7 +14,7 @@ </member> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0"> The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). - [b]Note:[/b] Even with [member bounce] set to [code]1.0[/code], some energy will be lost over time due to linear and angular damping. To have a [PhysicsBody3D] that preserves all its energy over time, set [member bounce] to [code]1.0[/code], the body's linear damp mode to [b]Replace[/b] (if applicable), its linear damp to [code]0.0[/code], its angular damp mode to [b]Replace[/b] (if applicable), and its angular damp to [code]0.0[/code]. + [b]Note:[/b] Even with [member bounce] set to [code]1.0[/code], some energy will be lost over time due to linear and angular damping. To have a physics body that preserves all its energy over time, set [member bounce] to [code]1.0[/code], the body's linear damp mode to [b]Replace[/b] (if applicable), its linear damp to [code]0.0[/code], its angular damp mode to [b]Replace[/b] (if applicable), and its angular damp to [code]0.0[/code]. </member> <member name="friction" type="float" setter="set_friction" getter="get_friction" default="1.0"> The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index d40326fa21..c0672cc503 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -52,7 +52,8 @@ <method name="area_create"> <return type="RID" /> <description> - Creates a 2D area object in the physics server, and returns the [RID] that identifies it. Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space. + Creates a 2D area object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and [code]monitorable[/code] set to [code]false[/code]. + Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space. If you want the area to be detectable use [method area_set_monitorable]. </description> </method> <method name="area_get_canvas_instance_id" qualifiers="const"> @@ -369,7 +370,8 @@ <method name="body_create"> <return type="RID" /> <description> - Creates a 2D body object in the physics server, and returns the [RID] that identifies it. Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space. + Creates a 2D body object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and body mode set to [constant BODY_MODE_RIGID]. + Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space. </description> </method> <method name="body_get_canvas_instance_id" qualifiers="const"> diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 4a4a1ad025..e835724e36 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -44,7 +44,8 @@ <method name="area_create"> <return type="RID" /> <description> - Creates an [Area3D]. + Creates a 3D area object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and [code]monitorable[/code] set to [code]false[/code]. + Use [method area_add_shape] to add shapes to it, use [method area_set_transform] to set its transform, and use [method area_set_space] to add the area to a space. If you want the area to be detectable use [method area_set_monitorable]. </description> </method> <method name="area_get_collision_layer" qualifiers="const"> @@ -351,6 +352,8 @@ <method name="body_create"> <return type="RID" /> <description> + Creates a 3D body object in the physics server, and returns the [RID] that identifies it. The default settings for the created area include a collision layer and mask set to [code]1[/code], and body mode set to [constant BODY_MODE_RIGID]. + Use [method body_add_shape] to add shapes to it, use [method body_set_state] to set its transform, and use [method body_set_space] to add the body to a space. </description> </method> <method name="body_get_collision_layer" qualifiers="const"> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 1daa1b04e4..32e71ce030 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -254,6 +254,7 @@ Path to an image used as the boot splash. If left empty, the default Godot Engine splash will be displayed instead. [b]Note:[/b] Only effective if [member application/boot_splash/show_image] is [code]true[/code]. [b]Note:[/b] The only supported format is PNG. Using another image format will result in an error. + [b]Note:[/b] The image will also show when opening the project in the editor. If you want to display the default splash image in the editor, add an empty override for [code]editor_hint[/code] feature. </member> <member name="application/boot_splash/minimum_display_time" type="int" setter="" getter="" default="0"> Minimum boot splash display time (in milliseconds). It is not recommended to set too high values for this setting. @@ -343,7 +344,7 @@ This setting can be overridden using the [code]--frame-delay <ms;>[/code] command line argument. </member> <member name="application/run/low_processor_mode" type="bool" setter="" getter="" default="false"> - If [code]true[/code], enables low-processor usage mode. This setting only works on desktop platforms. The screen is not redrawn if nothing changes visually. This is meant for writing applications and editors, but is pretty useless (and can hurt performance) in most games. + If [code]true[/code], enables low-processor usage mode. The screen is not redrawn if nothing changes visually. This is meant for writing applications and editors, but is pretty useless (and can hurt performance) in most games. </member> <member name="application/run/low_processor_mode_sleep_usec" type="int" setter="" getter="" default="6900"> Amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage. @@ -553,10 +554,10 @@ When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when defining a local or subclass member variable that would shadow a variable that is inherited from a parent class. </member> <member name="debug/gdscript/warnings/standalone_expression" type="int" setter="" getter="" default="1"> - When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling an expression that has no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement. + When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling an expression that may have no effect on the surrounding code, such as writing [code]2 + 2[/code] as a statement. </member> <member name="debug/gdscript/warnings/standalone_ternary" type="int" setter="" getter="" default="1"> - When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a ternary expression that has no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement. + When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a ternary expression that may have no effect on the surrounding code, such as writing [code]42 if active else 0[/code] as a statement. </member> <member name="debug/gdscript/warnings/static_called_on_instance" type="int" setter="" getter="" default="1"> When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when calling a static method from an instance of a class instead of from the class directly. @@ -797,8 +798,8 @@ <member name="display/window/energy_saving/keep_screen_on" type="bool" setter="" getter="" default="true"> If [code]true[/code], keeps the screen on (even in case of inactivity), so the screensaver does not take over. Works on desktop and mobile platforms. </member> - <member name="display/window/energy_saving/keep_screen_on.editor" type="bool" setter="" getter="" default="false"> - Editor-only override for [member display/window/energy_saving/keep_screen_on]. Does not affect exported projects in debug or release mode. + <member name="display/window/energy_saving/keep_screen_on.editor_hint" type="bool" setter="" getter="" default="false"> + Editor-only override for [member display/window/energy_saving/keep_screen_on]. Does not affect running project. </member> <member name="display/window/handheld/orientation" type="int" setter="" getter="" default="0"> The default screen orientation to use on mobile devices. See [enum DisplayServer.ScreenOrientation] for possible values. @@ -901,8 +902,9 @@ <member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1"> Sets the V-Sync mode for the main game window. The editor's own V-Sync mode can be set using [member EditorSettings.interface/editor/vsync_mode]. See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application. - Depending on the platform and used renderer, the engine will fall back to [b]Enabled[/b] if the desired mode is not supported. - [b]Note:[/b] V-Sync modes other than [b]Enabled[/b] are only supported in the Forward+ and Mobile rendering methods, not Compatibility. + Depending on the platform and rendering method, the engine will fall back to [b]Enabled[/b] if the desired mode is not supported. + V-Sync can be disabled on the command line using the [code]--disable-vsync[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]. + [b]Note:[/b] The [b]Adaptive[/b] and [b]Mailbox[/b] V-Sync modes are only supported in the Forward+ and Mobile rendering methods, not Compatibility. [b]Note:[/b] This property is only read when the project starts. To change the V-Sync mode at runtime, call [method DisplayServer.window_set_vsync_mode] instead. </member> <member name="dotnet/project/assembly_name" type="String" setter="" getter="" default=""""> @@ -1071,6 +1073,9 @@ <member name="gui/timers/tooltip_delay_sec" type="float" setter="" getter="" default="0.5"> Default delay for tooltips (in seconds). </member> + <member name="gui/timers/tooltip_delay_sec.editor_hint" type="float" setter="" getter="" default="0.5"> + Delay for tooltips in the editor. + </member> <member name="input/ui_accept" type="Dictionary" setter="" getter=""> Default [InputEventAction] to confirm a focused button, menu or list item, or validate input. [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. @@ -2709,8 +2714,8 @@ <member name="rendering/renderer/rendering_method.web" type="String" setter="" getter="" default=""gl_compatibility""> Override for [member rendering/renderer/rendering_method] on web. </member> - <member name="rendering/rendering_device/d3d12/agility_sdk_version" type="int" setter="" getter="" default="610"> - Version code of the Direct3D 12 Agility SDK to use ([code]D3D12SDKVersion[/code]). + <member name="rendering/rendering_device/d3d12/agility_sdk_version" type="int" setter="" getter="" default="613"> + Version code of the [url=https://devblogs.microsoft.com/directx/directx12agility/]Direct3D 12 Agility SDK[/url] to use ([code]D3D12SDKVersion[/code]). This must match the [i]minor[/i] version that is installed next to the editor binary and in the export templates directory for the current editor version. For example, if you have [code]1.613.3[/code] installed, you need to input [code]613[/code] here. </member> <member name="rendering/rendering_device/d3d12/max_misc_descriptors_per_frame" type="int" setter="" getter="" default="512"> The number of entries in the miscellaneous descriptors heap the Direct3D 12 rendering driver uses each frame, used for various operations like clearing a texture. @@ -2896,6 +2901,9 @@ <member name="xr/openxr/extensions/eye_gaze_interaction" type="bool" setter="" getter="" default="false"> Specify whether to enable eye tracking for this project. Depending on the platform, additional export configuration may be needed. </member> + <member name="xr/openxr/extensions/hand_interaction_profile" type="bool" setter="" getter="" default="false"> + If true the hand interaction profile extension will be activated if supported by the platform. + </member> <member name="xr/openxr/extensions/hand_tracking" type="bool" setter="" getter="" default="true"> If true we enable the hand tracking extension if available. </member> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 0471d73749..ba7dcab2d7 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -89,13 +89,13 @@ var rect = Rect2(0, 0, 5, 2) rect = rect.expand(Vector2(10, 0)) # rect is Rect2(0, 0, 10, 2) - rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 10, 5) + rect = rect.expand(Vector2(-5, 5)) # rect is Rect2(-5, 0, 15, 5) [/gdscript] [csharp] var rect = new Rect2(0, 0, 5, 2); rect = rect.Expand(new Vector2(10, 0)); // rect is Rect2(0, 0, 10, 2) - rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 10, 5) + rect = rect.Expand(new Vector2(-5, 5)); // rect is Rect2(-5, 0, 15, 5) [/csharp] [/codeblocks] </description> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index c021a1be26..cbd09f8430 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -88,13 +88,13 @@ var rect = Rect2i(0, 0, 5, 2) rect = rect.expand(Vector2i(10, 0)) # rect is Rect2i(0, 0, 10, 2) - rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 10, 5) + rect = rect.expand(Vector2i(-5, 5)) # rect is Rect2i(-5, 0, 15, 5) [/gdscript] [csharp] var rect = new Rect2I(0, 0, 5, 2); rect = rect.Expand(new Vector2I(10, 0)); // rect is Rect2I(0, 0, 10, 2) - rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 10, 5) + rect = rect.Expand(new Vector2I(-5, 5)); // rect is Rect2I(-5, 0, 15, 5) [/csharp] [/codeblocks] </description> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index d7a659c255..3c9f0fc7af 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -92,13 +92,13 @@ Sets the exposure values that will be used by the renderers. The normalization amount is used to bake a given Exposure Value (EV) into rendering calculations to reduce the dynamic range of the scene. The normalization factor can be calculated from exposure value (EV100) as follows: [codeblock] - func get_exposure_normalization(float ev100): - return 1.0 / (pow(2.0, ev100) * 1.2) + func get_exposure_normalization(ev100: float): + return 1.0 / (pow(2.0, ev100) * 1.2) [/codeblock] The exposure value can be calculated from aperture (in f-stops), shutter speed (in seconds), and sensitivity (in ISO) as follows: [codeblock] - func get_exposure(float aperture, float shutter_speed, float sensitivity): - return log2((aperture * aperture) / shutterSpeed * (100.0 / sensitivity)) + func get_exposure(aperture: float, shutter_speed: float, sensitivity: float): + return log((aperture * aperture) / shutter_speed * (100.0 / sensitivity)) / log(2) [/codeblock] </description> </method> @@ -214,6 +214,7 @@ <param index="1" name="pos" type="Vector2" /> <param index="2" name="radius" type="float" /> <param index="3" name="color" type="Color" /> + <param index="4" name="antialiased" type="bool" default="false" /> <description> Draws a circle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_circle]. </description> @@ -280,6 +281,7 @@ <param index="1" name="points" type="PackedVector2Array" /> <param index="2" name="colors" type="PackedColorArray" /> <param index="3" name="width" type="float" default="-1.0" /> + <param index="4" name="antialiased" type="bool" default="false" /> <description> Draws a 2D multiline on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_multiline] and [method CanvasItem.draw_multiline_colors]. </description> @@ -356,6 +358,7 @@ <param index="0" name="item" type="RID" /> <param index="1" name="rect" type="Rect2" /> <param index="2" name="color" type="Color" /> + <param index="3" name="antialiased" type="bool" default="false" /> <description> Draws a rectangle on the [CanvasItem] pointed to by the [param item] [RID]. See also [method CanvasItem.draw_rect]. </description> @@ -634,7 +637,7 @@ <param index="1" name="transform" type="Transform2D" /> <description> Transforms both the current and previous stored transform for a canvas item. - This allows transforming a canvas item without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilising a shifting origin. + This allows transforming a canvas item without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin. </description> </method> <method name="canvas_light_attach_to_canvas"> @@ -730,7 +733,7 @@ <param index="1" name="transform" type="Transform2D" /> <description> Transforms both the current and previous stored transform for a light occluder. - This allows transforming an occluder without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilising a shifting origin. + This allows transforming an occluder without creating a "glitch" in the interpolation, which is particularly useful for large worlds utilizing a shifting origin. </description> </method> <method name="canvas_light_reset_physics_interpolation"> @@ -901,7 +904,7 @@ <param index="1" name="transform" type="Transform2D" /> <description> Transforms both the current and previous stored transform for a canvas light. - This allows transforming a light without creating a "glitch" in the interpolation, which is is particularly useful for large worlds utilising a shifting origin. + This allows transforming a light without creating a "glitch" in the interpolation, which is is particularly useful for large worlds utilizing a shifting origin. </description> </method> <method name="canvas_occluder_polygon_create"> @@ -1979,6 +1982,12 @@ [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. </description> </method> + <method name="is_on_render_thread"> + <return type="bool" /> + <description> + Returns [code]true[/code] if our code is currently executing on the rendering thread. + </description> + </method> <method name="light_directional_set_blend_splits"> <return type="void" /> <param index="0" name="light" type="RID" /> @@ -4030,6 +4039,15 @@ The texture to use when the VRS mode is set to [constant RenderingServer.VIEWPORT_VRS_TEXTURE]. Equivalent to [member ProjectSettings.rendering/vrs/texture]. </description> </method> + <method name="viewport_set_vrs_update_mode"> + <return type="void" /> + <param index="0" name="viewport" type="RID" /> + <param index="1" name="mode" type="int" enum="RenderingServer.ViewportVRSUpdateMode" /> + <description> + Sets the update mode for Variable Rate Shading (VRS) for the viewport. VRS requires the input texture to be converted to the format usable by the VRS method supported by the hardware. The update mode defines how often this happens. If the GPU does not support VRS, or VRS is not enabled, this property is ignored. + If set to [constant RenderingServer.VIEWPORT_VRS_UPDATE_ONCE], the input texture is copied once and the mode is changed to [constant RenderingServer.VIEWPORT_VRS_UPDATE_DISABLED]. + </description> + </method> <method name="visibility_notifier_create"> <return type="RID" /> <description> @@ -4221,6 +4239,9 @@ <constant name="MAX_2D_DIRECTIONAL_LIGHTS" value="8"> The maximum number of directional lights that can be rendered at a given time in 2D. </constant> + <constant name="MAX_MESH_SURFACES" value="256"> + The maximum number of surfaces a mesh can have. + </constant> <constant name="TEXTURE_LAYERED_2D_ARRAY" value="0" enum="TextureLayeredType"> Array of 2-dimensional textures (see [Texture2DArray]). </constant> @@ -4970,11 +4991,23 @@ Variable rate shading uses a texture. Note, for stereoscopic use a texture atlas with a texture for each view. </constant> <constant name="VIEWPORT_VRS_XR" value="2" enum="ViewportVRSMode"> - Variable rate shading texture is supplied by the primary [XRInterface]. + Variable rate shading texture is supplied by the primary [XRInterface]. Note that this may override the update mode. </constant> <constant name="VIEWPORT_VRS_MAX" value="3" enum="ViewportVRSMode"> Represents the size of the [enum ViewportVRSMode] enum. </constant> + <constant name="VIEWPORT_VRS_UPDATE_DISABLED" value="0" enum="ViewportVRSUpdateMode"> + The input texture for variable rate shading will not be processed. + </constant> + <constant name="VIEWPORT_VRS_UPDATE_ONCE" value="1" enum="ViewportVRSUpdateMode"> + The input texture for variable rate shading will be processed once. + </constant> + <constant name="VIEWPORT_VRS_UPDATE_ALWAYS" value="2" enum="ViewportVRSUpdateMode"> + The input texture for variable rate shading will be processed each frame. + </constant> + <constant name="VIEWPORT_VRS_UPDATE_MAX" value="3" enum="ViewportVRSUpdateMode"> + Represents the size of the [enum ViewportVRSUpdateMode] enum. + </constant> <constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode"> Automatically selects the appropriate process mode based on your sky shader. If your shader uses [code]TIME[/code] or [code]POSITION[/code], this will use [constant SKY_MODE_REALTIME]. If your shader uses any of the [code]LIGHT_*[/code] variables or any custom uniforms, this uses [constant SKY_MODE_INCREMENTAL]. Otherwise, this defaults to [constant SKY_MODE_QUALITY]. </constant> diff --git a/doc/classes/ResourceImporterWAV.xml b/doc/classes/ResourceImporterWAV.xml index 5336c98d0f..d3dafb03b6 100644 --- a/doc/classes/ResourceImporterWAV.xml +++ b/doc/classes/ResourceImporterWAV.xml @@ -14,6 +14,7 @@ The compression mode to use on import. [b]Disabled:[/b] Imports audio data without any compression. This results in the highest possible quality. [b]RAM (Ima-ADPCM):[/b] Performs fast lossy compression on import. Low CPU cost, but quality is noticeably decreased compared to Ogg Vorbis or even MP3. + [b]QOA ([url=https://qoaformat.org/]Quite OK Audio[/url]):[/b] Performs lossy compression on import. CPU cost is slightly higher than IMA-ADPCM, but quality is much higher. </member> <member name="edit/loop_begin" type="int" setter="" getter="" default="0"> The begin loop point to use when [member edit/loop_mode] is [b]Forward[/b], [b]Ping-Pong[/b] or [b]Backward[/b]. This is set in seconds after the beginning of the audio file. diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 885c6f0478..1961ca2b0e 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -76,7 +76,7 @@ The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted. An optional [param type_hint] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image]. The [param cache_mode] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. - Returns an empty resource if no [ResourceFormatLoader] could handle the file. + Returns an empty resource if no [ResourceFormatLoader] could handle the file, and prints an error if no file is found at the specified path. GDScript has a simplified [method @GDScript.load] built-in method which can be used in most situations, leaving the use of [ResourceLoader] for more advanced scenarios. [b]Note:[/b] If [member ProjectSettings.editor/export/convert_text_resources_to_binary] is [code]true[/code], [method @GDScript.load] will not be able to read converted files in an exported project. If you rely on run-time loading of files present within the PCK, set [member ProjectSettings.editor/export/convert_text_resources_to_binary] to [code]false[/code]. [b]Note:[/b] Relative paths will be prefixed with [code]"res://"[/code] before loading, to avoid unexpected results make sure your paths are absolute. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 01c4074e6d..f4e3c1209f 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -249,6 +249,13 @@ [/codeblock] </description> </method> + <method name="invalidate_paragraph"> + <return type="bool" /> + <param index="0" name="paragraph" type="int" /> + <description> + Invalidates [param paragraph] and all subsequent paragraphs cache. + </description> + </method> <method name="is_menu_visible" qualifiers="const"> <return type="bool" /> <description> @@ -497,9 +504,11 @@ <method name="remove_paragraph"> <return type="bool" /> <param index="0" name="paragraph" type="int" /> + <param index="1" name="no_invalidate" type="bool" default="false" /> <description> Removes a paragraph of content from the label. Returns [code]true[/code] if the paragraph exists. The [param paragraph] argument is the index of the paragraph to remove, it can take values in the interval [code][0, get_paragraph_count() - 1][/code]. + If [param no_invalidate] is set to [code]true[/code], cache for the subsequent paragraphs is not invalidated. Use it for faster updates if deleted paragraph is fully self-contained (have no unclosed tags), or this call is part of the complex edit operation and [method invalidate_paragraph] will be called at the end of operation. </description> </method> <method name="scroll_to_line"> diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml index dca4fe9276..403608355a 100644 --- a/doc/classes/ScriptEditorBase.xml +++ b/doc/classes/ScriptEditorBase.xml @@ -71,6 +71,12 @@ Emitted when the user contextual goto and the item is in the same script. </description> </signal> + <signal name="request_save_previous_state"> + <param index="0" name="line" type="int" /> + <description> + Emitted when the user changes current script or moves caret by 10 or more columns within the same script. + </description> + </signal> <signal name="search_in_files_requested"> <param index="0" name="text" type="String" /> <description> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 14d9c568d7..610550d8bd 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -41,7 +41,7 @@ <return type="int" /> <param index="0" name="name" type="String" /> <description> - Returns the bone index that matches [param name] as its name. + Returns the bone index that matches [param name] as its name. Returns [code]-1[/code] if no bone with this name exists. </description> </method> <method name="force_update_all_bone_transforms" deprecated="This method should only be called internally."> diff --git a/doc/classes/SkeletonModifier3D.xml b/doc/classes/SkeletonModifier3D.xml index fab33750ea..c0b1b6fd53 100644 --- a/doc/classes/SkeletonModifier3D.xml +++ b/doc/classes/SkeletonModifier3D.xml @@ -6,9 +6,19 @@ <description> [SkeletonModifier3D] retrieves a target [Skeleton3D] by having a [Skeleton3D] parent. If there is [AnimationMixer], modification always performs after playback process of the [AnimationMixer]. + This node should be used to implement custom IK solvers, constraints, or skeleton physics </description> <tutorials> </tutorials> + <methods> + <method name="_process_modification" qualifiers="virtual"> + <return type="void" /> + <description> + Override this virtual method to implement a custom skeleton modifier. You should do things like get the [Skeleton3D]'s current pose and apply the pose here. + [method _process_modification] must not apply [member influence] to bone poses because the [Skeleton3D] automatically applies influence to all bone poses set by the modifier. + </description> + </method> + </methods> <members> <member name="active" type="bool" setter="set_active" getter="is_active" default="true"> If [code]true[/code], the [SkeletonModifier3D] will be processing. diff --git a/doc/classes/StatusIndicator.xml b/doc/classes/StatusIndicator.xml index e1fcc35ad7..688840b17f 100644 --- a/doc/classes/StatusIndicator.xml +++ b/doc/classes/StatusIndicator.xml @@ -8,10 +8,22 @@ </description> <tutorials> </tutorials> + <methods> + <method name="get_rect" qualifiers="const"> + <return type="Rect2" /> + <description> + Returns the status indicator rectangle in screen coordinates. If this status indicator is not visible, returns an empty [Rect2]. + </description> + </method> + </methods> <members> - <member name="icon" type="Image" setter="set_icon" getter="get_icon"> + <member name="icon" type="Texture2D" setter="set_icon" getter="get_icon"> Status indicator icon. </member> + <member name="menu" type="NodePath" setter="set_menu" getter="get_menu" default="NodePath("")"> + Status indicator native popup menu. If this is set, the [signal pressed] signal is not emitted. + [b]Note:[/b] Native popup is only supported if [NativeMenu] supports [constant NativeMenu.FEATURE_POPUP_MENU] feature. + </member> <member name="tooltip" type="String" setter="set_tooltip" getter="get_tooltip" default=""""> Status indicator tooltip. </member> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index a33a1aea41..450e483f69 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -126,7 +126,7 @@ [/codeblock] </description> </method> - <method name="contains" qualifiers="const" keywords="includes, has"> + <method name="contains" qualifiers="const"> <return type="bool" /> <param index="0" name="what" type="String" /> <description> @@ -142,7 +142,15 @@ GD.Print("team".Contains("I")); // Prints false [/csharp] [/codeblocks] - If you need to know where [param what] is within the string, use [method find]. + If you need to know where [param what] is within the string, use [method find]. See also [method containsn]. + </description> + </method> + <method name="containsn" qualifiers="const"> + <return type="bool" /> + <param index="0" name="what" type="String" /> + <description> + Returns [code]true[/code] if the string contains [param what], [b]ignoring case[/b]. + If you need to know where [param what] is within the string, use [method findn]. See also [method contains]. </description> </method> <method name="count" qualifiers="const"> @@ -188,7 +196,7 @@ <return type="int" /> <param index="0" name="to" type="String" /> <description> - Like [method naturalcasecmp_to] but prioritises strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names. + Like [method naturalcasecmp_to] but prioritizes strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names. To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method filenocasecmp_to], [method naturalcasecmp_to], and [method casecmp_to]. </description> </method> @@ -196,7 +204,7 @@ <return type="int" /> <param index="0" name="to" type="String" /> <description> - Like [method naturalnocasecmp_to] but prioritises strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names. + Like [method naturalnocasecmp_to] but prioritizes strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names. To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method filecasecmp_to], [method naturalnocasecmp_to], and [method nocasecmp_to]. </description> </method> @@ -747,7 +755,7 @@ <method name="reverse" qualifiers="const"> <return type="String" /> <description> - Returns the copy of this string in reverse order. + Returns the copy of this string in reverse order. This operation works on unicode codepoints, rather than sequences of codepoints, and may break things like compound letters or emojis. </description> </method> <method name="rfind" qualifiers="const"> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index e837b65199..76586b7968 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -126,7 +126,15 @@ GD.Print("team".Contains("I")); // Prints false [/csharp] [/codeblocks] - If you need to know where [param what] is within the string, use [method find]. + If you need to know where [param what] is within the string, use [method find]. See also [method containsn]. + </description> + </method> + <method name="containsn" qualifiers="const"> + <return type="bool" /> + <param index="0" name="what" type="String" /> + <description> + Returns [code]true[/code] if the string contains [param what], [b]ignoring case[/b]. + If you need to know where [param what] is within the string, use [method findn]. See also [method contains]. </description> </method> <method name="count" qualifiers="const"> @@ -172,7 +180,7 @@ <return type="int" /> <param index="0" name="to" type="String" /> <description> - Like [method naturalcasecmp_to] but prioritises strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names. + Like [method naturalcasecmp_to] but prioritizes strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names. To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method filenocasecmp_to], [method naturalcasecmp_to], and [method casecmp_to]. </description> </method> @@ -180,7 +188,7 @@ <return type="int" /> <param index="0" name="to" type="String" /> <description> - Like [method naturalnocasecmp_to] but prioritises strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names. + Like [method naturalnocasecmp_to] but prioritizes strings that begin with periods ([code].[/code]) and underscores ([code]_[/code]) before any other character. Useful when sorting folders or file names. To get a [bool] result from a string comparison, use the [code]==[/code] operator instead. See also [method filecasecmp_to], [method naturalnocasecmp_to], and [method nocasecmp_to]. </description> </method> @@ -648,7 +656,7 @@ <method name="reverse" qualifiers="const"> <return type="String" /> <description> - Returns the copy of this string in reverse order. + Returns the copy of this string in reverse order. This operation works on unicode codepoints, rather than sequences of codepoints, and may break things like compound letters or emojis. </description> </method> <method name="rfind" qualifiers="const"> diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml index a2beef81eb..d080294c1a 100644 --- a/doc/classes/TabBar.xml +++ b/doc/classes/TabBar.xml @@ -111,6 +111,13 @@ Returns the title of the tab at index [param tab_idx]. </description> </method> + <method name="get_tab_tooltip" qualifiers="const"> + <return type="String" /> + <param index="0" name="tab_idx" type="int" /> + <description> + Returns the tooltip text of the tab at index [param tab_idx]. + </description> + </method> <method name="is_tab_disabled" qualifiers="const"> <return type="bool" /> <param index="0" name="tab_idx" type="int" /> @@ -224,6 +231,15 @@ Sets a [param title] for the tab at index [param tab_idx]. </description> </method> + <method name="set_tab_tooltip"> + <return type="void" /> + <param index="0" name="tab_idx" type="int" /> + <param index="1" name="tooltip" type="String" /> + <description> + Sets a [param tooltip] for tab at index [param tab_idx]. + [b]Note:[/b] By default, if the [param tooltip] is empty and the tab text is truncated (not all characters fit into the tab), the title will be displayed as a tooltip. To hide the tooltip, assign [code]" "[/code] as the [param tooltip] text. + </description> + </method> </methods> <members> <member name="clip_tabs" type="bool" setter="set_clip_tabs" getter="get_clip_tabs" default="true"> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index b0e3f67791..090afa0220 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -64,6 +64,13 @@ Returns the [Texture2D] for the tab at index [param tab_idx] or [code]null[/code] if the tab has no [Texture2D]. </description> </method> + <method name="get_tab_icon_max_width" qualifiers="const"> + <return type="int" /> + <param index="0" name="tab_idx" type="int" /> + <description> + Returns the maximum allowed width of the icon for the tab at index [param tab_idx]. + </description> + </method> <method name="get_tab_idx_at_point" qualifiers="const"> <return type="int" /> <param index="0" name="point" type="Vector2" /> @@ -92,6 +99,13 @@ Returns the title of the tab at index [param tab_idx]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title]. </description> </method> + <method name="get_tab_tooltip" qualifiers="const"> + <return type="String" /> + <param index="0" name="tab_idx" type="int" /> + <description> + Returns the tooltip text of the tab at index [param tab_idx]. + </description> + </method> <method name="is_tab_disabled" qualifiers="const"> <return type="bool" /> <param index="0" name="tab_idx" type="int" /> @@ -157,6 +171,14 @@ Sets an icon for the tab at index [param tab_idx]. </description> </method> + <method name="set_tab_icon_max_width"> + <return type="void" /> + <param index="0" name="tab_idx" type="int" /> + <param index="1" name="width" type="int" /> + <description> + Sets the maximum allowed width of the icon for the tab at index [param tab_idx]. This limit is applied on top of the default size of the icon and on top of [theme_item icon_max_width]. The height is adjusted according to the icon's ratio. + </description> + </method> <method name="set_tab_metadata"> <return type="void" /> <param index="0" name="tab_idx" type="int" /> @@ -173,6 +195,15 @@ Sets a custom title for the tab at index [param tab_idx] (tab titles default to the name of the indexed child node). Set it back to the child's name to make the tab default to it again. </description> </method> + <method name="set_tab_tooltip"> + <return type="void" /> + <param index="0" name="tab_idx" type="int" /> + <param index="1" name="tooltip" type="String" /> + <description> + Sets a custom tooltip text for tab at index [param tab_idx]. + [b]Note:[/b] By default, if the [param tooltip] is empty and the tab text is truncated (not all characters fit into the tab), the title will be displayed as a tooltip. To hide the tooltip, assign [code]" "[/code] as the [param tooltip] text. + </description> + </method> </methods> <members> <member name="all_tabs_in_front" type="bool" setter="set_all_tabs_in_front" getter="is_all_tabs_in_front" default="false"> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index db0c1f17b0..75cad4d08b 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -5,7 +5,7 @@ </brief_description> <description> A multiline text editor. It also has limited facilities for editing code, such as syntax highlighting support. For more advanced facilities for editing code, see [CodeEdit]. - [b]Note:[/b] Most viewport, caret and edit methods contain a [code]caret_index[/code] argument for [member caret_multiple] support. The argument should be one of the following: [code]-1[/code] for all carets, [code]0[/code] for the main caret, or greater than [code]0[/code] for secondary carets. + [b]Note:[/b] Most viewport, caret, and edit methods contain a [code]caret_index[/code] argument for [member caret_multiple] support. The argument should be one of the following: [code]-1[/code] for all carets, [code]0[/code] for the main caret, or greater than [code]0[/code] for secondary carets in the order they were created. [b]Note:[/b] When holding down [kbd]Alt[/kbd], the vertical scroll wheel will scroll 5 times as fast as it would normally do. This also works in the Godot script editor. </description> <tutorials> @@ -58,7 +58,7 @@ <method name="add_caret"> <return type="int" /> <param index="0" name="line" type="int" /> - <param index="1" name="col" type="int" /> + <param index="1" name="column" type="int" /> <description> 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> @@ -67,7 +67,7 @@ <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. + Adds an additional caret above or below every caret. If [param below] is [code]true[/code] the new caret will be added below and above otherwise. </description> </method> <method name="add_gutter"> @@ -83,7 +83,7 @@ Adds a selection and a caret for the next occurrence of the current selection. If there is no active selection, selects word under caret. </description> </method> - <method name="adjust_carets_after_edit"> + <method name="adjust_carets_after_edit" deprecated="No longer necessary since methods now adjust carets themselves."> <return type="void" /> <param index="0" name="caret" type="int" /> <param index="1" name="from_line" type="int" /> @@ -91,7 +91,7 @@ <param index="3" name="to_line" type="int" /> <param index="4" name="to_col" type="int" /> <description> - Reposition the carets affected by the edit. This assumes edits are applied in edit order, see [method get_caret_index_edit_order]. + This method does nothing. </description> </method> <method name="adjust_viewport_to_caret"> @@ -120,6 +120,23 @@ Starts a multipart edit. All edits will be treated as one action until [method end_complex_operation] is called. </description> </method> + <method name="begin_multicaret_edit"> + <return type="void" /> + <description> + Starts an edit for multiple carets. The edit must be ended with [method end_multicaret_edit]. Multicaret edits can be used to edit text at multiple carets and delay merging the carets until the end, so the caret indexes aren't affected immediately. [method begin_multicaret_edit] and [method end_multicaret_edit] can be nested, and the merge will happen at the last [method end_multicaret_edit]. + Example usage: + [codeblock] + begin_complex_operation() + begin_multicaret_edit() + for i in range(get_caret_count()): + if multicaret_edit_ignore_caret(i): + continue + # Logic here. + end_multicaret_edit() + end_complex_operation() + [/codeblock] + </description> + </method> <method name="cancel_ime"> <return type="void" /> <description> @@ -145,6 +162,20 @@ Clears the undo history. </description> </method> + <method name="collapse_carets"> + <return type="void" /> + <param index="0" name="from_line" type="int" /> + <param index="1" name="from_column" type="int" /> + <param index="2" name="to_line" type="int" /> + <param index="3" name="to_column" type="int" /> + <param index="4" name="inclusive" type="bool" default="false" /> + <description> + Collapse all carets in the given range to the [param from_line] and [param from_column] position. + [param inclusive] applies to both ends. + If [method is_in_mulitcaret_edit] is [code]true[/code], carets that are collapsed will be [code]true[/code] for [method multicaret_edit_ignore_caret]. + [method merge_overlapping_carets] will be called if any carets were collapsed. + </description> + </method> <method name="copy"> <return type="void" /> <param index="0" name="caret_index" type="int" default="-1" /> @@ -185,6 +216,12 @@ Ends a multipart edit, started with [method begin_complex_operation]. If called outside a complex operation, the current operation is pushed onto the undo/redo stack. </description> </method> + <method name="end_multicaret_edit"> + <return type="void" /> + <description> + Ends an edit for multiple carets, that was started with [method begin_multicaret_edit]. If this was the last [method end_multicaret_edit] and [method merge_overlapping_carets] was called, carets will be merged. + </description> + </method> <method name="get_caret_column" qualifiers="const"> <return type="int" /> <param index="0" name="caret_index" type="int" default="0" /> @@ -205,7 +242,7 @@ Returns the caret pixel draw position. </description> </method> - <method name="get_caret_index_edit_order"> + <method name="get_caret_index_edit_order" deprecated="Carets no longer need to be edited in any specific order. If the carets need to be sorted, use [method get_sorted_carets] instead."> <return type="PackedInt32Array" /> <description> Returns a list of caret indexes in their edit order, this done from bottom to top. Edit order refers to the way actions such as [method insert_text_at_caret] are applied. @@ -363,6 +400,15 @@ [b]Note:[/b] The return value is influenced by [theme_item line_spacing] and [theme_item font_size]. And it will not be less than [code]1[/code]. </description> </method> + <method name="get_line_ranges_from_carets" qualifiers="const"> + <return type="Vector2i[]" /> + <param index="0" name="only_selections" type="bool" default="false" /> + <param index="1" name="merge_adjacent" type="bool" default="true" /> + <description> + Returns an [Array] of line ranges where [code]x[/code] is the first line and [code]y[/code] is the last line. All lines within these ranges will have a caret on them or be part of a selection. Each line will only be part of one line range, even if it has multiple carets on it. + If a selection's end column ([method get_selection_to_column]) is at column [code]0[/code], that line will not be included. If a selection begins on the line after another selection ends and [param merge_adjacent] is [code]true[/code], or they begin and end on the same line, one line range will include both selections. + </description> + </method> <method name="get_line_width" qualifiers="const"> <return type="int" /> <param index="0" name="line" type="int" /> @@ -514,7 +560,18 @@ Returns the text inside the selection of a caret, or all the carets if [param caret_index] is its default value [code]-1[/code]. </description> </method> - <method name="get_selection_column" qualifiers="const"> + <method name="get_selection_at_line_column" qualifiers="const"> + <return type="int" /> + <param index="0" name="line" type="int" /> + <param index="1" name="column" type="int" /> + <param index="2" name="include_edges" type="bool" default="true" /> + <param index="3" name="only_selections" type="bool" default="true" /> + <description> + Returns the caret index of the selection at the given [param line] and [param column], or [code]-1[/code] if there is none. + If [param include_edges] is [code]false[/code], the position must be inside the selection and not at either end. If [param only_selections] is [code]false[/code], carets without a selection will also be considered. + </description> + </method> + <method name="get_selection_column" qualifiers="const" deprecated="Use [method get_selection_origin_column] instead."> <return type="int" /> <param index="0" name="caret_index" type="int" default="0" /> <description> @@ -525,17 +582,17 @@ <return type="int" /> <param index="0" name="caret_index" type="int" default="0" /> <description> - Returns the selection begin column. + Returns the selection begin column. Returns the caret column if there is no selection. </description> </method> <method name="get_selection_from_line" qualifiers="const"> <return type="int" /> <param index="0" name="caret_index" type="int" default="0" /> <description> - Returns the selection begin line. + Returns the selection begin line. Returns the caret line if there is no selection. </description> </method> - <method name="get_selection_line" qualifiers="const"> + <method name="get_selection_line" qualifiers="const" deprecated="Use [method get_selection_origin_line] instead."> <return type="int" /> <param index="0" name="caret_index" type="int" default="0" /> <description> @@ -548,18 +605,40 @@ Returns the current selection mode. </description> </method> + <method name="get_selection_origin_column" qualifiers="const"> + <return type="int" /> + <param index="0" name="caret_index" type="int" default="0" /> + <description> + Returns the origin column of the selection. This is the opposite end from the caret. + </description> + </method> + <method name="get_selection_origin_line" qualifiers="const"> + <return type="int" /> + <param index="0" name="caret_index" type="int" default="0" /> + <description> + Returns the origin line of the selection. This is the opposite end from the caret. + </description> + </method> <method name="get_selection_to_column" qualifiers="const"> <return type="int" /> <param index="0" name="caret_index" type="int" default="0" /> <description> - Returns the selection end column. + Returns the selection end column. Returns the caret column if there is no selection. </description> </method> <method name="get_selection_to_line" qualifiers="const"> <return type="int" /> <param index="0" name="caret_index" type="int" default="0" /> <description> - Returns the selection end line. + Returns the selection end line. Returns the caret line if there is no selection. + </description> + </method> + <method name="get_sorted_carets" qualifiers="const"> + <return type="PackedInt32Array" /> + <param index="0" name="include_ignored_carets" type="bool" default="false" /> + <description> + Returns the carets sorted by selection beginning from lowest line and column to highest (from top to bottom of text). + If [param include_ignored_carets] is [code]false[/code], carets from [method multicaret_edit_ignore_caret] will be ignored. </description> </method> <method name="get_tab_size" qualifiers="const"> @@ -653,6 +732,19 @@ Inserts a new line with [param text] at [param line]. </description> </method> + <method name="insert_text"> + <return type="void" /> + <param index="0" name="text" type="String" /> + <param index="1" name="line" type="int" /> + <param index="2" name="column" type="int" /> + <param index="3" name="before_selection_begin" type="bool" default="true" /> + <param index="4" name="before_selection_end" type="bool" default="false" /> + <description> + Inserts the [param text] at [param line] and [param column]. + If [param before_selection_begin] is [code]true[/code], carets and selections that begin at [param line] and [param column] will moved to the end of the inserted text, along with all carets after it. + If [param before_selection_end] is [code]true[/code], selections that end at [param line] and [param column] will be extended to the end of the inserted text. These parameters can be used to insert text inside of or outside of selections. + </description> + </method> <method name="insert_text_at_caret"> <return type="void" /> <param index="0" name="text" type="String" /> @@ -661,6 +753,13 @@ Insert the specified text at the caret position. </description> </method> + <method name="is_caret_after_selection_origin" qualifiers="const"> + <return type="bool" /> + <param index="0" name="caret_index" type="int" default="0" /> + <description> + Returns [code]true[/code] if the caret of the selection is after the selection origin. This can be used to determine the direction of the selection. + </description> + </method> <method name="is_caret_visible" qualifiers="const"> <return type="bool" /> <param index="0" name="caret_index" type="int" default="0" /> @@ -671,7 +770,7 @@ <method name="is_dragging_cursor" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if the user is dragging their mouse for scrolling or selecting. + Returns [code]true[/code] if the user is dragging their mouse for scrolling, selecting, or text dragging. </description> </method> <method name="is_gutter_clickable" qualifiers="const"> @@ -695,6 +794,12 @@ Returns whether the gutter is overwritable. </description> </method> + <method name="is_in_mulitcaret_edit" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if a [method begin_multicaret_edit] has been called and [method end_multicaret_edit] has not yet been called. + </description> + </method> <method name="is_line_gutter_clickable" qualifiers="const"> <return type="bool" /> <param index="0" name="line" type="int" /> @@ -749,9 +854,18 @@ <return type="void" /> <description> Merges any overlapping carets. Will favor the newest caret, or the caret with a selection. + If [method is_in_mulitcaret_edit] is [code]true[/code], the merge will be queued to happen at the end of the multicaret edit. See [method begin_multicaret_edit] and [method end_multicaret_edit]. [b]Note:[/b] This is not called when a caret changes position but after certain actions, so it is possible to get into a state where carets overlap. </description> </method> + <method name="multicaret_edit_ignore_caret" qualifiers="const"> + <return type="bool" /> + <param index="0" name="caret_index" type="int" /> + <description> + Returns [code]true[/code] if the given [param caret_index] should be ignored as part of a multicaret edit. See [method begin_multicaret_edit] and [method end_multicaret_edit]. Carets that should be ignored are ones that were part of removed text and will likely be merged at the end of the edit, or carets that were added during the edit. + It is recommended to [code]continue[/code] within a loop iterating on multiple carets if a caret should be ignored. + </description> + </method> <method name="paste"> <return type="void" /> <param index="0" name="caret_index" type="int" default="-1" /> @@ -787,6 +901,15 @@ Removes the gutter from this [TextEdit]. </description> </method> + <method name="remove_line_at"> + <return type="void" /> + <param index="0" name="line" type="int" /> + <param index="1" name="move_carets_down" type="bool" default="true" /> + <description> + Removes the line of text at [param line]. Carets on this line will attempt to match their previous visual x position. + If [param move_carets_down] is [code]true[/code] carets will move to the next line down, otherwise carets will move up. + </description> + </method> <method name="remove_secondary_carets"> <return type="void" /> <description> @@ -801,7 +924,6 @@ <param index="3" name="to_column" type="int" /> <description> Removes text between the given positions. - [b]Note:[/b] This does not adjust the caret or selection, which as a result it can end up in an invalid position. </description> </method> <method name="search" qualifiers="const"> @@ -809,7 +931,7 @@ <param index="0" name="text" type="String" /> <param index="1" name="flags" type="int" /> <param index="2" name="from_line" type="int" /> - <param index="3" name="from_colum" type="int" /> + <param index="3" name="from_column" type="int" /> <description> Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If no results are found, both are equal to [code]-1[/code]. @@ -835,14 +957,15 @@ </method> <method name="select"> <return type="void" /> - <param index="0" name="from_line" type="int" /> - <param index="1" name="from_column" type="int" /> - <param index="2" name="to_line" type="int" /> - <param index="3" name="to_column" type="int" /> + <param index="0" name="origin_line" type="int" /> + <param index="1" name="origin_column" type="int" /> + <param index="2" name="caret_line" type="int" /> + <param index="3" name="caret_column" type="int" /> <param index="4" name="caret_index" type="int" default="0" /> <description> - Perform selection, from line/column to line/column. + Selects text from [param origin_line] and [param origin_column] to [param caret_line] and [param caret_column] for the given [param caret_index]. This moves the selection origin and the caret. If the positions are the same, the selection will be deselected. If [member selecting_enabled] is [code]false[/code], no selection will occur. + [b]Note:[/b] If supporting multiple carets this will not check for any overlap. See [method merge_overlapping_carets]. </description> </method> <method name="select_all"> @@ -878,9 +1001,10 @@ <param index="3" name="wrap_index" type="int" default="0" /> <param index="4" name="caret_index" type="int" default="0" /> <description> - Moves the caret to the specified [param line] index. + Moves the caret to the specified [param line] index. The caret column will be moved to the same visual position it was at the last time [method set_caret_column] was called, or clamped to the end of the line. If [param adjust_viewport] is [code]true[/code], the viewport will center at the caret position after the move occurs. If [param can_be_hidden] is [code]true[/code], the specified [param line] can be hidden. + If [param wrap_index] is [code]-1[/code], the caret column will be clamped to the [param line]'s length. If [param wrap_index] is greater than [code]-1[/code], the column will be moved to attempt to match the visual x position on the line's [param wrap_index] to the position from the last time [method set_caret_column] was called. [b]Note:[/b] If supporting multiple carets this will not check for any overlap. See [method merge_overlapping_carets]. </description> </method> @@ -945,7 +1069,8 @@ <param index="0" name="line" type="int" /> <param index="1" name="new_text" type="String" /> <description> - Sets the text for a specific line. + Sets the text for a specific [param line]. + Carets on the line will attempt to keep their visual x position. </description> </method> <method name="set_line_as_center_visible"> @@ -1049,13 +1174,30 @@ <method name="set_selection_mode"> <return type="void" /> <param index="0" name="mode" type="int" enum="TextEdit.SelectionMode" /> - <param index="1" name="line" type="int" default="-1" /> - <param index="2" name="column" type="int" default="-1" /> - <param index="3" name="caret_index" type="int" default="0" /> <description> Sets the current selection mode. </description> </method> + <method name="set_selection_origin_column"> + <return type="void" /> + <param index="0" name="column" type="int" /> + <param index="1" name="caret_index" type="int" default="0" /> + <description> + Sets the selection origin column to the [param column] for the given [param caret_index]. If the selection origin is moved to the caret position, the selection will deselect. + </description> + </method> + <method name="set_selection_origin_line"> + <return type="void" /> + <param index="0" name="line" type="int" /> + <param index="1" name="can_be_hidden" type="bool" default="true" /> + <param index="2" name="wrap_index" type="int" default="-1" /> + <param index="3" name="caret_index" type="int" default="0" /> + <description> + Sets the selection origin line to the [param line] for the given [param caret_index]. If the selection origin is moved to the caret position, the selection will deselect. + If [param can_be_hidden] is [code]false[/code], The line will be set to the nearest unhidden line below or above. + If [param wrap_index] is [code]-1[/code], the selection origin column will be clamped to the [param line]'s length. If [param wrap_index] is greater than [code]-1[/code], the column will be moved to attempt to match the visual x position on the line's [param wrap_index] to the position from the last time [method set_selection_origin_column] or [method select] was called. + </description> + </method> <method name="set_tab_size"> <return type="void" /> <param index="0" name="size" type="int" /> @@ -1089,7 +1231,7 @@ <param index="0" name="from_line" type="int" /> <param index="1" name="to_line" type="int" /> <description> - Swaps the two lines. + Swaps the two lines. Carets will be swapped with the lines. </description> </method> <method name="tag_saved_version"> @@ -1140,7 +1282,7 @@ If [code]true[/code], the selected text will be deselected when focus is lost. </member> <member name="drag_and_drop_selection_enabled" type="bool" setter="set_drag_and_drop_selection_enabled" getter="is_drag_and_drop_selection_enabled" default="true"> - If [code]true[/code], allow drag and drop of selected text. + If [code]true[/code], allow drag and drop of selected text. Text can still be dropped from other sources. </member> <member name="draw_control_chars" type="bool" setter="set_draw_control_chars" getter="get_draw_control_chars" default="false"> If [code]true[/code], control characters are displayed. @@ -1172,7 +1314,7 @@ [b]Note:[/b] This method is only implemented on Linux. </member> <member name="minimap_draw" type="bool" setter="set_draw_minimap" getter="is_drawing_minimap" default="false"> - If [code]true[/code], a minimap is shown, providing an outline of your source code. + If [code]true[/code], a minimap is shown, providing an outline of your source code. The minimap uses a fixed-width text size. </member> <member name="minimap_width" type="int" setter="set_minimap_width" getter="get_minimap_width" default="80"> The width, in pixels, of the minimap. @@ -1231,7 +1373,7 @@ <signals> <signal name="caret_changed"> <description> - Emitted when the caret changes position. + Emitted when any caret changes position. </description> </signal> <signal name="gutter_added"> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index c30e83a85d..34137a18ef 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -5,6 +5,16 @@ </brief_description> <description> [TextServer] is the API backend for managing fonts and rendering text. + [b]Note:[/b] This is a low-level API, consider using [TextLine], [TextParagraph], and [Font] classes instead. + This is an abstract class, so to get the currently active [TextServer] instance, use the following code: + [codeblocks] + [gdscript] + var ts = TextServerManager.get_primary_interface() + [/gdscript] + [csharp] + var ts = TextServerManager.GetPrimaryInterface(); + [/csharp] + [/codeblocks] </description> <tutorials> </tutorials> @@ -1103,6 +1113,13 @@ - May contain Unicode characters of class XID_Continue in the other positions. </description> </method> + <method name="is_valid_letter" qualifiers="const"> + <return type="bool" /> + <param index="0" name="unicode" type="int" /> + <description> + Returns [code]true[/code] if the given code point is a valid letter, i.e. it belongs to the Unicode category "L". + </description> + </method> <method name="load_support_data"> <return type="bool" /> <param index="0" name="filename" type="String" /> diff --git a/doc/classes/TextServerExtension.xml b/doc/classes/TextServerExtension.xml index 94fd69c863..c148cdad52 100644 --- a/doc/classes/TextServerExtension.xml +++ b/doc/classes/TextServerExtension.xml @@ -1217,6 +1217,12 @@ Returns [code]true[/code] if [param string] is a valid identifier. </description> </method> + <method name="_is_valid_letter" qualifiers="virtual const"> + <return type="bool" /> + <param index="0" name="unicode" type="int" /> + <description> + </description> + </method> <method name="_load_support_data" qualifiers="virtual"> <return type="bool" /> <param index="0" name="filename" type="String" /> diff --git a/doc/classes/TileMapLayer.xml b/doc/classes/TileMapLayer.xml index 0513a7934c..1bff6d911b 100644 --- a/doc/classes/TileMapLayer.xml +++ b/doc/classes/TileMapLayer.xml @@ -97,7 +97,7 @@ <method name="get_navigation_map" qualifiers="const"> <return type="RID" /> <description> - Returns the [RID] of the [NavigationServer2D] navigation used by this [TileMapLayer]. + Returns the [RID] of the [NavigationServer2D] navigation used by this [TileMapLayer]. By default this returns the default [World2D] navigation map, unless a custom map was provided using [method set_navigation_map]. </description> </method> diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml index 6f212274f8..a34ca0ce91 100644 --- a/doc/classes/TileSetAtlasSource.xml +++ b/doc/classes/TileSetAtlasSource.xml @@ -295,6 +295,15 @@ # If tile is not already flipped, flip it. $TileMap.set_cell(0, Vector2i(2, 2), source_id, atlas_coords, alternate_id | TileSetAtlasSource.TRANSFORM_FLIP_H) [/codeblock] + [b]Note:[/b] These transformations can be combined to do the equivalent of 0, 90, 180, and 270 degree rotations, as shown below: + [codeblock] + enum TileTransform { + ROTATE_0 = 0, + ROTATE_90 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_H, + ROTATE_180 = TileSetAtlasSource.TRANSFORM_FLIP_H | TileSetAtlasSource.TRANSFORM_FLIP_V, + ROTATE_270 = TileSetAtlasSource.TRANSFORM_TRANSPOSE | TileSetAtlasSource.TRANSFORM_FLIP_V, + } + [/codeblock] </constant> <constant name="TRANSFORM_FLIP_V" value="8192"> Represents cell's vertical flip flag. See [constant TRANSFORM_FLIP_H] for usage. diff --git a/doc/classes/Time.xml b/doc/classes/Time.xml index 2948d20fbb..bf002ec6e2 100644 --- a/doc/classes/Time.xml +++ b/doc/classes/Time.xml @@ -152,7 +152,7 @@ <method name="get_time_zone_from_system" qualifiers="const"> <return type="Dictionary" /> <description> - Returns the current time zone as a dictionary of keys: [code]bias[/code] and [code]name[/code]. + Returns the current time zone as a dictionary of keys: [code]bias[/code] and [code]name[/code]. - [code]bias[/code] is the offset from UTC in minutes, since not all time zones are multiples of an hour from UTC. - [code]name[/code] is the localized name of the time zone, according to the OS locale settings of the current user. </description> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index d95492479c..b0cb25fafd 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -546,16 +546,16 @@ The maximum allowed width of the icon in item's cells. This limit is applied on top of the default size of the icon, but before the value set with [method TreeItem.set_icon_max_width]. The height is adjusted according to the icon's ratio. </theme_item> <theme_item name="inner_item_margin_bottom" data_type="constant" type="int" default="0"> - The inner bottom margin of an item. + The inner bottom margin of a cell. </theme_item> <theme_item name="inner_item_margin_left" data_type="constant" type="int" default="0"> - The inner left margin of an item. + The inner left margin of a cell. </theme_item> <theme_item name="inner_item_margin_right" data_type="constant" type="int" default="0"> - The inner right margin of an item. + The inner right margin of a cell. </theme_item> <theme_item name="inner_item_margin_top" data_type="constant" type="int" default="0"> - The inner top margin of an item. + The inner top margin of a cell. </theme_item> <theme_item name="item_margin" data_type="constant" type="int" default="16"> The horizontal margin at the start of an item. This is used when folding is enabled for the item. @@ -655,13 +655,13 @@ [StyleBox] used for the cursor, when the [Tree] is not being focused. </theme_item> <theme_item name="custom_button" data_type="style" type="StyleBox"> - Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell. + Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when button is enabled with [method TreeItem.set_custom_as_button]. </theme_item> <theme_item name="custom_button_hover" data_type="style" type="StyleBox"> - [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. + [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode button cell when it's hovered. </theme_item> <theme_item name="custom_button_pressed" data_type="style" type="StyleBox"> - [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed. + [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode button cell when it's pressed. </theme_item> <theme_item name="focus" data_type="style" type="StyleBox"> The focused style for the [Tree], drawn on top of everything. diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index c679838ec5..78a703c213 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -318,12 +318,14 @@ <return type="int" enum="TextServer.StructuredTextParser" /> <param index="0" name="column" type="int" /> <description> + Returns the BiDi algorithm override set for this cell. </description> </method> <method name="get_structured_text_bidi_override_options" qualifiers="const"> <return type="Array" /> <param index="0" name="column" type="int" /> <description> + Returns the additional BiDi options set for this cell. </description> </method> <method name="get_suffix" qualifiers="const"> @@ -401,6 +403,7 @@ <return type="bool" /> <param index="0" name="column" type="int" /> <description> + Returns [code]true[/code] if the cell was made into a button with [method set_custom_as_button]. </description> </method> <method name="is_edit_multiline" qualifiers="const"> @@ -532,7 +535,7 @@ <param index="0" name="column" type="int" /> <param index="1" name="mode" type="int" enum="TreeItem.TreeCellMode" /> <description> - Sets the given column's cell mode to [param mode]. See [enum TreeCellMode] constants. + Sets the given column's cell mode to [param mode]. This determines how the cell is displayed and edited. See [enum TreeCellMode] constants for details. </description> </method> <method name="set_checked"> @@ -555,6 +558,7 @@ <param index="0" name="column" type="int" /> <param index="1" name="enable" type="bool" /> <description> + Makes a cell with [constant CELL_MODE_CUSTOM] display as a non-flat button with a [StyleBox]. </description> </method> <method name="set_custom_bg_color"> @@ -589,7 +593,7 @@ <param index="0" name="column" type="int" /> <param index="1" name="callback" type="Callable" /> <description> - Sets the given column's custom draw callback. Use an empty [Callable] ([code skip-lint]Callable()[/code]) to clear the custom callback. + Sets the given column's custom draw callback. Use an empty [Callable] ([code skip-lint]Callable()[/code]) to clear the custom callback. The cell has to be in [constant CELL_MODE_CUSTOM] to use this feature. The [param callback] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2]. </description> </method> @@ -639,7 +643,7 @@ <param index="0" name="column" type="int" /> <param index="1" name="texture" type="Texture2D" /> <description> - Sets the given column's icon [Texture2D]. + Sets the given cell's icon [Texture2D]. The cell has to be in [constant CELL_MODE_ICON] mode. </description> </method> <method name="set_icon_max_width"> @@ -724,6 +728,7 @@ <param index="0" name="column" type="int" /> <param index="1" name="parser" type="int" enum="TextServer.StructuredTextParser" /> <description> + Set BiDi algorithm override for the structured text. Has effect for cells that display text. </description> </method> <method name="set_structured_text_bidi_override_options"> @@ -731,6 +736,7 @@ <param index="0" name="column" type="int" /> <param index="1" name="args" type="Array" /> <description> + Set additional options for BiDi override. Has effect for cells that display text. </description> </method> <method name="set_suffix"> @@ -805,18 +811,21 @@ </members> <constants> <constant name="CELL_MODE_STRING" value="0" enum="TreeCellMode"> - Cell contains a string. + Cell shows a string label. When editable, the text can be edited using a [LineEdit], or a [TextEdit] popup if [method set_edit_multiline] is used. </constant> <constant name="CELL_MODE_CHECK" value="1" enum="TreeCellMode"> - Cell contains a checkbox. + Cell shows a checkbox, optionally with text. The checkbox can be pressed, released, or indeterminate (via [method set_indeterminate]). The checkbox can't be clicked unless the cell is editable. </constant> <constant name="CELL_MODE_RANGE" value="2" enum="TreeCellMode"> - Cell contains a range. + Cell shows a numeric range. When editable, it can be edited using a range slider. Use [method set_range] to set the value and [method set_range_config] to configure the range. + This cell can also be used in a text dropdown mode when you assign a text with [method set_text]. Separate options with a comma, e.g. [code]"Option1,Option2,Option3"[/code]. </constant> <constant name="CELL_MODE_ICON" value="3" enum="TreeCellMode"> - Cell contains an icon. + Cell shows an icon. It can't be edited nor display text. </constant> <constant name="CELL_MODE_CUSTOM" value="4" enum="TreeCellMode"> + Cell shows as a clickable button. It will display an arrow similar to [OptionButton], but doesn't feature a dropdown (for that you can use [constant CELL_MODE_RANGE]). Clicking the button emits the [signal Tree.item_edited] signal. The button is flat by default, you can use [method set_custom_as_button] to display it with a [StyleBox]. + This mode also supports custom drawing using [method set_custom_draw_callback]. </constant> </constants> </class> diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml index eb837a4643..b420933285 100644 --- a/doc/classes/Variant.xml +++ b/doc/classes/Variant.xml @@ -42,8 +42,8 @@ # Note that Objects are their own special category. # To get the name of the underlying Object type, you need the `get_class()` method. print("foo is a(n) %s" % foo.get_class()) # inject the class name into a formatted string. - # Note also that there is not yet any way to get a script's `class_name` string easily. - # To fetch that value, you can use ProjectSettings.get_global_class_list(). + # Note that this does not get the script's `class_name` global identifier. + # If the `class_name` is needed, use `foo.get_script().get_global_name()` instead. [/gdscript] [csharp] Variant foo = 2; diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 7b166a4fb0..5fadfd0d95 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -128,6 +128,14 @@ Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component. </description> </method> + <method name="clampf" qualifiers="const"> + <return type="Vector2" /> + <param index="0" name="min" type="float" /> + <param index="1" name="max" type="float" /> + <description> + Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component. + </description> + </method> <method name="cross" qualifiers="const"> <return type="float" /> <param index="0" name="with" type="Vector2" /> @@ -265,18 +273,46 @@ Returns the vector with a maximum length by limiting its length to [param length]. </description> </method> + <method name="max" qualifiers="const"> + <return type="Vector2" /> + <param index="0" name="with" type="Vector2" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector2(maxf(x, with.x), maxf(y, with.y))[/code]. + </description> + </method> <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> + <method name="maxf" qualifiers="const"> + <return type="Vector2" /> + <param index="0" name="with" type="float" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector2(maxf(x, with), maxf(y, with))[/code]. + </description> + </method> + <method name="min" qualifiers="const"> + <return type="Vector2" /> + <param index="0" name="with" type="Vector2" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector2(minf(x, with.x), minf(y, with.y))[/code]. + </description> + </method> <method name="min_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Y]. </description> </method> + <method name="minf" qualifiers="const"> + <return type="Vector2" /> + <param index="0" name="with" type="float" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector2(minf(x, with), minf(y, with))[/code]. + </description> + </method> <method name="move_toward" qualifiers="const"> <return type="Vector2" /> <param index="0" name="to" type="Vector2" /> @@ -371,6 +407,13 @@ Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals. </description> </method> + <method name="snappedf" qualifiers="const"> + <return type="Vector2" /> + <param index="0" name="step" type="float" /> + <description> + Returns a new vector with each component snapped to the nearest multiple of [param step]. This can also be used to round the components to an arbitrary number of decimals. + </description> + </method> </methods> <members> <member name="x" type="float" setter="" getter="" default="0.0"> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 18291e06a9..4afc62e038 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -64,6 +64,14 @@ Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component. </description> </method> + <method name="clampi" qualifiers="const"> + <return type="Vector2i" /> + <param index="0" name="min" type="int" /> + <param index="1" name="max" type="int" /> + <description> + Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component. + </description> + </method> <method name="distance_squared_to" qualifiers="const"> <return type="int" /> <param index="0" name="to" type="Vector2i" /> @@ -92,18 +100,46 @@ This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> + <method name="max" qualifiers="const"> + <return type="Vector2i" /> + <param index="0" name="with" type="Vector2i" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector2i(maxi(x, with.x), maxi(y, with.y))[/code]. + </description> + </method> <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> + <method name="maxi" qualifiers="const"> + <return type="Vector2i" /> + <param index="0" name="with" type="int" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector2i(maxi(x, with), maxi(y, with))[/code]. + </description> + </method> + <method name="min" qualifiers="const"> + <return type="Vector2i" /> + <param index="0" name="with" type="Vector2i" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector2i(mini(x, with.x), mini(y, with.y))[/code]. + </description> + </method> <method name="min_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Y]. </description> </method> + <method name="mini" qualifiers="const"> + <return type="Vector2i" /> + <param index="0" name="with" type="int" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector2i(mini(x, with), mini(y, with))[/code]. + </description> + </method> <method name="sign" qualifiers="const"> <return type="Vector2i" /> <description> @@ -117,6 +153,13 @@ Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step]. </description> </method> + <method name="snappedi" qualifiers="const"> + <return type="Vector2i" /> + <param index="0" name="step" type="int" /> + <description> + Returns a new vector with each component snapped to the closest multiple of [param step]. + </description> + </method> </methods> <members> <member name="x" type="int" setter="" getter="" default="0"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 031d91af78..387359a97f 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -104,6 +104,14 @@ Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component. </description> </method> + <method name="clampf" qualifiers="const"> + <return type="Vector3" /> + <param index="0" name="min" type="float" /> + <param index="1" name="max" type="float" /> + <description> + Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component. + </description> + </method> <method name="cross" qualifiers="const"> <return type="Vector3" /> <param index="0" name="with" type="Vector3" /> @@ -234,18 +242,46 @@ Returns the vector with a maximum length by limiting its length to [param length]. </description> </method> + <method name="max" qualifiers="const"> + <return type="Vector3" /> + <param index="0" name="with" type="Vector3" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector3(maxf(x, with.x), maxf(y, with.y), maxf(z, with.z))[/code]. + </description> + </method> <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> + <method name="maxf" qualifiers="const"> + <return type="Vector3" /> + <param index="0" name="with" type="float" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector3(maxf(x, with), maxf(y, with), maxf(z, with))[/code]. + </description> + </method> + <method name="min" qualifiers="const"> + <return type="Vector3" /> + <param index="0" name="with" type="Vector3" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector3(minf(x, with.x), minf(y, with.y), minf(z, with.z))[/code]. + </description> + </method> <method name="min_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. </description> </method> + <method name="minf" qualifiers="const"> + <return type="Vector3" /> + <param index="0" name="with" type="float" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector3(minf(x, with), minf(y, with), minf(z, with))[/code]. + </description> + </method> <method name="move_toward" qualifiers="const"> <return type="Vector3" /> <param index="0" name="to" type="Vector3" /> @@ -307,10 +343,10 @@ </method> <method name="reflect" qualifiers="const"> <return type="Vector3" /> - <param index="0" name="direction" type="Vector3" /> + <param index="0" name="n" type="Vector3" /> <description> - Returns the result of reflecting the vector from a plane defined by the given direction vector [param direction]. - [b]Note:[/b] [method reflect] differs from what other engines and frameworks call [code skip-lint]reflect()[/code]. In other engines, [code skip-lint]reflect()[/code] takes a normal direction which is a direction perpendicular to the plane. In Godot, you specify a direction parallel to the plane. See also [method bounce] which does what most engines call [code skip-lint]reflect()[/code]. + Returns the result of reflecting the vector through a plane defined by the given normal vector [param n]. + [b]Note:[/b] [method reflect] differs from what other engines and frameworks call [code skip-lint]reflect()[/code]. In other engines, [code skip-lint]reflect()[/code] returns the result of the vector reflected by the given plane. The reflection thus passes through the given normal. While in Godot the reflection passes through the plane and can be thought of as bouncing off the normal. See also [method bounce] which does what most engines call [code skip-lint]reflect()[/code]. </description> </method> <method name="rotated" qualifiers="const"> @@ -365,6 +401,13 @@ Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals. </description> </method> + <method name="snappedf" qualifiers="const"> + <return type="Vector3" /> + <param index="0" name="step" type="float" /> + <description> + Returns a new vector with each component snapped to the nearest multiple of [param step]. This can also be used to round the components to an arbitrary number of decimals. + </description> + </method> </methods> <members> <member name="x" type="float" setter="" getter="" default="0.0"> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index ffebd3e1f3..df4624dbb1 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -59,6 +59,14 @@ Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component. </description> </method> + <method name="clampi" qualifiers="const"> + <return type="Vector3i" /> + <param index="0" name="min" type="int" /> + <param index="1" name="max" type="int" /> + <description> + Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component. + </description> + </method> <method name="distance_squared_to" qualifiers="const"> <return type="int" /> <param index="0" name="to" type="Vector3i" /> @@ -87,18 +95,46 @@ This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> + <method name="max" qualifiers="const"> + <return type="Vector3i" /> + <param index="0" name="with" type="Vector3i" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector3i(maxi(x, with.x), maxi(y, with.y), maxi(z, with.z))[/code]. + </description> + </method> <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> + <method name="maxi" qualifiers="const"> + <return type="Vector3i" /> + <param index="0" name="with" type="int" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector3i(maxi(x, with), maxi(y, with), maxi(z, with))[/code]. + </description> + </method> + <method name="min" qualifiers="const"> + <return type="Vector3i" /> + <param index="0" name="with" type="Vector3i" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector3i(mini(x, with.x), mini(y, with.y), mini(z, with.z))[/code]. + </description> + </method> <method name="min_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. </description> </method> + <method name="mini" qualifiers="const"> + <return type="Vector3i" /> + <param index="0" name="with" type="int" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector3i(mini(x, with), mini(y, with), mini(z, with))[/code]. + </description> + </method> <method name="sign" qualifiers="const"> <return type="Vector3i" /> <description> @@ -112,6 +148,13 @@ Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step]. </description> </method> + <method name="snappedi" qualifiers="const"> + <return type="Vector3i" /> + <param index="0" name="step" type="int" /> + <description> + Returns a new vector with each component snapped to the closest multiple of [param step]. + </description> + </method> </methods> <members> <member name="x" type="int" setter="" getter="" default="0"> diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml index b31cdb01c9..87af370462 100644 --- a/doc/classes/Vector4.xml +++ b/doc/classes/Vector4.xml @@ -64,6 +64,14 @@ Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component. </description> </method> + <method name="clampf" qualifiers="const"> + <return type="Vector4" /> + <param index="0" name="min" type="float" /> + <param index="1" name="max" type="float" /> + <description> + Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component. + </description> + </method> <method name="cubic_interpolate" qualifiers="const"> <return type="Vector4" /> <param index="0" name="b" type="Vector4" /> @@ -176,18 +184,46 @@ Returns the result of the linear interpolation between this vector and [param to] by amount [param weight]. [param weight] is on the range of [code]0.0[/code] to [code]1.0[/code], representing the amount of interpolation. </description> </method> + <method name="max" qualifiers="const"> + <return type="Vector4" /> + <param index="0" name="with" type="Vector4" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4(maxf(x, with.x), maxf(y, with.y), maxf(z, with.z), maxf(w, with.w))[/code]. + </description> + </method> <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> + <method name="maxf" qualifiers="const"> + <return type="Vector4" /> + <param index="0" name="with" type="float" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4(maxf(x, with), maxf(y, with), maxf(z, with), maxf(w, with))[/code]. + </description> + </method> + <method name="min" qualifiers="const"> + <return type="Vector4" /> + <param index="0" name="with" type="Vector4" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4(minf(x, with.x), minf(y, with.y), minf(z, with.z), minf(w, with.w))[/code]. + </description> + </method> <method name="min_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_W]. </description> </method> + <method name="minf" qualifiers="const"> + <return type="Vector4" /> + <param index="0" name="with" type="float" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4(minf(x, with), minf(y, with), minf(z, with), minf(w, with))[/code]. + </description> + </method> <method name="normalized" qualifiers="const"> <return type="Vector4" /> <description> @@ -228,6 +264,13 @@ Returns a new vector with each component snapped to the nearest multiple of the corresponding component in [param step]. This can also be used to round the components to an arbitrary number of decimals. </description> </method> + <method name="snappedf" qualifiers="const"> + <return type="Vector4" /> + <param index="0" name="step" type="float" /> + <description> + Returns a new vector with each component snapped to the nearest multiple of [param step]. This can also be used to round the components to an arbitrary number of decimals. + </description> + </method> </methods> <members> <member name="w" type="float" setter="" getter="" default="0.0"> diff --git a/doc/classes/Vector4i.xml b/doc/classes/Vector4i.xml index f8a0026066..8f54b767e0 100644 --- a/doc/classes/Vector4i.xml +++ b/doc/classes/Vector4i.xml @@ -57,6 +57,14 @@ Returns a new vector with all components clamped between the components of [param min] and [param max], by running [method @GlobalScope.clamp] on each component. </description> </method> + <method name="clampi" qualifiers="const"> + <return type="Vector4i" /> + <param index="0" name="min" type="int" /> + <param index="1" name="max" type="int" /> + <description> + Returns a new vector with all components clamped between [param min] and [param max], by running [method @GlobalScope.clamp] on each component. + </description> + </method> <method name="distance_squared_to" qualifiers="const"> <return type="int" /> <param index="0" name="to" type="Vector4i" /> @@ -85,18 +93,46 @@ This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> + <method name="max" qualifiers="const"> + <return type="Vector4i" /> + <param index="0" name="with" type="Vector4i" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4i(maxi(x, with.x), maxi(y, with.y), maxi(z, with.z), maxi(w, with.w))[/code]. + </description> + </method> <method name="max_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's highest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> + <method name="maxi" qualifiers="const"> + <return type="Vector4i" /> + <param index="0" name="with" type="int" /> + <description> + Returns the component-wise maximum of this and [param with], equivalent to [code]Vector4i(maxi(x, with), maxi(y, with), maxi(z, with), maxi(w, with))[/code]. + </description> + </method> + <method name="min" qualifiers="const"> + <return type="Vector4i" /> + <param index="0" name="with" type="Vector4i" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4i(mini(x, with.x), mini(y, with.y), mini(z, with.z), mini(w, with.w))[/code]. + </description> + </method> <method name="min_axis_index" qualifiers="const"> <return type="int" /> <description> Returns the axis of the vector's lowest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_W]. </description> </method> + <method name="mini" qualifiers="const"> + <return type="Vector4i" /> + <param index="0" name="with" type="int" /> + <description> + Returns the component-wise minimum of this and [param with], equivalent to [code]Vector4i(mini(x, with), mini(y, with), mini(z, with), mini(w, with))[/code]. + </description> + </method> <method name="sign" qualifiers="const"> <return type="Vector4i" /> <description> @@ -110,6 +146,13 @@ Returns a new vector with each component snapped to the closest multiple of the corresponding component in [param step]. </description> </method> + <method name="snappedi" qualifiers="const"> + <return type="Vector4i" /> + <param index="0" name="step" type="int" /> + <description> + Returns a new vector with each component snapped to the closest multiple of [param step]. + </description> + </method> </methods> <members> <member name="w" type="int" setter="" getter="" default="0"> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index cf33eac9c7..b288ee7ff6 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -407,6 +407,9 @@ - 8×8 = rgb(255, 255, 0) - #ffff00 - Not supported on most hardware [/codeblock] </member> + <member name="vrs_update_mode" type="int" setter="set_vrs_update_mode" getter="get_vrs_update_mode" enum="Viewport.VRSUpdateMode" default="1"> + Sets the update mode for Variable Rate Shading (VRS) for the viewport. VRS requires the input texture to be converted to the format usable by the VRS method supported by the hardware. The update mode defines how often this happens. If the GPU does not support VRS, or VRS is not enabled, this property is ignored. + </member> <member name="world_2d" type="World2D" setter="set_world_2d" getter="get_world_2d"> The custom [World2D] which can be used as 2D environment source. </member> @@ -664,5 +667,17 @@ <constant name="VRS_MAX" value="3" enum="VRSMode"> Represents the size of the [enum VRSMode] enum. </constant> + <constant name="VRS_UPDATE_DISABLED" value="0" enum="VRSUpdateMode"> + The input texture for variable rate shading will not be processed. + </constant> + <constant name="VRS_UPDATE_ONCE" value="1" enum="VRSUpdateMode"> + The input texture for variable rate shading will be processed once. + </constant> + <constant name="VRS_UPDATE_ALWAYS" value="2" enum="VRSUpdateMode"> + The input texture for variable rate shading will be processed each frame. + </constant> + <constant name="VRS_UPDATE_MAX" value="3" enum="VRSUpdateMode"> + Represents the size of the [enum VRSUpdateMode] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeFrame.xml b/doc/classes/VisualShaderNodeFrame.xml index 3126a56abe..a86587f16a 100644 --- a/doc/classes/VisualShaderNodeFrame.xml +++ b/doc/classes/VisualShaderNodeFrame.xml @@ -4,7 +4,7 @@ A frame other visual shader nodes can be attached to for better organization. </brief_description> <description> - A rectangular frame that can be used to group visual shader nodes together to improve organization. + A rectangular frame that can be used to group visual shader nodes together to improve organization. Nodes attached to the frame will move with it when it is dragged and it can automatically resize to enclose all attached nodes. Its title, description and color can be customized. </description> diff --git a/doc/classes/VisualShaderNodeReroute.xml b/doc/classes/VisualShaderNodeReroute.xml new file mode 100644 index 0000000000..1baaa7bbb6 --- /dev/null +++ b/doc/classes/VisualShaderNodeReroute.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeReroute" inherits="VisualShaderNode" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + A node that allows rerouting a connection within the visual shader graph. + </brief_description> + <description> + Automatically adapts its port type to the type of the incoming connection and ensures valid connections. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_port_type" qualifiers="const"> + <return type="int" enum="VisualShaderNode.PortType" /> + <description> + Returns the port type of the reroute node. + </description> + </method> + </methods> +</class> diff --git a/doc/classes/WorkerThreadPool.xml b/doc/classes/WorkerThreadPool.xml index fa1f08b149..2b1bc136cb 100644 --- a/doc/classes/WorkerThreadPool.xml +++ b/doc/classes/WorkerThreadPool.xml @@ -58,6 +58,7 @@ Adds [param action] as a group task to be executed by the worker threads. The [Callable] will be called a number of times based on [param elements], with the first thread calling it with the value [code]0[/code] as a parameter, and each consecutive execution incrementing this value by 1 until it reaches [code]element - 1[/code]. The number of threads the task is distributed to is defined by [param tasks_needed], where the default value [code]-1[/code] means it is distributed to all worker threads. [param high_priority] determines if the task has a high priority or a low priority (default). You can optionally provide a [param description] to help with debugging. Returns a group task ID that can be used by other methods. + [b]Warning:[/b] Every task must be waited for completion using [method wait_for_task_completion] or [method wait_for_group_task_completion] at some point so that any allocated resources inside the task can be cleaned up. </description> </method> <method name="add_task"> @@ -68,6 +69,7 @@ <description> Adds [param action] as a task to be executed by a worker thread. [param high_priority] determines if the task has a high priority or a low priority (default). You can optionally provide a [param description] to help with debugging. Returns a task ID that can be used by other methods. + [b]Warning:[/b] Every task must be waited for completion using [method wait_for_task_completion] or [method wait_for_group_task_completion] at some point so that any allocated resources inside the task can be cleaned up. </description> </method> <method name="get_group_processed_element_count" qualifiers="const"> @@ -83,6 +85,7 @@ <param index="0" name="group_id" type="int" /> <description> Returns [code]true[/code] if the group task with the given ID is completed. + [b]Note:[/b] You should only call this method between adding the group task and awaiting its completion. </description> </method> <method name="is_task_completed" qualifiers="const"> @@ -90,6 +93,7 @@ <param index="0" name="task_id" type="int" /> <description> Returns [code]true[/code] if the task with the given ID is completed. + [b]Note:[/b] You should only call this method between adding the task and awaiting its completion. </description> </method> <method name="wait_for_group_task_completion"> diff --git a/doc/classes/XRHandTracker.xml b/doc/classes/XRHandTracker.xml index 69390df696..636af6625b 100644 --- a/doc/classes/XRHandTracker.xml +++ b/doc/classes/XRHandTracker.xml @@ -11,12 +11,6 @@ <link title="XR documentation index">$DOCS_URL/tutorials/xr/index.html</link> </tutorials> <methods> - <method name="get_hand" qualifiers="const"> - <return type="int" enum="XRHandTracker.Hand" /> - <description> - Returns the type of hand. - </description> - </method> <method name="get_hand_joint_angular_velocity" qualifiers="const"> <return type="Vector3" /> <param index="0" name="joint" type="int" enum="XRHandTracker.HandJoint" /> @@ -52,13 +46,6 @@ Returns the transform for the given hand joint. </description> </method> - <method name="set_hand"> - <return type="void" /> - <param index="0" name="hand" type="int" enum="XRHandTracker.Hand" /> - <description> - Sets the type of hand. - </description> - </method> <method name="set_hand_joint_angular_velocity"> <return type="void" /> <param index="0" name="joint" type="int" enum="XRHandTracker.HandJoint" /> @@ -101,6 +88,7 @@ </method> </methods> <members> + <member name="hand" type="int" setter="set_tracker_hand" getter="get_tracker_hand" overrides="XRPositionalTracker" enum="XRPositionalTracker.TrackerHand" default="1" /> <member name="hand_tracking_source" type="int" setter="set_hand_tracking_source" getter="get_hand_tracking_source" enum="XRHandTracker.HandTrackingSource" default="0"> The source of the hand tracking data. </member> @@ -110,15 +98,6 @@ <member name="type" type="int" setter="set_tracker_type" getter="get_tracker_type" overrides="XRTracker" enum="XRServer.TrackerType" default="16" /> </members> <constants> - <constant name="HAND_LEFT" value="0" enum="Hand"> - A left hand. - </constant> - <constant name="HAND_RIGHT" value="1" enum="Hand"> - A right hand. - </constant> - <constant name="HAND_MAX" value="2" enum="Hand"> - Represents the size of the [enum Hand] enum. - </constant> <constant name="HAND_TRACKING_SOURCE_UNKNOWN" value="0" enum="HandTrackingSource"> The source of hand tracking data is unknown. </constant> diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml index d5714980c3..4179ba821c 100644 --- a/doc/classes/XRServer.xml +++ b/doc/classes/XRServer.xml @@ -37,8 +37,8 @@ You should call this method after a few seconds have passed. For example, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism. </description> </method> - <method name="clear_reference_frame" qualifiers="const"> - <return type="Transform3D" /> + <method name="clear_reference_frame"> + <return type="void" /> <description> Clears the reference frame that was set by previous calls to [method center_on_hmd]. </description> diff --git a/doc/classes/XRVRS.xml b/doc/classes/XRVRS.xml new file mode 100644 index 0000000000..b19b461fab --- /dev/null +++ b/doc/classes/XRVRS.xml @@ -0,0 +1,30 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="XRVRS" inherits="Object" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + Helper class for XR interfaces that generates VRS images. + </brief_description> + <description> + This class is used by various XR interfaces to generate VRS textures that can be used to speed up rendering. + </description> + <tutorials> + </tutorials> + <methods> + <method name="make_vrs_texture"> + <return type="RID" /> + <param index="0" name="target_size" type="Vector2" /> + <param index="1" name="eye_foci" type="PackedVector2Array" /> + <description> + Generates the VRS texture based on a render [param target_size] adjusted by our VRS tile size. For each eyes focal point passed in [param eye_foci] a layer is created. Focal point should be in NDC. + The result will be cached, requesting a VRS texture with unchanged parameters and settings will return the cached RID. + </description> + </method> + </methods> + <members> + <member name="vrs_min_radius" type="float" setter="set_vrs_min_radius" getter="get_vrs_min_radius" default="20.0"> + The minimum radius around the focal point where full quality is guaranteed if VRS is used as a percentage of screen size. + </member> + <member name="vrs_strength" type="float" setter="set_vrs_strength" getter="get_vrs_strength" default="1.0"> + The strength used to calculate the VRS density map. The greater this value, the more noticeable VRS is. + </member> + </members> +</class> |