diff options
Diffstat (limited to 'doc/classes')
137 files changed, 2414 insertions, 959 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index bf81362e79..3ca7e0716b 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -935,7 +935,7 @@ <description> Returns the result of smoothly interpolating the value of [code]x[/code] between [code]0[/code] and [code]1[/code], based on the where [code]x[/code] lies with respect to the edges [code]from[/code] and [code]to[/code]. The return value is [code]0[/code] if [code]x <= from[/code], and [code]1[/code] if [code]x >= to[/code]. If [code]x[/code] lies between [code]from[/code] and [code]to[/code], the returned value follows an S-shaped curve that maps [code]x[/code] between [code]0[/code] and [code]1[/code]. - This S-shaped curve is the cubic Hermite interpolator, given by [code]f(x) = 3*x^2 - 2*x^3[/code]. + This S-shaped curve is the cubic Hermite interpolator, given by [code]f(y) = 3*y^2 - 2*y^3[/code] where [code]y = (x-from) / (to-from)[/code]. [codeblock] smoothstep(0, 2, -5.0) # Returns 0.0 smoothstep(0, 2, 0.5) # Returns 0.15625 @@ -2147,7 +2147,25 @@ <constant name="JOY_BUTTON_DPAD_RIGHT" value="14" enum="JoyButtonList"> Game controller D-pad right button. </constant> - <constant name="JOY_BUTTON_SDL_MAX" value="15" enum="JoyButtonList"> + <constant name="JOY_BUTTON_MISC1" value="15" enum="JoyButtonList"> + Game controller SDL miscellaneous button. Corresponds to Xbox share button, PS5 microphone button, Nintendo capture button. + </constant> + <constant name="JOY_BUTTON_PADDLE1" value="16" enum="JoyButtonList"> + Game controller SDL paddle 1 button. + </constant> + <constant name="JOY_BUTTON_PADDLE2" value="17" enum="JoyButtonList"> + Game controller SDL paddle 2 button. + </constant> + <constant name="JOY_BUTTON_PADDLE3" value="18" enum="JoyButtonList"> + Game controller SDL paddle 3 button. + </constant> + <constant name="JOY_BUTTON_PADDLE4" value="19" enum="JoyButtonList"> + Game controller SDL paddle 4 button. + </constant> + <constant name="JOY_BUTTON_TOUCHPAD" value="20" enum="JoyButtonList"> + Game controller SDL touchpad button. + </constant> + <constant name="JOY_BUTTON_SDL_MAX" value="21" enum="JoyButtonList"> The number of SDL game controller buttons. </constant> <constant name="JOY_BUTTON_MAX" value="36" enum="JoyButtonList"> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index e1fb78e5b5..02ccab4e05 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -49,6 +49,11 @@ </member> </members> <signals> + <signal name="animation_finished"> + <description> + Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn. + </description> + </signal> <signal name="frame_changed"> <description> Emitted when [member frame] changed. diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index d26c0e8605..9720405ffd 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -168,7 +168,7 @@ <argument index="2" name="stream" type="Resource"> </argument> <description> - Sets the stream of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track. + Sets the stream of the key identified by [code]key_idx[/code] to value [code]stream[/code]. The [code]track_idx[/code] must be the index of an Audio Track. </description> </method> <method name="bezier_track_get_key_in_handle" qualifiers="const"> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index bebff61671..e5ba1d58f7 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -254,7 +254,7 @@ <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> - <member name="playback_process_mode" type="int" setter="set_animation_process_mode" getter="get_animation_process_mode" enum="AnimationPlayer.AnimationProcessMode" default="1"> + <member name="playback_process_mode" type="int" setter="set_process_callback" getter="get_process_callback" enum="AnimationPlayer.AnimationProcessCallback" default="1"> The process notification in which to update animations. </member> <member name="playback_speed" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> @@ -299,13 +299,13 @@ </signal> </signals> <constants> - <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode"> + <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessCallback"> Process animation during the physics process. This is especially useful when animating physics bodies. </constant> - <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode"> + <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessCallback"> Process animation during the idle process. </constant> - <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode"> + <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessCallback"> Do not process animation. Use [method advance] to process the animation manually. </constant> <constant name="ANIMATION_METHOD_CALL_DEFERRED" value="0" enum="AnimationMethodCallMode"> diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index 262b5addb7..2517941133 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -45,8 +45,8 @@ <member name="anim_player" type="NodePath" setter="set_animation_player" getter="get_animation_player" default="NodePath("")"> The path to the [AnimationPlayer] used for animating. </member> - <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="AnimationTree.AnimationProcessMode" default="1"> - The process mode of this [AnimationTree]. See [enum AnimationProcessMode] for available modes. + <member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="AnimationTree.AnimationProcessCallback" default="1"> + The process mode of this [AnimationTree]. See [enum AnimationProcessCallback] for available modes. </member> <member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath("")"> The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code]. @@ -57,13 +57,13 @@ </member> </members> <constants> - <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessMode"> + <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessCallback"> The animations will progress during the physics frame (i.e. [method Node._physics_process]). </constant> - <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessMode"> + <constant name="ANIMATION_PROCESS_IDLE" value="1" enum="AnimationProcessCallback"> The animations will progress during the idle frame (i.e. [method Node._process]). </constant> - <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessMode"> + <constant name="ANIMATION_PROCESS_MANUAL" value="2" enum="AnimationProcessCallback"> The animations will only progress manually (see [method advance]). </constant> </constants> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 72c40478bb..9711a2a35b 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -140,14 +140,16 @@ <argument index="0" name="area" type="Area2D"> </argument> <description> - Emitted when another area enters. + Emitted when another Area2D enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. + [code]area[/code] the other Area2D. </description> </signal> <signal name="area_exited"> <argument index="0" name="area" type="Area2D"> </argument> <description> - Emitted when another area exits. + Emitted when another Area2D exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. + [code]area[/code] the other Area2D. </description> </signal> <signal name="area_shape_entered"> @@ -157,10 +159,14 @@ </argument> <argument index="2" name="area_shape" type="int"> </argument> - <argument index="3" name="self_shape" type="int"> + <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when another area enters, reporting which shapes overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code]. + Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. + [code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. + [code]area[/code] the other Area2D. + [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. + [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. </description> </signal> <signal name="area_shape_exited"> @@ -170,54 +176,64 @@ </argument> <argument index="2" name="area_shape" type="int"> </argument> - <argument index="3" name="self_shape" type="int"> + <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when another area exits, reporting which shapes were overlapping. + Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. + [code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. + [code]area[/code] the other Area2D. + [code]area_shape[/code] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. + [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. </description> </signal> <signal name="body_entered"> - <argument index="0" name="body" type="Node"> + <argument index="0" name="body" type="Node2D"> </argument> <description> - Emitted when a physics body enters. - The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when a [PhysicsBody2D] or [TileMap] enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> <signal name="body_exited"> - <argument index="0" name="body" type="Node"> + <argument index="0" name="body" type="Node2D"> </argument> <description> - Emitted when a physics body exits. - The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when a [PhysicsBody2D] or [TileMap] exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> <signal name="body_shape_entered"> <argument index="0" name="body_id" type="int"> </argument> - <argument index="1" name="body" type="Node"> + <argument index="1" name="body" type="Node2D"> </argument> <argument index="2" name="body_shape" type="int"> </argument> - <argument index="3" name="area_shape" type="int"> + <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a physics body enters, reporting which shapes overlapped. - The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + [code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. + [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap]. + [code]body_shape[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. + [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. </description> </signal> <signal name="body_shape_exited"> <argument index="0" name="body_id" type="int"> </argument> - <argument index="1" name="body" type="Node"> + <argument index="1" name="body" type="Node2D"> </argument> <argument index="2" name="body_shape" type="int"> </argument> - <argument index="3" name="area_shape" type="int"> + <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a physics body exits, reporting which shapes were overlapping. - The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + [code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. + [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap]. + [code]body_shape[/code] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. + [code]local_shape[/code] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. </description> </signal> </signals> diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index 2f8042bb1e..4271769155 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -150,14 +150,16 @@ <argument index="0" name="area" type="Area3D"> </argument> <description> - Emitted when another area enters. + Emitted when another Area3D enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. + [code]area[/code] the other Area3D. </description> </signal> <signal name="area_exited"> <argument index="0" name="area" type="Area3D"> </argument> <description> - Emitted when another area exits. + Emitted when another Area3D exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. + [code]area[/code] the other Area3D. </description> </signal> <signal name="area_shape_entered"> @@ -167,10 +169,14 @@ </argument> <argument index="2" name="area_shape" type="int"> </argument> - <argument index="3" name="self_shape" type="int"> + <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when another area enters, reporting which areas overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code]. + Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. + [code]area_id[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. + [code]area[/code] the other Area3D. + [code]area_shape[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. + [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. </description> </signal> <signal name="area_shape_exited"> @@ -180,54 +186,64 @@ </argument> <argument index="2" name="area_shape" type="int"> </argument> - <argument index="3" name="self_shape" type="int"> + <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when another area exits, reporting which areas were overlapping. + Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. + [code]area_id[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. + [code]area[/code] the other Area3D. + [code]area_shape[/code] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. + [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. </description> </signal> <signal name="body_entered"> - <argument index="0" name="body" type="Node"> + <argument index="0" name="body" type="Node3D"> </argument> <description> - Emitted when a physics body enters. - The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when a [PhysicsBody3D] or [GridMap] enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> <signal name="body_exited"> - <argument index="0" name="body" type="Node"> + <argument index="0" name="body" type="Node3D"> </argument> <description> - Emitted when a physics body exits. - The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when a [PhysicsBody3D] or [GridMap] exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> <signal name="body_shape_entered"> <argument index="0" name="body_id" type="int"> </argument> - <argument index="1" name="body" type="Node"> + <argument index="1" name="body" type="Node3D"> </argument> <argument index="2" name="body_shape" type="int"> </argument> - <argument index="3" name="area_shape" type="int"> + <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a physics body enters, reporting which shapes overlapped. - The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + [code]body_id[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. + [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap]. + [code]body_shape[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. + [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. </description> </signal> <signal name="body_shape_exited"> <argument index="0" name="body_id" type="int"> </argument> - <argument index="1" name="body" type="Node"> + <argument index="1" name="body" type="Node3D"> </argument> <argument index="2" name="body_shape" type="int"> </argument> - <argument index="3" name="area_shape" type="int"> + <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a physics body exits, reporting which shapes were overlapping. - The [code]body[/code] argument can either be a [PhysicsBody3D] or a [GridMap] instance (while GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + [code]body_id[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. + [code]body[/code] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap]. + [code]body_shape[/code] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. + [code]local_shape[/code] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. </description> </signal> </signals> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index db5d377c62..8fb688a8ae 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -191,15 +191,13 @@ </return> <argument index="0" name="value" type="Variant"> </argument> - <argument index="1" name="obj" type="Object"> + <argument index="1" name="func" type="Callable"> </argument> - <argument index="2" name="func" type="StringName"> - </argument> - <argument index="3" name="before" type="bool" default="true"> + <argument index="2" name="before" type="bool" default="true"> </argument> <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 and a custom comparison method. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise. - [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. + [b]Note:[/b] Calling [method bsearch_custom] on an unsorted array results in unexpected behavior. </description> </method> <method name="clear"> @@ -234,7 +232,9 @@ <argument index="0" name="value" type="Variant"> </argument> <description> - Removes the first occurrence of a value from the array. + Removes the first occurrence of a value from the array. To remove an element by index, use [method remove] instead. + [b]Note:[/b] This method acts in-place and doesn't return a value. + [b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed. </description> </method> <method name="find"> @@ -311,7 +311,8 @@ <return type="int"> </return> <description> - Returns a hashed integer value representing the array contents. + Returns a hashed integer value representing the array and its contents. + [b]Note:[/b] Arrays with equal contents can still produce different hashes. Only the exact same arrays will produce the same hashed integer value. </description> </method> <method name="insert"> @@ -323,6 +324,8 @@ </argument> <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]pos == size()[/code]). + [b]Note:[/b] This method acts in-place and doesn't return a value. + [b]Note:[/b] On large arrays, this method will be slower if the inserted element is close to the beginning of the array (index 0). This is because all elements placed after the newly inserted element have to be reindexed. </description> </method> <method name="invert"> @@ -421,14 +424,15 @@ <return type="Variant"> </return> <description> - Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. + Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_front]. </description> </method> <method name="pop_front"> <return type="Variant"> </return> <description> - Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. + Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_back]. + [b]Note:[/b] On large arrays, this method is much slower than [method pop_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method pop_front] will be. </description> </method> <method name="push_back"> @@ -437,7 +441,7 @@ <argument index="0" name="value" type="Variant"> </argument> <description> - Appends an element at the end of the array. + Appends an element at the end of the array. See also [method push_front]. </description> </method> <method name="push_front"> @@ -446,7 +450,8 @@ <argument index="0" name="value" type="Variant"> </argument> <description> - Adds an element at the beginning of the array. + Adds an element at the beginning of the array. See also [method push_back]. + [b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be. </description> </method> <method name="remove"> @@ -455,7 +460,9 @@ <argument index="0" name="position" type="int"> </argument> <description> - Removes an element from the array by index. If the index does not exist in the array, nothing happens. + Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use [method erase] instead. + [b]Note:[/b] This method acts in-place and doesn't return a value. + [b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed. </description> </method> <method name="resize"> @@ -528,12 +535,10 @@ <method name="sort_custom"> <return type="void"> </return> - <argument index="0" name="obj" type="Object"> - </argument> - <argument index="1" name="func" type="StringName"> + <argument index="0" name="func" type="Callable"> </argument> <description> - Sorts the array using a custom method. The arguments are an object that holds the method and the name of such method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. + Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. [b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. [codeblocks] [gdscript] @@ -544,7 +549,7 @@ return false var my_items = [[5, "Potato"], [9, "Rice"], [4, "Tomato"]] - my_items.sort_custom(MyCustomSorter, "sort_ascending") + my_items.sort_custom(MyCustomSorter.sort_ascending) print(my_items) # Prints [[4, Tomato], [5, Potato], [9, Rice]]. [/gdscript] [csharp] diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 1f532f4843..e2c4ed1430 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -215,6 +215,8 @@ <member name="custom_aabb" type="AABB" setter="set_custom_aabb" getter="get_custom_aabb" default="AABB( 0, 0, 0, 0, 0, 0 )"> Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unexpected culling when using a shader to offset vertices. </member> + <member name="shadow_mesh" type="ArrayMesh" setter="set_shadow_mesh" getter="get_shadow_mesh"> + </member> </members> <constants> </constants> diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml new file mode 100644 index 0000000000..cf3d87c2e4 --- /dev/null +++ b/doc/classes/AudioEffectCapture.xml @@ -0,0 +1,75 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="AudioEffectCapture" inherits="AudioEffect" version="4.0"> + <brief_description> + Captures audio from an audio bus in real-time. + </brief_description> + <description> + AudioEffectCapture is an AudioEffect which copies all audio frames from the attached audio effect bus into its internal ring buffer. + Application code should consume these audio frames from this ring buffer using [method get_buffer] and process it as needed, for example to capture data from a microphone, implement application defined effects, or to transmit audio over the network. + </description> + <tutorials> + </tutorials> + <methods> + <method name="can_get_buffer" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="frames" type="int"> + </argument> + <description> + Returns [code]true[/code] if at least [code]frames[/code] audio frames are available to read in the internal ring buffer. + </description> + </method> + <method name="clear_buffer"> + <return type="void"> + </return> + <description> + Clears the internal ring buffer. + </description> + </method> + <method name="get_buffer"> + <return type="PackedVector2Array"> + </return> + <argument index="0" name="frames" type="int"> + </argument> + <description> + Gets the next [code]frames[/code] audio samples from the internal ring buffer. + Returns a [PackedVector2Array] containing exactly [code]frames[/code] audio samples if available, or an empty [PackedVector2Array] if insufficient data was available. + </description> + </method> + <method name="get_buffer_length_frames" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the total size of the internal ring buffer in frames. + </description> + </method> + <method name="get_discarded_frames" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the number of audio frames discarded from the audio bus due to full buffer. + </description> + </method> + <method name="get_frames_available" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the number of frames available to read using [method get_buffer]. + </description> + </method> + <method name="get_pushed_frames" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the number of audio frames inserted from the audio bus. + </description> + </method> + </methods> + <members> + <member name="buffer_length" type="float" setter="set_buffer_length" getter="get_buffer_length" default="0.1"> + Length of the internal ring buffer, in seconds. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/BakedLightmapData.xml b/doc/classes/BakedLightmapData.xml index 026477782a..904555c48e 100644 --- a/doc/classes/BakedLightmapData.xml +++ b/doc/classes/BakedLightmapData.xml @@ -12,11 +12,11 @@ </return> <argument index="0" name="path" type="NodePath"> </argument> - <argument index="1" name="lightmap" type="Rect2"> + <argument index="1" name="uv_scale" type="Rect2"> </argument> - <argument index="2" name="offset" type="int"> + <argument index="2" name="slice_index" type="int"> </argument> - <argument index="3" name="arg3" type="int"> + <argument index="3" name="sub_instance" type="int"> </argument> <description> </description> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index e47198a381..51c35b15ce 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -34,6 +34,7 @@ [/codeblocks] Buttons (like all Control nodes) can also be created in the editor, but some situations may require creating them from code. See also [BaseButton] which contains common properties and methods associated with this node. + [b]Note:[/b] Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use [TouchScreenButton] for buttons that trigger gameplay movement or actions, as [TouchScreenButton] supports multitouch. </description> <tutorials> <link title="2D Dodge The Creeps Demo">https://godotengine.org/asset-library/asset/515</link> @@ -118,17 +119,20 @@ <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> Default text [Color] of the [Button]. </theme_item> - <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> Text [Color] used when the [Button] is disabled. </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> Text [Color] used when the [Button] is being hovered. </theme_item> - <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> - Text [Color] used when the [Button] is being pressed. + <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + Text [Color] used when the [Button] is being hovered and pressed. + </theme_item> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [Button]. </theme_item> - <theme_item name="font_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> - Text oubline [Color] of the [Button]. + <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + Text [Color] used when the [Button] is being pressed. </theme_item> <theme_item name="font_size" type="int"> Font size of the [Button]'s text. @@ -139,11 +143,26 @@ <theme_item name="hseparation" type="int" default="2"> The horizontal space between [Button]'s icon and text. </theme_item> + <theme_item name="icon_disabled_color" type="Color" default="Color( 1, 1, 1, 1 )"> + Icon modulate [Color] used when the [Button] is disabled. + </theme_item> + <theme_item name="icon_hover_color" type="Color" default="Color( 1, 1, 1, 1 )"> + Icon modulate [Color] used when the [Button] is being hovered. + </theme_item> + <theme_item name="icon_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + Icon modulate [Color] used when the [Button] is being hovered and pressed. + </theme_item> + <theme_item name="icon_normal_color" type="Color" default="Color( 1, 1, 1, 1 )"> + Default icon modulate [Color] of the [Button]. + </theme_item> + <theme_item name="icon_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> + Icon modulate [Color] used when the [Button] is being pressed. + </theme_item> <theme_item name="normal" type="StyleBox"> Default [StyleBox] for the [Button]. </theme_item> <theme_item name="outline_size" type="int" default="0"> - Size of the [Button]'s text outline. + The size of the text outline. </theme_item> <theme_item name="pressed" type="StyleBox"> [StyleBox] used when the [Button] is being pressed. diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index f137ede90f..9b8993e45d 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -18,7 +18,7 @@ callable.call("invalid") # Invalid call, should have at least 2 arguments. [/gdscript] [csharp] - Callable callable = new Callable(this, "print_args"); + Callable callable = new Callable(this, nameof("printArgs")); public void PrintArgs(object arg1, object arg2, object arg3 = "") { GD.PrintS(arg1, arg2, arg3); @@ -67,6 +67,7 @@ <return type="Callable"> </return> <description> + Returns a copy of this [Callable] with the arguments bound. Bound arguments are passed after the arguments supplied by [method call]. </description> </method> <method name="call" qualifiers="vararg"> @@ -108,24 +109,28 @@ <return type="int"> </return> <description> + Returns the hash value of this [Callable]'s object. </description> </method> <method name="is_custom"> <return type="bool"> </return> <description> + Returns [code]true[/code] if this [Callable] is a custom callable whose behavior differs based on implementation details. Custom callables are used in the engine for various reasons. If [code]true[/code], you can't use [method get_method]. </description> </method> <method name="is_null"> <return type="bool"> </return> <description> + Returns [code]true[/code] if this [Callable] has no target to call the method on. </description> </method> <method name="is_standard"> <return type="bool"> </return> <description> + Returns [code]true[/code] if this [Callable] is a standard callable, referencing an object and a method using a [StringName]. </description> </method> <method name="operator !=" qualifiers="operator"> @@ -134,6 +139,7 @@ <argument index="0" name="right" type="Callable"> </argument> <description> + Returns [code]true[/code] if both [Callable]s invoke different targets. </description> </method> <method name="operator ==" qualifiers="operator"> @@ -142,6 +148,7 @@ <argument index="0" name="right" type="Callable"> </argument> <description> + Returns [code]true[/code] if both [Callable]s invoke the same custom target. </description> </method> <method name="unbind"> @@ -150,6 +157,7 @@ <argument index="0" name="argcount" type="int"> </argument> <description> + Returns a copy of this [Callable] with the arguments unbound. Calling the returned [Callable] will call the method without the extra arguments that are supplied in the [Callable] on which you are calling this method. </description> </method> </methods> diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index 2a4e726d43..d40567bdcb 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -168,8 +168,8 @@ <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> The camera's offset, useful for looking around or camera shake animations. </member> - <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Camera2D.Camera2DProcessMode" default="1"> - The camera's process callback. See [enum Camera2DProcessMode]. + <member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="Camera2D.Camera2DProcessCallback" default="1"> + The camera's process callback. See [enum Camera2DProcessCallback]. </member> <member name="rotating" type="bool" setter="set_rotating" getter="is_rotating" default="false"> If [code]true[/code], the camera rotates with the target. @@ -191,10 +191,10 @@ <constant name="ANCHOR_MODE_DRAG_CENTER" value="1" enum="AnchorMode"> The camera's position takes into account vertical/horizontal offsets and the screen size. </constant> - <constant name="CAMERA2D_PROCESS_PHYSICS" value="0" enum="Camera2DProcessMode"> + <constant name="CAMERA2D_PROCESS_PHYSICS" value="0" enum="Camera2DProcessCallback"> The camera updates with the [code]_physics_process[/code] callback. </constant> - <constant name="CAMERA2D_PROCESS_IDLE" value="1" enum="Camera2DProcessMode"> + <constant name="CAMERA2D_PROCESS_IDLE" value="1" enum="Camera2DProcessCallback"> The camera updates with the [code]_process[/code] callback. </constant> </constants> diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index b4cb110337..850098f741 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -17,7 +17,7 @@ The color the character will be drawn with. </member> <member name="elapsed_time" type="float" setter="set_elapsed_time" getter="get_elapsed_time" default="0.0"> - The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS]. + The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused depending on the value of the [RichTextLabel]'s [member Node.process_mode]. [b]Note:[/b] Time still passes while the [RichTextLabel] is hidden. </member> <member name="env" type="Dictionary" setter="set_environment" getter="get_environment" default="{}"> diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index 89fb960e88..80febfbfe7 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -36,16 +36,19 @@ <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> The [CheckBox] text's font color. </theme_item> - <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> The [CheckBox] text's font color when it's disabled. </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> The [CheckBox] text's font color when it's hovered. </theme_item> - <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> The [CheckBox] text's font color when it's hovered and pressed. </theme_item> - <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [CheckBox]. + </theme_item> + <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> The [CheckBox] text's font color when it's pressed. </theme_item> <theme_item name="font_size" type="int"> @@ -63,6 +66,9 @@ <theme_item name="normal" type="StyleBox"> The [StyleBox] to display as a background. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="pressed" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is pressed. </theme_item> diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index 882f1c69f3..46e590a115 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -33,16 +33,19 @@ <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> The [CheckButton] text's font color. </theme_item> - <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> The [CheckButton] text's font color when it's disabled. </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> The [CheckButton] text's font color when it's hovered. </theme_item> - <theme_item name="font_color_hover_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_hover_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> The [CheckButton] text's font color when it's hovered and pressed. </theme_item> - <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [CheckButton]. + </theme_item> + <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> The [CheckButton] text's font color when it's pressed. </theme_item> <theme_item name="font_size" type="int"> @@ -84,6 +87,9 @@ <theme_item name="on_mirrored" type="Texture2D"> The icon to display when the [CheckButton] is checked (for right-to-left layouts). </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="pressed" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is pressed. </theme_item> diff --git a/doc/classes/ClippedCamera3D.xml b/doc/classes/ClippedCamera3D.xml index de90247536..9116af19c3 100644 --- a/doc/classes/ClippedCamera3D.xml +++ b/doc/classes/ClippedCamera3D.xml @@ -95,15 +95,15 @@ <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> The camera's collision margin. The camera can't get closer than this distance to a colliding object. </member> - <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="ClippedCamera3D.ProcessMode" default="0"> - The camera's process callback. See [enum ProcessMode]. + <member name="process_callback" type="int" setter="set_process_callback" getter="get_process_callback" enum="ClippedCamera3D.ClipProcessCallback" default="0"> + The camera's process callback. See [enum ClipProcessCallback]. </member> </members> <constants> - <constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ProcessMode"> + <constant name="CLIP_PROCESS_PHYSICS" value="0" enum="ClipProcessCallback"> The camera updates with the [code]_physics_process[/code] callback. </constant> - <constant name="CLIP_PROCESS_IDLE" value="1" enum="ProcessMode"> + <constant name="CLIP_PROCESS_IDLE" value="1" enum="ClipProcessCallback"> The camera updates with the [code]_process[/code] callback. </constant> </constants> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index 8834ff82c6..d1483ac88e 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -179,9 +179,12 @@ </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> </theme_item> - <theme_item name="font_color_readonly" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [CodeEdit]. </theme_item> - <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> + </theme_item> + <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> </theme_item> <theme_item name="font_size" type="int"> Font size of the [CodeEdit]'s text. @@ -194,6 +197,9 @@ </theme_item> <theme_item name="normal" type="StyleBox"> </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="read_only" type="StyleBox"> </theme_item> <theme_item name="safe_line_number_color" type="Color" default="Color( 0.67, 0.78, 0.67, 0.6 )"> diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml index 7a1dad547b..f078e4e5b0 100644 --- a/doc/classes/CodeHighlighter.xml +++ b/doc/classes/CodeHighlighter.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CodeHighlighter" inherits="SyntaxHighlighter" version="4.0"> <brief_description> + A syntax highlighter for code. </brief_description> <description> + A syntax highlighter for code. </description> <tutorials> </tutorials> @@ -10,15 +12,18 @@ <method name="add_color_region"> <return type="void"> </return> - <argument index="0" name="p_start_key" type="String"> + <argument index="0" name="start_key" type="String"> </argument> - <argument index="1" name="p_end_key" type="String"> + <argument index="1" name="end_key" type="String"> </argument> - <argument index="2" name="p_color" type="Color"> + <argument index="2" name="color" type="Color"> </argument> - <argument index="3" name="p_line_only" type="bool" default="false"> + <argument index="3" name="line_only" type="bool" default="false"> </argument> <description> + Adds a color region such as comments or strings. + Both the start and end keys must be symbols. Only the start key has to be unique. + Line only denotes if the region should continue until the end of the line or carry over on to the next line. If the end key is blank this is automatically set to [code]true[/code]. </description> </method> <method name="add_keyword_color"> @@ -29,6 +34,8 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color for a keyword. + The keyword cannot contain any symbols except '_'. </description> </method> <method name="add_member_keyword_color"> @@ -39,24 +46,30 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color for a member keyword. + The member keyword cannot contain any symbols except '_'. + It will not be highlighted if preceded by a '.'. </description> </method> <method name="clear_color_regions"> <return type="void"> </return> <description> + Removes all color regions. </description> </method> <method name="clear_keyword_colors"> <return type="void"> </return> <description> + Removes all keywords. </description> </method> <method name="clear_member_keyword_colors"> <return type="void"> </return> <description> + Removes all member keywords. </description> </method> <method name="get_keyword_color" qualifiers="const"> @@ -65,6 +78,7 @@ <argument index="0" name="keyword" type="String"> </argument> <description> + Returns the color for a keyword. </description> </method> <method name="get_member_keyword_color" qualifiers="const"> @@ -73,14 +87,16 @@ <argument index="0" name="member_keyword" type="String"> </argument> <description> + Returns the color for a member keyword. </description> </method> <method name="has_color_region" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="p_start_key" type="String"> + <argument index="0" name="start_key" type="String"> </argument> <description> + Return [code]true[/code] if the start key exists, else [code]false[/code]. </description> </method> <method name="has_keyword_color" qualifiers="const"> @@ -89,6 +105,7 @@ <argument index="0" name="keyword" type="String"> </argument> <description> + Return [code]true[/code] if the keyword exists, else [code]false[/code]. </description> </method> <method name="has_member_keyword_color" qualifiers="const"> @@ -97,14 +114,16 @@ <argument index="0" name="member_keyword" type="String"> </argument> <description> + Return [code]true[/code] if the member keyword exists, else [code]false[/code]. </description> </method> <method name="remove_color_region"> <return type="void"> </return> - <argument index="0" name="p_start_key" type="String"> + <argument index="0" name="start_key" type="String"> </argument> <description> + Removes the color region that uses that start key. </description> </method> <method name="remove_keyword_color"> @@ -113,6 +132,7 @@ <argument index="0" name="keyword" type="String"> </argument> <description> + Removes the keyword. </description> </method> <method name="remove_member_keyword_color"> @@ -121,23 +141,31 @@ <argument index="0" name="member_keyword" type="String"> </argument> <description> + Removes the member keyword. </description> </method> </methods> <members> <member name="color_regions" type="Dictionary" setter="set_color_regions" getter="get_color_regions" default="{}"> + Sets the color regions. All existing regions will be removed. The [Dictionary] key is the region start and end key, separated by a space. The value is the region color. </member> <member name="function_color" type="Color" setter="set_function_color" getter="get_function_color" default="Color( 0, 0, 0, 1 )"> + Sets color for functions. A function is a non-keyword string followed by a '('. </member> <member name="keyword_colors" type="Dictionary" setter="set_keyword_colors" getter="get_keyword_colors" default="{}"> + Sets the keyword colors. All existing keywords will be removed. The [Dictionary] key is the keyword. The value is the keyword color. </member> <member name="member_keyword_colors" type="Dictionary" setter="set_member_keyword_colors" getter="get_member_keyword_colors" default="{}"> + Sets the member keyword colors. All existing member keyword will be removed. The [Dictionary] key is the member keyword. The value is the member keyword color. </member> <member name="member_variable_color" type="Color" setter="set_member_variable_color" getter="get_member_variable_color" default="Color( 0, 0, 0, 1 )"> + Sets color for member variables. A member variable is non-keyword, non-function string proceeded with a '.'. </member> <member name="number_color" type="Color" setter="set_number_color" getter="get_number_color" default="Color( 0, 0, 0, 1 )"> + Sets the color for numbers. </member> <member name="symbol_color" type="Color" setter="set_symbol_color" getter="get_symbol_color" default="Color( 0, 0, 0, 1 )"> + Sets the color for symbols. </member> </members> <constants> diff --git a/doc/classes/CollisionPolygon3D.xml b/doc/classes/CollisionPolygon3D.xml index dd3c57d1d0..38f4c5fe5c 100644 --- a/doc/classes/CollisionPolygon3D.xml +++ b/doc/classes/CollisionPolygon3D.xml @@ -17,6 +17,9 @@ <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> If [code]true[/code], no collision will be produced. </member> + <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04"> + The collision margin for the generated [Shape3D]. See [member Shape3D.margin] for more details. + </member> <member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array( )"> Array of vertices which define the polygon. [b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member. diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 8af5f29b65..ce88e0ae88 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -5,7 +5,7 @@ </brief_description> <description> A color represented by red, green, blue, and alpha (RGBA) components. The alpha component is often used for transparency. Values are in floating-point and usually range from 0 to 1. Some properties (such as CanvasItem.modulate) may accept values greater than 1 (overbright or HDR colors). - You can also create a color from standardized color names by using [code]ColorN[/code] ([b]FIXME:[/b] No longer true, a Color(String) constructor should be re-implemented for that) or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url]. + You can also create a color from standardized color names by using the string constructor or directly using the color constants defined here. The standardized color set is based on the [url=https://en.wikipedia.org/wiki/X11_color_names]X11 color names[/url]. If you want to supply values in a range of 0 to 255, you should use [method @GDScript.Color8]. [b]Note:[/b] In a boolean context, a Color will evaluate to [code]false[/code] if it's equal to [code]Color(0, 0, 0, 1)[/code] (opaque black). Otherwise, a Color will always evaluate to [code]true[/code]. [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/color_constants.png]Color constants cheatsheet[/url] @@ -54,6 +54,26 @@ <method name="Color" qualifiers="constructor"> <return type="Color"> </return> + <argument index="0" name="code" type="String"> + </argument> + <argument index="1" name="alpha" type="float"> + </argument> + <description> + Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants. + </description> + </method> + <method name="Color" qualifiers="constructor"> + <return type="Color"> + </return> + <argument index="0" name="code" type="String"> + </argument> + <description> + Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants. + </description> + </method> + <method name="Color" qualifiers="constructor"> + <return type="Color"> + </return> <argument index="0" name="r" type="float"> </argument> <argument index="1" name="g" type="float"> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index c04e8b9ea0..e49027e61d 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -73,13 +73,16 @@ <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )"> Default text [Color] of the [ColorPickerButton]. </theme_item> - <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )"> + <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.3 )"> Text [Color] used when the [ColorPickerButton] is disabled. </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the [ColorPickerButton] is being hovered. </theme_item> - <theme_item name="font_color_pressed" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [ColorPickerButton]. + </theme_item> + <theme_item name="font_pressed_color" type="Color" default="Color( 0.8, 0.8, 0.8, 1 )"> Text [Color] used when the [ColorPickerButton] is being pressed. </theme_item> <theme_item name="font_size" type="int"> @@ -94,6 +97,9 @@ <theme_item name="normal" type="StyleBox"> Default [StyleBox] for the [ColorPickerButton]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="pressed" type="StyleBox"> [StyleBox] used when the [ColorPickerButton] is being pressed. </theme_item> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 533748aced..c5e820e9fe 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -16,8 +16,9 @@ [b]Note:[/b] Theme items are [i]not[/i] [Object] properties. This means you can't access their values using [method Object.get] and [method Object.set]. Instead, use the [code]get_theme_*[/code] and [code]add_theme_*_override[/code] methods provided by this class. </description> <tutorials> - <link title="GUI tutorial index">https://docs.godotengine.org/en/latest/tutorials/gui/index.html</link> + <link title="GUI tutorial index">https://docs.godotengine.org/en/latest/tutorials/ui/index.html</link> <link title="Custom drawing in 2D">https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> + <link title="Control node gallery">https://docs.godotengine.org/en/latest/tutorials/ui/control_node_gallery.html</link> <link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link> </tutorials> <methods> @@ -306,6 +307,20 @@ [/codeblocks] </description> </method> + <method name="find_next_valid_focus" qualifiers="const"> + <return type="Control"> + </return> + <description> + Finds the next (below in the tree) [Control] that can receive the focus. + </description> + </method> + <method name="find_prev_valid_focus" qualifiers="const"> + <return type="Control"> + </return> + <description> + Finds the previous (above in the tree) [Control] that can receive the focus. + </description> + </method> <method name="force_drag"> <return type="void"> </return> @@ -854,7 +869,7 @@ <argument index="0" name="control" type="Control"> </argument> <description> - Shows the given control at the mouse pointer. A good time to call this method is in [method get_drag_data]. The control must not be in the scene tree. + Shows the given control at the mouse pointer. A good time to call this method is in [method get_drag_data]. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended. [codeblocks] [gdscript] export (Color, RGBA) var color = Color(1, 0, 0, 1) diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index 2d50d98a74..b33f3b4ffc 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -63,7 +63,7 @@ <argument index="0" name="to_point" type="Vector2"> </argument> <description> - Returns the closest point (in curve's local space) to [code]to_point[/code]. + Returns the closest baked point (in curve's local space) to [code]to_point[/code]. [code]to_point[/code] must be in this curve's local space. </description> </method> diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index bda04f010b..fcd150ad57 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -78,7 +78,7 @@ <argument index="0" name="to_point" type="Vector3"> </argument> <description> - Returns the closest point (in curve's local space) to [code]to_point[/code]. + Returns the closest baked point (in curve's local space) to [code]to_point[/code]. [code]to_point[/code] must be in this curve's local space. </description> </method> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index d91ea6528a..91e90d051d 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -492,7 +492,7 @@ </argument> <argument index="3" name="subtitle_track" type="String"> </argument> - <argument index="4" name="arg4" type="int"> + <argument index="4" name="screen" type="int"> </argument> <description> </description> @@ -635,6 +635,42 @@ <description> </description> </method> + <method name="tablet_get_current_driver" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns current active tablet driver name. + [b]Note:[/b] This method is implemented on Windows. + </description> + </method> + <method name="tablet_get_driver_count" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the total number of available tablet drivers. + [b]Note:[/b] This method is implemented on Windows. + </description> + </method> + <method name="tablet_get_driver_name" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Returns the tablet driver name for the given index. + [b]Note:[/b] This method is implemented on Windows. + </description> + </method> + <method name="tablet_set_current_driver"> + <return type="void"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <description> + Set active tablet driver name. + [b]Note:[/b] This method is implemented on Windows. + </description> + </method> <method name="virtual_keyboard_get_height" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index e5401134bf..aa64ab4043 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -16,7 +16,7 @@ return "my.special.plugin" func get_visible_name(): - return "Special Mesh Importer" + return "Special Mesh" func get_recognized_extensions(): return ["special", "spec"] @@ -44,8 +44,7 @@ # Fill the Mesh with data read in "file", left as an exercise to the reader. var filename = save_path + "." + get_save_extension() - ResourceSaver.save(filename, mesh) - return OK + return ResourceSaver.save(filename, mesh) [/gdscript] [csharp] using Godot; @@ -60,7 +59,7 @@ public override String GetVisibleName() { - return "Special Mesh Importer"; + return "Special Mesh"; } public override Godot.Collections.Array GetRecognizedExtensions() @@ -104,8 +103,7 @@ var mesh = new ArrayMesh(); // Fill the Mesh with data read in "file", left as an exercise to the reader. String filename = savePath + "." + GetSaveExtension(); - ResourceSaver.Save(filename, mesh); - return (int)Error.Ok; + return (int)ResourceSaver.Save(filename, mesh); } } [/csharp] @@ -220,7 +218,7 @@ <return type="String"> </return> <description> - Gets the name to display in the import window. + Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh". </description> </method> <method name="import" qualifiers="virtual"> diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index 6f03165a97..d85f95baff 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -10,14 +10,6 @@ <tutorials> </tutorials> <methods> - <method name="refresh"> - <return type="void"> - </return> - <description> - Refreshes the inspector. - [b]Note:[/b] To save on CPU resources, calling this method will do nothing if the time specified in [code]docks/property_editor/auto_refresh_interval[/code] editor setting hasn't passed yet since this method was last called. (By default, this interval is set to 0.3 seconds.) - </description> - </method> </methods> <members> <member name="scroll_horizontal_enabled" type="bool" setter="set_enable_h_scroll" getter="is_h_scroll_enabled" override="true" default="false" /> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index be21ad65c5..a24e4bbdc5 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -169,6 +169,8 @@ <return type="bool"> </return> <description> + This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs. + This method must return a boolean. If this method returns [code]false[/code], the project will not run. The run is aborted immediately, so this also prevents all other plugins' [method build] methods from running. </description> </method> <method name="clear" qualifiers="virtual"> @@ -675,6 +677,10 @@ Emitted when user changes the workspace ([b]2D[/b], [b]3D[/b], [b]Script[/b], [b]AssetLib[/b]). Also works with custom screens defined by plugins. </description> </signal> + <signal name="project_settings_changed"> + <description> + </description> + </signal> <signal name="resource_saved"> <argument index="0" name="resource" type="Resource"> </argument> diff --git a/doc/classes/EditorSceneImporterMesh.xml b/doc/classes/EditorSceneImporterMesh.xml index 1c903bd889..58b7104667 100644 --- a/doc/classes/EditorSceneImporterMesh.xml +++ b/doc/classes/EditorSceneImporterMesh.xml @@ -29,7 +29,7 @@ </argument> <argument index="4" name="material" type="Material" default="null"> </argument> - <argument index="5" name="arg5" type="String" default=""""> + <argument index="5" name="name" type="String" default=""""> </argument> <description> </description> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 6088ae7a43..016d0128eb 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -160,6 +160,16 @@ Returns the default value of the setting specified by [code]name[/code]. This is the value that would be applied when clicking the Revert button in the Editor Settings. </description> </method> + <method name="set_builtin_action_override"> + <return type="void"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="actions_list" type="Array"> + </argument> + <description> + </description> + </method> <method name="set_favorites"> <return type="void"> </return> diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml index 103d95e1d6..b80e81928f 100644 --- a/doc/classes/EditorSyntaxHighlighter.xml +++ b/doc/classes/EditorSyntaxHighlighter.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorSyntaxHighlighter" inherits="SyntaxHighlighter" version="4.0"> <brief_description> + Base Syntax highlighter resource for the [ScriptEditor]. </brief_description> <description> + Base syntax highlighter resource all editor syntax highlighters extend from, it is used in the [ScriptEditor]. + Add a syntax highlighter to an individual script by calling [method ScriptEditorBase.add_syntax_highlighter]. To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter] </description> <tutorials> </tutorials> @@ -11,18 +14,21 @@ <return type="String"> </return> <description> + Virtual method which can be overridden to return the syntax highlighter name. </description> </method> <method name="_get_supported_extentions" qualifiers="virtual"> <return type="Array"> </return> <description> + Virtual method which can be overridden to return the supported file extensions. </description> </method> <method name="_get_supported_languages" qualifiers="virtual"> <return type="Array"> </return> <description> + Virtual method which can be overridden to return the supported language names. </description> </method> </methods> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 9dd4ecc37b..821aa91d21 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -169,6 +169,8 @@ </member> <member name="reflected_light_source" type="int" setter="set_reflection_source" getter="get_reflection_source" enum="Environment.ReflectionSource" default="0"> </member> + <member name="sdfgi_bounce_feedback" type="float" setter="set_sdfgi_bounce_feedback" getter="get_sdfgi_bounce_feedback" default="0.0"> + </member> <member name="sdfgi_cascade0_distance" type="float" setter="set_sdfgi_cascade0_distance" getter="get_sdfgi_cascade0_distance" default="12.8"> </member> <member name="sdfgi_cascades" type="int" setter="set_sdfgi_cascades" getter="get_sdfgi_cascades" enum="Environment.SDFGICascades" default="1"> @@ -187,8 +189,6 @@ </member> <member name="sdfgi_read_sky_light" type="bool" setter="set_sdfgi_read_sky_light" getter="is_sdfgi_reading_sky_light" default="false"> </member> - <member name="sdfgi_use_multi_bounce" type="bool" setter="set_sdfgi_use_multi_bounce" getter="is_sdfgi_using_multi_bounce" default="false"> - </member> <member name="sdfgi_use_occlusion" type="bool" setter="set_sdfgi_use_occlusion" getter="is_sdfgi_using_occlusion" default="false"> </member> <member name="sdfgi_y_scale" type="int" setter="set_sdfgi_y_scale" getter="get_sdfgi_y_scale" enum="Environment.SDFGIYScale" default="0"> @@ -265,12 +265,14 @@ </member> <member name="volumetric_fog_light_energy" type="float" setter="set_volumetric_fog_light_energy" getter="get_volumetric_fog_light_energy" default="1.0"> </member> - <member name="volumetric_fog_shadow_filter" type="int" setter="set_volumetric_fog_shadow_filter" getter="get_volumetric_fog_shadow_filter" enum="Environment.VolumetricFogShadowFilter" default="1"> + <member name="volumetric_fog_temporal_reprojection_amount" type="float" setter="set_volumetric_fog_temporal_reprojection_amount" getter="get_volumetric_fog_temporal_reprojection_amount" default="0.9"> + </member> + <member name="volumetric_fog_temporal_reprojection_enabled" type="bool" setter="set_volumetric_fog_temporal_reprojection_enabled" getter="is_volumetric_fog_temporal_reprojection_enabled" default="true"> </member> </members> <constants> <constant name="BG_CLEAR_COLOR" value="0" enum="BGMode"> - Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/default_clear_color]. + Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/defaults/default_clear_color]. </constant> <constant name="BG_COLOR" value="1" enum="BGMode"> Clears the background using a custom clear color. diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 2f7ac551cf..e0781e807f 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -42,6 +42,7 @@ [/codeblocks] In the example above, the file will be saved in the user data folder as specified in the [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]Data paths[/url] documentation. [b]Note:[/b] To access project resources once exported, it is recommended to use [ResourceLoader] instead of the [File] API, as some files are converted to engine-specific formats and their original source files might not be present in the exported PCK package. + [b]Note:[/b] Files are automatically closed only if the process exits "normally" (such as by clicking the window manager's close button or pressing [b]Alt + F4[/b]). If you stop the project execution by pressing [b]F8[/b] while the project is running, the file won't be closed as the game process will be killed. You can work around this by calling [method flush] at regular intervals. </description> <tutorials> <link title="File system">https://docs.godotengine.org/en/latest/getting_started/step_by_step/filesystem.html</link> @@ -52,7 +53,7 @@ <return type="void"> </return> <description> - Closes the currently opened file. + Closes the currently opened file and prevents subsequent read/write operations. Use [method flush] to persist the data to disk without closing the file. </description> </method> <method name="eof_reached" qualifiers="const"> @@ -73,6 +74,14 @@ [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account. </description> </method> + <method name="flush"> + <return type="void"> + </return> + <description> + Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call [method flush] manually before closing a file using [method close]. Still, calling [method flush] can be used to ensure the data is safe even if the project crashes instead of being closed gracefully. + [b]Note:[/b] Only call [method flush] when you actually need it. Otherwise, it will decrease performance due to constant disk writes. + </description> + </method> <method name="get_16" qualifiers="const"> <return type="int"> </return> @@ -481,8 +490,9 @@ </methods> <members> <member name="endian_swap" type="bool" setter="set_endian_swap" getter="get_endian_swap" default="false"> - If [code]true[/code], the file's endianness is swapped. Use this if you're dealing with files written on big-endian machines. - [b]Note:[/b] This is about the file format, not CPU type. This is always reset to [code]false[/code] whenever you open the file. + If [code]true[/code], the file is read with big-endian [url=https://en.wikipedia.org/wiki/Endianness]endianness[/url]. If [code]false[/code], the file is read with little-endian endianness. If in doubt, leave this to [code]false[/code] as most files are written with little-endian endianness. + [b]Note:[/b] [member endian_swap] is only about the file format, not the CPU type. The CPU endianness doesn't affect the default endianness for files written. + [b]Note:[/b] This is always reset to [code]false[/code] whenever you open the file. Therefore, you must set [member endian_swap] [i]after[/i] opening the file, not before. </member> </members> <constants> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index edd2bd137f..409e405551 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -329,10 +329,10 @@ </methods> <members> <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra spacing at the bottom in pixels. + Extra spacing at the bottom of the line in pixels. </member> <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra character spacing in pixels. + Extra spacing at the top of the line in pixels. </member> </members> <constants> diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml index e2c35f9ce7..6c54af05cd 100644 --- a/doc/classes/FontData.xml +++ b/doc/classes/FontData.xml @@ -11,6 +11,45 @@ <tutorials> </tutorials> <methods> + <method name="bitmap_add_char"> + <return type="void"> + </return> + <argument index="0" name="char" type="int"> + </argument> + <argument index="1" name="texture_idx" type="int"> + </argument> + <argument index="2" name="rect" type="Rect2"> + </argument> + <argument index="3" name="align" type="Vector2"> + </argument> + <argument index="4" name="advance" type="float"> + </argument> + <description> + Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance. + </description> + </method> + <method name="bitmap_add_kerning_pair"> + <return type="void"> + </return> + <argument index="0" name="A" type="int"> + </argument> + <argument index="1" name="B" type="int"> + </argument> + <argument index="2" name="kerning" type="int"> + </argument> + <description> + Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. + </description> + </method> + <method name="bitmap_add_texture"> + <return type="void"> + </return> + <argument index="0" name="texture" type="Texture"> + </argument> + <description> + Adds a texture to the bitmap font. + </description> + </method> <method name="draw_glyph" qualifiers="const"> <return type="Vector2"> </return> @@ -154,6 +193,15 @@ Returns list of script support overrides. </description> </method> + <method name="get_spacing" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="type" type="int"> + </argument> + <description> + Returns the spacing for the given [code]type[/code] (see [enum SpacingType]). + </description> + </method> <method name="get_supported_chars" qualifiers="const"> <return type="String"> </return> @@ -256,6 +304,19 @@ Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size. </description> </method> + <method name="new_bitmap"> + <return type="void"> + </return> + <argument index="0" name="height" type="float"> + </argument> + <argument index="1" name="ascent" type="float"> + </argument> + <argument index="2" name="base_size" type="int"> + </argument> + <description> + Creates new, empty bitmap font. + </description> + </method> <method name="remove_language_support_override"> <return type="void"> </return> @@ -296,6 +357,17 @@ Adds override for [method is_script_supported]. </description> </method> + <method name="set_spacing"> + <return type="void"> + </return> + <argument index="0" name="type" type="int"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size). + </description> + </method> <method name="set_variation"> <return type="void"> </return> @@ -318,6 +390,14 @@ <member name="distance_field_hint" type="bool" setter="set_distance_field_hint" getter="get_distance_field_hint" default="false"> If [code]true[/code], distance field hint is enabled. </member> + <member name="extra_spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0"> + Extra spacing for each glyphs in pixels. + This can be a negative number to make the distance between glyphs smaller. + </member> + <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0"> + Extra spacing for the space character in pixels. + This can be a negative number to make the distance between words smaller. + </member> <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="get_force_autohinter" default="false"> If [code]true[/code], default autohinter is used for font hinting. </member> @@ -326,5 +406,11 @@ </member> </members> <constants> + <constant name="SPACING_GLYPH" value="0" enum="SpacingType"> + Spacing for each glyph. + </constant> + <constant name="SPACING_SPACE" value="1" enum="SpacingType"> + Spacing for the space character. + </constant> </constants> </class> diff --git a/doc/classes/GIProbe.xml b/doc/classes/GIProbe.xml index 52d3698201..dd51248fd9 100644 --- a/doc/classes/GIProbe.xml +++ b/doc/classes/GIProbe.xml @@ -5,7 +5,7 @@ </brief_description> <description> [GIProbe]s are used to provide high-quality real-time indirect light to scenes. They precompute the effect of objects that emit light and the effect of static geometry to simulate the behavior of complex light in real-time. [GIProbe]s need to be baked before using, however, once baked, dynamic objects will receive light from them. Further, lights can be fully dynamic or baked. - Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/quality/gi_probes/quality]. + Having [GIProbe]s in a scene can be expensive, the quality of the probe can be turned down in exchange for better performance in the [ProjectSettings] using [member ProjectSettings.rendering/global_illumination/gi_probes/quality]. </description> <tutorials> <link title="GI probes">https://docs.godotengine.org/en/latest/tutorials/3d/gi_probes.html</link> diff --git a/doc/classes/GLTFSkeleton.xml b/doc/classes/GLTFSkeleton.xml index e27c838648..9680c27705 100644 --- a/doc/classes/GLTFSkeleton.xml +++ b/doc/classes/GLTFSkeleton.xml @@ -10,7 +10,7 @@ <method name="get_bone_attachment"> <return type="BoneAttachment3D"> </return> - <argument index="0" name="arg0" type="int"> + <argument index="0" name="idx" type="int"> </argument> <description> </description> diff --git a/doc/classes/GLTFState.xml b/doc/classes/GLTFState.xml index f7763efdb1..a8e96ec8a9 100644 --- a/doc/classes/GLTFState.xml +++ b/doc/classes/GLTFState.xml @@ -16,7 +16,7 @@ <method name="get_animation_player"> <return type="AnimationPlayer"> </return> - <argument index="0" name="arg0" type="int"> + <argument index="0" name="idx" type="int"> </argument> <description> </description> @@ -24,7 +24,7 @@ <method name="get_animation_players_count"> <return type="int"> </return> - <argument index="0" name="arg0" type="int"> + <argument index="0" name="idx" type="int"> </argument> <description> </description> @@ -80,7 +80,7 @@ <method name="get_scene_node"> <return type="Node"> </return> - <argument index="0" name="arg0" type="int"> + <argument index="0" name="idx" type="int"> </argument> <description> </description> diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index c09151405a..ebe4e3b00d 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -71,7 +71,8 @@ Particle texture. If [code]null[/code], particles will be squares. </member> <member name="visibility_rect" type="Rect2" setter="set_visibility_rect" getter="get_visibility_rect" default="Rect2( -100, -100, 200, 200 )"> - Editor visibility helper. + The [Rect2] that determines the node's region which needs to be visible on screen for the particle system to be active. + Grow the rect if particles suddenly appear/disappear when the node enters/exits the screen. The [Rect2] can be grown via code or with the [b]Particles → Generate Visibility Rect[/b] editor tool. </member> </members> <constants> diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index d1296c3418..aea106af50 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -123,7 +123,8 @@ <member name="sub_emitter" type="NodePath" setter="set_sub_emitter" getter="get_sub_emitter" default="NodePath("")"> </member> <member name="visibility_aabb" type="AABB" setter="set_visibility_aabb" getter="get_visibility_aabb" default="AABB( -4, -4, -4, 8, 8, 8 )"> - The [AABB] that determines the area of the world part of which needs to be visible on screen for the particle system to be active. + The [AABB] that determines the node's region which needs to be visible on screen for the particle system to be active. + Grow the box if particles suddenly appear/disappear when the node enters/exits the screen. The [AABB] can be grown via code or with the [b]Particles → Generate AABB[/b] editor tool. </member> </members> <constants> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 4b0ea4dcb1..279c4c4c94 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -272,6 +272,13 @@ Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]). </description> </signal> + <signal name="slot_updated"> + <argument index="0" name="idx" type="int"> + </argument> + <description> + Emitted when any GraphNode's slot is updated. + </description> + </signal> </signals> <constants> <constant name="OVERLAY_DISABLED" value="0" enum="Overlay"> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index b6594aac39..9ff682f79d 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -175,7 +175,7 @@ var result = new HTTPClient().Request(HTTPClient.Method.Post, "index.php", headers, queryString); [/csharp] [/codeblocks] - [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.http_escape] for an example. + [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example. </description> </method> <method name="request_raw"> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index f2ab93033a..a65f66c72a 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -203,7 +203,7 @@ <description> Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host. - [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.http_escape] for an example. + [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example. </description> </method> <method name="request_raw"> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 3dba5d13aa..bad8127c03 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -12,6 +12,18 @@ <link title="Importing images">https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html</link> </tutorials> <methods> + <method name="adjust_bcs"> + <return type="void"> + </return> + <argument index="0" name="brightness" type="float"> + </argument> + <argument index="1" name="contrast" type="float"> + </argument> + <argument index="2" name="saturation" type="float"> + </argument> + <description> + </description> + </method> <method name="blend_rect"> <return type="void"> </return> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index cfb3e8d981..1f872db6c6 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -59,6 +59,8 @@ </return> <argument index="0" name="action" type="StringName"> </argument> + <argument index="1" name="exact_match" type="bool" default="false"> + </argument> <description> Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use [method get_action_strength] instead. </description> @@ -68,6 +70,8 @@ </return> <argument index="0" name="action" type="StringName"> </argument> + <argument index="1" name="exact_match" type="bool" default="false"> + </argument> <description> Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1. </description> @@ -214,6 +218,8 @@ </return> <argument index="0" name="action" type="StringName"> </argument> + <argument index="1" name="exact_match" type="bool" default="false"> + </argument> <description> Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button. This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed. @@ -224,6 +230,8 @@ </return> <argument index="0" name="action" type="StringName"> </argument> + <argument index="1" name="exact_match" type="bool" default="false"> + </argument> <description> Returns [code]true[/code] when the user stops pressing the action event, meaning it's [code]true[/code] only on the frame that the user released the button. </description> @@ -233,6 +241,8 @@ </return> <argument index="0" name="action" type="StringName"> </argument> + <argument index="1" name="exact_match" type="bool" default="false"> + </argument> <description> Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed. </description> diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index 8c6063bd67..28c4773f51 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -35,6 +35,8 @@ </return> <argument index="0" name="action" type="StringName"> </argument> + <argument index="1" name="exact_match" type="bool" default="false"> + </argument> <description> Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion]. </description> @@ -44,6 +46,8 @@ </return> <argument index="0" name="action" type="StringName"> </argument> + <argument index="1" name="exact_match" type="bool" default="false"> + </argument> <description> Returns [code]true[/code] if this input event matches a pre-defined action of any type. </description> @@ -55,6 +59,8 @@ </argument> <argument index="1" name="allow_echo" type="bool" default="false"> </argument> + <argument index="2" name="exact_match" type="bool" default="false"> + </argument> <description> Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [code]allow_echo[/code] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. </description> @@ -64,6 +70,8 @@ </return> <argument index="0" name="action" type="StringName"> </argument> + <argument index="1" name="exact_match" type="bool" default="false"> + </argument> <description> Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. </description> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 49d29b3a53..0fb18d8e81 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -100,6 +100,8 @@ </argument> <argument index="1" name="action" type="StringName"> </argument> + <argument index="2" name="exact_match" type="bool" default="false"> + </argument> <description> Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. </description> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index 6e5ff83a35..ffeb45907d 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -12,18 +12,18 @@ </tutorials> <methods> <method name="add_icon_item"> - <return type="void"> + <return type="int"> </return> <argument index="0" name="icon" type="Texture2D"> </argument> <argument index="1" name="selectable" type="bool" default="true"> </argument> <description> - Adds an item to the item list with no text, only an icon. + Adds an item to the item list with no text, only an icon. Returns the index of an added item. </description> </method> <method name="add_item"> - <return type="void"> + <return type="int"> </return> <argument index="0" name="text" type="String"> </argument> @@ -32,7 +32,8 @@ <argument index="2" name="selectable" type="bool" default="true"> </argument> <description> - Adds an item to the item list with specified text. Specify an [code]icon[/code], or use [code]null[/code] as the [code]icon[/code] for a list item with no icon. + Adds an item to the item list with specified text. Returns the index of an added item. + Specify an [code]icon[/code], or use [code]null[/code] as the [code]icon[/code] for a list item with no icon. If selectable is [code]true[/code], the list item will be selectable. </description> </method> @@ -614,7 +615,10 @@ <theme_item name="font_color" type="Color" default="Color( 0.63, 0.63, 0.63, 1 )"> Default text [Color] of the item. </theme_item> - <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the item. + </theme_item> + <theme_item name="font_selected_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the item is selected. </theme_item> <theme_item name="font_size" type="int"> @@ -632,6 +636,9 @@ <theme_item name="line_separation" type="int" default="2"> The vertical spacing between each line of text. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the item text outline. + </theme_item> <theme_item name="selected" type="StyleBox"> [StyleBox] for the selected items, used when the [ItemList] is not being focused. </theme_item> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 1edf31de4a..8574ff9836 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -150,12 +150,12 @@ <theme_item name="font_color" type="Color" default="Color( 1, 1, 1, 1 )"> Default text [Color] of the [Label]. </theme_item> - <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )"> - [Color] of the text's shadow effect. - </theme_item> - <theme_item name="font_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> The tint of [Font]'s outline. </theme_item> + <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 0 )"> + [Color] of the text's shadow effect. + </theme_item> <theme_item name="font_size" type="int"> Font size of the [Label]'s text. </theme_item> diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index 6c008e4f7e..111473e098 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -78,7 +78,7 @@ <member name="shadow_enabled" type="bool" setter="set_shadow" getter="has_shadow" default="false"> If [code]true[/code], the light will cast shadows. </member> - <member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="1.0"> + <member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="0.1"> </member> <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="2.0"> Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using [member shadow_bias]. In practice, this value should be tweaked along with [member shadow_bias] to reduce artifacts as much as possible. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index f05121d48c..360f5c451e 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -380,21 +380,27 @@ <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> Default font color. </theme_item> - <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> - Font color for selected text (inside the selection rectangle). + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [LineEdit]. </theme_item> - <theme_item name="font_color_uneditable" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> - Font color when editing is disabled. + <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> + Font color for selected text (inside the selection rectangle). </theme_item> <theme_item name="font_size" type="int"> Font size of the [LineEdit]'s text. </theme_item> - <theme_item name="minimum_spaces" type="int" default="12"> - Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of space characters (i.e. this amount of space characters can be displayed without scrolling). + <theme_item name="font_uneditable_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> + Font color when editing is disabled. + </theme_item> + <theme_item name="minimum_character_width" type="int" default="4"> + Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling). </theme_item> <theme_item name="normal" type="StyleBox"> Default background for the [LineEdit]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="read_only" type="StyleBox"> Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]). </theme_item> diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index 93384843de..6e2f4399b3 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -81,15 +81,21 @@ <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> Default text [Color] of the [LinkButton]. </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> Text [Color] used when the [LinkButton] is being hovered. </theme_item> - <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [LinkButton]. + </theme_item> + <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the [LinkButton] is being pressed. </theme_item> <theme_item name="font_size" type="int"> Font size of the [LinkButton]'s text. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="underline_spacing" type="int" default="2"> The vertical space between the baseline of text and the underline. </theme_item> diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml index 10a7061bef..0d287a5d1d 100644 --- a/doc/classes/Material.xml +++ b/doc/classes/Material.xml @@ -11,6 +11,12 @@ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> + <method name="inspect_native_shader_code"> + <return type="void"> + </return> + <description> + </description> + </method> </methods> <members> <member name="next_pass" type="Material" setter="set_next_pass" getter="get_next_pass"> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index a002ce636b..481b737eee 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -59,13 +59,16 @@ <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> Default text [Color] of the [MenuButton]. </theme_item> - <theme_item name="font_color_disabled" type="Color" default="Color( 1, 1, 1, 0.3 )"> + <theme_item name="font_disabled_color" type="Color" default="Color( 1, 1, 1, 0.3 )"> Text [Color] used when the [MenuButton] is disabled. </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> Text [Color] used when the [MenuButton] is being hovered. </theme_item> - <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [MenuButton]. + </theme_item> + <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the [MenuButton] is being pressed. </theme_item> <theme_item name="font_size" type="int"> @@ -80,6 +83,9 @@ <theme_item name="normal" type="StyleBox"> Default [StyleBox] for the [MenuButton]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="pressed" type="StyleBox"> [StyleBox] used when the [MenuButton] is being pressed. </theme_item> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index fcc259fb44..c168695d61 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -4,9 +4,10 @@ High-level multiplayer API. </brief_description> <description> - This class implements most of the logic behind the high-level multiplayer API. + This class implements most of the logic behind the high-level multiplayer API. See also [NetworkedMultiplayerPeer]. By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene. It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the [member Node.custom_multiplayer] property, effectively allowing to run both client and server in the same scene. + [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. </description> <tutorials> </tutorials> diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/NetworkedMultiplayerPeer.xml index 954d31794a..06ea46f023 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/NetworkedMultiplayerPeer.xml @@ -4,7 +4,8 @@ A high-level network interface to simplify multiplayer interactions. </brief_description> <description> - Manages the connection to network peers. Assigns unique IDs to each client connected to the server. + Manages the connection to network peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI]. + [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. </description> <tutorials> <link title="High-level multiplayer">https://docs.godotengine.org/en/latest/tutorials/networking/high_level_multiplayer.html</link> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index e8913f2623..7ee6860dfc 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -179,7 +179,7 @@ <return type="bool"> </return> <description> - Returns [code]true[/code] if the node can process while the scene tree is paused (see [member pause_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree. + Returns [code]true[/code] if the node can process while the scene tree is paused (see [member process_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree. </description> </method> <method name="duplicate" qualifiers="const"> @@ -245,6 +245,12 @@ Returns an array of references to node's children. </description> </method> + <method name="get_editor_description" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> <method name="get_groups" qualifiers="const"> <return type="Array"> </return> @@ -623,10 +629,11 @@ </return> <argument index="0" name="node" type="Node"> </argument> - <argument index="1" name="keep_data" type="bool" default="false"> + <argument index="1" name="keep_groups" type="bool" default="false"> </argument> <description> Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost. + If [code]keep_groups[/code] is [code]true[/code], the [code]node[/code] is added to the same groups that the replaced node is in. </description> </method> <method name="request_ready"> @@ -756,6 +763,14 @@ Sets the folded state of the node in the Scene dock. </description> </method> + <method name="set_editor_description"> + <return type="void"> + </return> + <argument index="0" name="editor_description" type="String"> + </argument> + <description> + </description> + </method> <method name="set_network_master"> <return type="void"> </return> @@ -867,8 +882,8 @@ <member name="owner" type="Node" setter="set_owner" getter="get_owner"> The node owner. A node can have any other node as owner (as long as it is a valid parent, grandparent, etc. ascending in the tree). When saving a node (using [PackedScene]), all the nodes it owns will be saved with it. This allows for the creation of complex [SceneTree]s, with instancing and subinstancing. </member> - <member name="pause_mode" type="int" setter="set_pause_mode" getter="get_pause_mode" enum="Node.PauseMode" default="0"> - Pause mode. How the node will behave if the [SceneTree] is paused. + <member name="process_mode" type="int" setter="set_process_mode" getter="get_process_mode" enum="Node.ProcessMode" default="0"> + Can be used to pause or unpause the node, or make the node paused based on the [SceneTree], or make it inherit the process mode from its parent (default). </member> <member name="process_priority" type="int" setter="set_process_priority" getter="get_process_priority" default="0"> The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is [i]lower[/i] will have their processing callbacks executed first. @@ -1016,14 +1031,20 @@ <constant name="NOTIFICATION_TEXT_SERVER_CHANGED" value="2018"> Notification received when text server is changed. </constant> - <constant name="PAUSE_MODE_INHERIT" value="0" enum="PauseMode"> - Inherits pause mode from the node's parent. For the root node, it is equivalent to [constant PAUSE_MODE_STOP]. Default. + <constant name="PROCESS_MODE_INHERIT" value="0" enum="ProcessMode"> + Inherits process mode from the node's parent. For the root node, it is equivalent to [constant PROCESS_MODE_PAUSABLE]. Default. + </constant> + <constant name="PROCESS_MODE_PAUSABLE" value="1" enum="ProcessMode"> + Stops processing when the [SceneTree] is paused (process when unpaused). This is the inverse of [constant PROCESS_MODE_WHEN_PAUSED]. + </constant> + <constant name="PROCESS_MODE_WHEN_PAUSED" value="2" enum="ProcessMode"> + Only process when the [SceneTree] is paused (don't process when unpaused). This is the inverse of [constant PROCESS_MODE_PAUSABLE]. </constant> - <constant name="PAUSE_MODE_STOP" value="1" enum="PauseMode"> - Stops processing when the [SceneTree] is paused. + <constant name="PROCESS_MODE_ALWAYS" value="3" enum="ProcessMode"> + Always process. Continue processing always, ignoring the [SceneTree]'s paused property. This is the inverse of [constant PROCESS_MODE_DISABLED]. </constant> - <constant name="PAUSE_MODE_PROCESS" value="2" enum="PauseMode"> - Continue to process regardless of the [SceneTree] pause state. + <constant name="PROCESS_MODE_DISABLED" value="4" enum="ProcessMode"> + Never process. Completely disables processing, ignoring the [SceneTree]'s paused property. This is the inverse of [constant PROCESS_MODE_ALWAYS]. </constant> <constant name="DUPLICATE_SIGNALS" value="1" enum="DuplicateFlags"> Duplicate the node's signals. diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index fe3a9c5d39..5c29c0d48f 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -103,7 +103,7 @@ </return> <argument index="0" name="target" type="Vector3"> </argument> - <argument index="1" name="up" type="Vector3"> + <argument index="1" name="up" type="Vector3" default="Vector3( 0, 1, 0 )"> </argument> <description> Rotates itself so that the local -Z axis points towards the [code]target[/code] position. @@ -118,7 +118,7 @@ </argument> <argument index="1" name="target" type="Vector3"> </argument> - <argument index="2" name="up" type="Vector3"> + <argument index="2" name="up" type="Vector3" default="Vector3( 0, 1, 0 )"> </argument> <description> Moves the node to the specified [code]position[/code], and then rotates itself to point toward the [code]target[/code] as per [method look_at]. Operations take place in global space. @@ -229,7 +229,7 @@ <argument index="0" name="enable" type="bool"> </argument> <description> - Sets whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default. + Sets whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default, unless it is in the editor context and it has a valid gizmo. </description> </method> <method name="show"> @@ -324,7 +324,7 @@ <constants> <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000"> Node3D nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform. - In order for [constant NOTIFICATION_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_transform]. + In order for [constant NOTIFICATION_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_transform]. The notification is also sent if the node is in the editor context and it has a valid gizmo. </constant> <constant name="NOTIFICATION_ENTER_WORLD" value="41"> Node3D nodes receives this notification when they are registered to new [World3D] resource. diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 65a815a603..057a2b8d1a 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -25,13 +25,36 @@ [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> + <method name="create_process"> + <return type="int"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="arguments" type="PackedStringArray"> + </argument> + <description> + Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. + If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code]. + For example, running another instance of the project: + [codeblocks] + [gdscript] + var pid = OS.create_process(OS.get_executable_path(), []) + [/gdscript] + [csharp] + var pid = OS.CreateProcess(OS.GetExecutablePath(), new string[] {}); + [/csharp] + [/codeblocks] + See [method execute] if you wish to run an external command and retrieve the results. + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. + </description> + </method> <method name="delay_msec" qualifiers="const"> <return type="void"> </return> <argument index="0" name="msec" type="int"> </argument> <description> - Delay execution of the current thread by [code]msec[/code] milliseconds. + Delay execution of the current thread by [code]msec[/code] milliseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message. </description> </method> <method name="delay_usec" qualifiers="const"> @@ -40,7 +63,7 @@ <argument index="0" name="usec" type="int"> </argument> <description> - Delay execution of the current thread by [code]usec[/code] microseconds. + Delay execution of the current thread by [code]usec[/code] microseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message. </description> </method> <method name="dump_memory_to_file"> @@ -71,48 +94,34 @@ </argument> <argument index="1" name="arguments" type="PackedStringArray"> </argument> - <argument index="2" name="blocking" type="bool" default="true"> - </argument> - <argument index="3" name="output" type="Array" default="[ ]"> + <argument index="2" name="output" type="Array" default="[ ]"> </argument> - <argument index="4" name="read_stderr" type="bool" default="false"> + <argument index="3" name="read_stderr" type="bool" default="false"> </argument> <description> - Execute the file at the given path with the arguments passed as an array of strings. Platform path resolution will take place. The resolved file must exist and be executable. - The arguments are used in the given order and separated by a space, so [code]OS.execute("ping", ["-w", "3", "godotengine.org"], false)[/code] will resolve to [code]ping -w 3 godotengine.org[/code] in the system's shell. - This method has slightly different behavior based on whether the [code]blocking[/code] mode is enabled. - If [code]blocking[/code] is [code]true[/code], the Godot thread will pause its execution while waiting for the process to terminate. The shell output of the process will be written to the [code]output[/code] array as a single string. When the process terminates, the Godot thread will resume execution. - If [code]blocking[/code] is [code]false[/code], the Godot thread will continue while the new process runs. It is not possible to retrieve the shell output in non-blocking mode, so [code]output[/code] will be empty. - The return value also depends on the blocking mode. When blocking, the method will return an exit code of the process. When non-blocking, the method returns a process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process forking (non-blocking) or opening (blocking) fails, the method will return [code]-1[/code] or another exit code. - Example of blocking mode and retrieving the shell output: + Executes a command. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. If an [code]output[/code] [Array] is provided, the complete shell output of the process will be appended as a single [String] element in [code]output[/code]. If [code]read_stderr[/code] is [code]true[/code], the output to the standard error stream will be included too. + If the command is successfully executed, the method will return the exit code of the command, or [code]-1[/code] if it fails. + [b]Note:[/b] The Godot thread will pause its execution until the executed command terminates. Use [Thread] to create a separate thread that will not pause the Godot thread, or use [method create_process] to create a completely independent process. + For example, to retrieve a list of the working directory's contents: [codeblocks] [gdscript] var output = [] - var exit_code = OS.execute("ls", ["-l", "/tmp"], true, output) + var exit_code = OS.execute("ls", ["-l", "/tmp"], output) [/gdscript] [csharp] var output = new Godot.Collections.Array(); - int exitCode = OS.Execute("ls", new string[] {"-l", "/tmp"}, true, output); - [/csharp] - [/codeblocks] - Example of non-blocking mode, running another instance of the project and storing its process ID: - [codeblocks] - [gdscript] - var pid = OS.execute(OS.get_executable_path(), [], false) - [/gdscript] - [csharp] - var pid = OS.Execute(OS.GetExecutablePath(), new string[] {}, false); + int exitCode = OS.Execute("ls", new string[] {"-l", "/tmp"}, output); [/csharp] [/codeblocks] - If you wish to access a shell built-in or perform a composite command, a platform-specific shell can be invoked. For example: + To execute a composite command, a platform-specific shell can be invoked. For example: [codeblocks] [gdscript] var output = [] - OS.execute("CMD.exe", ["/C", "cd %TEMP% && dir"], true, output) + OS.execute("CMD.exe", ["/C", "cd %TEMP% && dir"], output) [/gdscript] [csharp] var output = new Godot.Collections.Array(); - OS.Execute("CMD.exe", new string[] {"/C", "cd %TEMP% && dir"}, true, output); + OS.Execute("CMD.exe", new string[] {"/C", "cd %TEMP% && dir"}, output); [/csharp] [/codeblocks] [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. @@ -198,10 +207,11 @@ <method name="get_environment" qualifiers="const"> <return type="String"> </return> - <argument index="0" name="environment" type="String"> + <argument index="0" name="variable" type="String"> </argument> <description> - Returns an environment variable. + Returns the value of an environment variable. Returns an empty string if the environment variable doesn't exist. + [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> <method name="get_executable_path" qualifiers="const"> @@ -295,22 +305,12 @@ [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. </description> </method> - <method name="get_tablet_driver_count" qualifiers="const"> + <method name="get_thread_caller_id" qualifiers="const"> <return type="int"> </return> <description> - Returns the total number of available tablet drivers. - [b]Note:[/b] This method is implemented on Windows. - </description> - </method> - <method name="get_tablet_driver_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - Returns the tablet driver name for the given index. - [b]Note:[/b] This method is implemented on Windows. + Returns the ID of the current thread. This can be used in logs to ease debugging of multi-threaded applications. + [b]Note:[/b] Thread IDs are not deterministic and may be reused across application restarts. </description> </method> <method name="get_ticks_msec" qualifiers="const"> @@ -384,10 +384,11 @@ <method name="has_environment" qualifiers="const"> <return type="bool"> </return> - <argument index="0" name="environment" type="String"> + <argument index="0" name="variable" type="String"> </argument> <description> - Returns [code]true[/code] if an environment variable exists. + Returns [code]true[/code] if the environment variable with the name [code]variable[/code] exists. + [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> <method name="has_feature" qualifiers="const"> @@ -502,6 +503,18 @@ [b]Note:[/b] This method is implemented on Android. </description> </method> + <method name="set_environment" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="variable" type="String"> + </argument> + <argument index="1" name="value" type="String"> + </argument> + <description> + Sets the value of the environment variable [code]variable[/code] to [code]value[/code]. The environment variable will be set for the Godot process and any process executed with [method execute] after running [method set_environment]. The environment variable will [i]not[/i] persist to processes run after the Godot process was terminated. + [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. + </description> + </method> <method name="set_thread_name"> <return type="int" enum="Error"> </return> @@ -536,19 +549,12 @@ </method> </methods> <members> - <member name="exit_code" type="int" setter="set_exit_code" getter="get_exit_code" default="0"> - The exit code passed to the OS when the main loop exits. By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive). - [b]Note:[/b] This value will be ignored if using [method SceneTree.quit] with an [code]exit_code[/code] argument passed. - </member> <member name="low_processor_usage_mode" type="bool" setter="set_low_processor_usage_mode" getter="is_in_low_processor_usage_mode" default="false"> If [code]true[/code], the engine optimizes for low processor usage by only refreshing the screen if needed. Can improve battery consumption on mobile. </member> <member name="low_processor_usage_mode_sleep_usec" type="int" setter="set_low_processor_usage_mode_sleep_usec" getter="get_low_processor_usage_mode_sleep_usec" default="6900"> The amount of sleeping between frames when the low-processor usage mode is enabled (in microseconds). Higher values will result in lower CPU usage. </member> - <member name="tablet_driver" type="String" setter="set_current_tablet_driver" getter="get_current_tablet_driver" default=""""> - The current tablet driver in use. - </member> </members> <constants> <constant name="VIDEO_DRIVER_GLES2" value="0" enum="VideoDriver"> diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 6ff7e34194..ad3ce8e93e 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -10,11 +10,20 @@ Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory. Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them. Property membership can be tested directly in GDScript using [code]in[/code]: - [codeblock] + [codeblocks] + [gdscript] var n = Node2D.new() print("position" in n) # Prints "True". print("other_property" in n) # Prints "False". - [/codeblock] + [/gdscript] + [csharp] + var node = new Node2D(); + // C# has no direct equivalent to GDScript's `in` operator here, but we + // can achieve the same behavior by performing `Get` with a null check. + GD.Print(node.Get("position") != null); // Prints "True". + GD.Print(node.Get("other_property") != null); // Prints "False". + [/csharp] + [/codeblocks] The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code]. Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification]. [b]Note:[/b] Unlike references to a [Reference], references to an Object stored in a variable can become invalid without warning. Therefore, it's recommended to use [Reference] for data classes instead of [Object]. @@ -96,9 +105,16 @@ </argument> <description> Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: - [codeblock] - call("set", "position", Vector2(42.0, 0.0)) - [/codeblock] + [codeblocks] + [gdscript] + var node = Node2D.new() + node.call("set", "position", Vector2(42, 0)) + [/gdscript] + [csharp] + var node = new Node2D(); + node.Call("set", "position", new Vector2(42, 0)); + [/csharp] + [/codeblocks] [b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase). </description> </method> @@ -109,9 +125,16 @@ </argument> <description> Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: - [codeblock] - call_deferred("set", "position", Vector2(42.0, 0.0)) - [/codeblock] + [codeblocks] + [gdscript] + var node = Node2D.new() + node.call_deferred("set", "position", Vector2(42, 0)) + [/gdscript] + [csharp] + var node = new Node2D(); + node.CallDeferred("set", "position", new Vector2(42, 0)); + [/csharp] + [/codeblocks] [b]Note:[/b] In C#, the method name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined methods where you should use the same convention as in the C# source (typically PascalCase). </description> </method> @@ -124,9 +147,16 @@ </argument> <description> Calls the [code]method[/code] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array]. - [codeblock] - callv("set", [ "position", Vector2(42.0, 0.0) ]) - [/codeblock] + [codeblocks] + [gdscript] + var node = Node2D.new() + node.callv("set", ["position", Vector2(42, 0)]) + [/gdscript] + [csharp] + var node = new Node2D(); + node.Callv("set", new Godot.Collections.Array { "position", new Vector2(42, 0) }); + [/csharp] + [/codeblocks] </description> </method> <method name="can_translate_messages" qualifiers="const"> @@ -148,23 +178,140 @@ <argument index="3" name="flags" type="int" default="0"> </argument> <description> - [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. - Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. - A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. - If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost. - Examples: - [codeblock] - connect("pressed", self, "_on_Button_pressed") # BaseButton signal - connect("text_entered", self, "_on_LineEdit_text_entered") # LineEdit signal - connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # User-defined signal - [/codeblock] - An example of the relationship between [code]binds[/code] passed to [method connect] and parameters used when calling [method emit_signal]: - [codeblock] - connect("hit", self, "_on_Player_hit", [ weapon_type, damage ]) # weapon_type and damage are passed last - emit_signal("hit", "Dark lord", 5) # "Dark lord" and 5 are passed first - func _on_Player_hit(hit_by, level, weapon_type, damage): - print("Hit by %s (lvl %d) with weapon %s for %d damage" % [hit_by, level, weapon_type, damage]) - [/codeblock] + Connects a [code]signal[/code] to a [code]callable[/code]. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the [Callable]'s method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. + [b]Note:[/b] This method is the legacy implementation for connecting signals. The recommend modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below. + A signal can only be connected once to a [Callable]. It will throw an error if already connected, unless the signal was connected with [constant CONNECT_REFERENCE_COUNTED]. To avoid this, first, use [method is_connected] to check for existing connections. + If the callable's target is destroyed in the game's lifecycle, the connection will be lost. + [b]Examples with recommended syntax:[/b] + Connecting signals is one of the most common operations in Godot and the API gives many options to do so, which are described further down. The code block below shows the recommended approach for both GDScript and C#. + [codeblocks] + [gdscript] + func _ready(): + var button = Button.new() + # `button_down` here is a Signal object, and we thus call the Signal.connect() method, + # not Object.connect(). See discussion below for a more in-depth overview of the API. + button.button_down.connect(_on_button_down) + + # This assumes that a `Player` class exists which defines a `hit` signal. + var player = Player.new() + # We use Signal.connect() again, and we also use the Callable.bind() method which + # returns a new Callable with the parameter binds. + player.hit.connect(_on_player_hit.bind("sword", 100)) + + func _on_button_down(): + print("Button down!") + + func _on_player_hit(weapon_type, damage): + print("Hit with weapon %s for %d damage." % [weapon_type, damage]) + [/gdscript] + [csharp] + public override void _Ready() + { + var button = new Button(); + // C# supports passing signals as events, so we can use this idiomatic construct: + button.ButtonDown += OnButtonDown; + + // This assumes that a `Player` class exists which defines a `Hit` signal. + var player = new Player(); + // Signals as events (`player.Hit += OnPlayerHit;`) do not support argument binding. You have to use: + player.Hit.Connect(OnPlayerHit, new Godot.Collections.Array {"sword", 100 }); + } + + private void OnButtonDown() + { + GD.Print("Button down!"); + } + + private void OnPlayerHit(string weaponType, int damage) + { + GD.Print(String.Format("Hit with weapon {0} for {1} damage.", weaponType, damage)); + } + [/csharp] + [/codeblocks] + [b][code]Object.connect()[/code] or [code]Signal.connect()[/code]?[/b] + As seen above, the recommended method to connect signals is not [method Object.connect]. The code block below shows the four options for connecting signals, using either this legacy method or the recommended [method Signal.connect], and using either an implicit [Callable] or a manually defined one. + [codeblocks] + [gdscript] + func _ready(): + var button = Button.new() + # Option 1: Object.connect() with an implicit Callable for the defined function. + button.connect("button_down", _on_button_down) + # Option 2: Object.connect() with a constructed Callable using a target object and method name. + button.connect("button_down", Callable(self, "_on_button_down")) + # Option 3: Signal.connect() with an implicit Callable for the defined function. + button.button_down.connect(_on_button_down) + # Option 4: Signal.connect() with a constructed Callable using a target object and method name. + button.button_down.connect(Callable(self, "_on_button_down")) + + func _on_button_down(): + print("Button down!") + [/gdscript] + [csharp] + public override void _Ready() + { + var button = new Button(); + // Option 1: Object.Connect() with an implicit Callable for the defined function. + button.Connect("button_down", OnButtonDown); + // Option 2: Object.connect() with a constructed Callable using a target object and method name. + button.Connect("button_down", new Callable(self, nameof(OnButtonDown))); + // Option 3: Signal.connect() with an implicit Callable for the defined function. + button.ButtonDown.Connect(OnButtonDown); + // Option 3b: In C#, we can use signals as events and connect with this more idiomatic syntax: + button.ButtonDown += OnButtonDown; + // Option 4: Signal.connect() with a constructed Callable using a target object and method name. + button.ButtonDown.Connect(new Callable(self, nameof(OnButtonDown))); + } + + private void OnButtonDown() + { + GD.Print("Button down!"); + } + [/csharp] + [/codeblocks] + While all options have the same outcome ([code]button[/code]'s [signal BaseButton.button_down] signal will be connected to [code]_on_button_down[/code]), option 3 offers the best validation: it will throw a compile-time error if either the [code]button_down[/code] signal or the [code]_on_button_down[/code] callable are undefined. On the other hand, option 2 only relies on string names and will only be able to validate either names at runtime: it will throw a runtime error if [code]"button_down"[/code] doesn't correspond to a signal, or if [code]"_on_button_down"[/code] is not a registered method in the object [code]self[/code]. The main reason for using options 1, 2, or 4 would be if you actually need to use strings (e.g. to connect signals programmatically based on strings read from a configuration file). Otherwise, option 3 is the recommended (and fastest) method. + [b]Parameter bindings and passing:[/b] + For legacy or language-specific reasons, there are also several ways to bind parameters to signals. One can pass a [code]binds[/code] [Array] to [method Object.connect] or [method Signal.connect], or use the recommended [method Callable.bind] method to create a new callable from an existing one, with the given parameter binds. + One can also pass additional parameters when emitting the signal with [method emit_signal]. The examples below show the relationship between those two types of parameters. + [codeblocks] + [gdscript] + func _ready(): + # This assumes that a `Player` class exists which defines a `hit` signal. + var player = Player.new() + # Option 1: Using Callable.bind(). + player.hit.connect(_on_player_hit.bind("sword", 100)) + # Option 2: Using a `binds` Array in Signal.connect() (same syntax for Object.connect()). + player.hit.connect(_on_player_hit, ["sword", 100]) + + # Parameters added when emitting the signal are passed first. + player.emit_signal("hit", "Dark lord", 5) + + # Four arguments, since we pass two when emitting (hit_by, level) + # and two when connecting (weapon_type, damage). + func _on_player_hit(hit_by, level, weapon_type, damage): + print("Hit by %s (level %d) with weapon %s for %d damage." % [hit_by, level, weapon_type, damage]) + [/gdscript] + [csharp] + public override void _Ready() + { + // This assumes that a `Player` class exists which defines a `Hit` signal. + var player = new Player(); + // Option 1: Using Callable.Bind(). This way we can still use signals as events. + player.Hit += OnPlayerHit.Bind("sword", 100); + // Option 2: Using a `binds` Array in Signal.Connect() (same syntax for Object.Connect()). + player.Hit.Connect(OnPlayerHit, new Godot.Collections.Array{ "sword", 100 }); + + // Parameters added when emitting the signal are passed first. + player.EmitSignal("hit", "Dark lord", 5); + } + + // Four arguments, since we pass two when emitting (hitBy, level) + // and two when connecting (weaponType, damage). + private void OnPlayerHit(string hitBy, int level, string weaponType, int damage) + { + GD.Print(String.Format("Hit by {0} (level {1}) with weapon {2} for {3} damage.", hitBy, level, weaponType, damage)); + } + [/csharp] + [/codeblocks] </description> </method> <method name="disconnect"> @@ -175,8 +322,7 @@ <argument index="1" name="callable" type="Callable"> </argument> <description> - [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. - Disconnects a [code]signal[/code] from a [code]method[/code] on the given [code]target[/code]. + Disconnects a [code]signal[/code] from a given [code]callable[/code]. If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists. </description> </method> @@ -187,10 +333,16 @@ </argument> <description> Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: - [codeblock] - emit_signal("hit", weapon_type, damage) + [codeblocks] + [gdscript] + emit_signal("hit", "sword", 100) emit_signal("game_over") - [/codeblock] + [/gdscript] + [csharp] + EmitSignal("hit", "sword", 100); + EmitSignal("game_over"); + [/csharp] + [/codeblocks] </description> </method> <method name="free"> @@ -359,8 +511,7 @@ <argument index="1" name="callable" type="Callable"> </argument> <description> - [b]FIXME:[/b] The syntax changed with the addition of [Callable], this should be updated. - Returns [code]true[/code] if a connection exists for a given [code]signal[/code], [code]target[/code], and [code]method[/code]. + Returns [code]true[/code] if a connection exists for a given [code]signal[/code] and [code]callable[/code]. </description> </method> <method name="is_queued_for_deletion" qualifiers="const"> @@ -382,11 +533,11 @@ If [code]reversed[/code] is [code]true[/code], [method _notification] is called first on the object's own class, and then up to its successive parent classes. If [code]reversed[/code] is [code]false[/code], [method _notification] is called first on the highest ancestor ([Object] itself), and then down to its successive inheriting classes. </description> </method> - <method name="property_list_changed_notify"> + <method name="notify_property_list_changed"> <return type="void"> </return> <description> - Notify the editor that the property list has changed, so that editor plugins can take the new values into account. Does nothing on export builds. + Notify the editor that the property list has changed by emitting the [signal property_list_changed] signal, so that editor plugins can take the new values into account. </description> </method> <method name="remove_meta"> @@ -440,11 +591,20 @@ </argument> <description> Assigns a new value to the property identified by the [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Example: - [codeblock] - set_indexed("position", Vector2(42, 0)) - set_indexed("position:y", -10) - print(position) # (42, -10) - [/codeblock] + [codeblocks] + [gdscript] + var node = Node2D.new() + node.set_indexed("position", Vector2(42, 0)) + node.set_indexed("position:y", -10) + print(node.position) # (42, -10) + [/gdscript] + [csharp] + var node = new Node2D(); + node.SetIndexed("position", new Vector2(42, 0)); + node.SetIndexed("position:y", -10); + GD.Print(node.Position); // (42, -10) + [/csharp] + [/codeblocks] </description> </method> <method name="set_message_translation"> @@ -520,6 +680,10 @@ </method> </methods> <signals> + <signal name="property_list_changed"> + <description> + </description> + </signal> <signal name="script_changed"> <description> Emitted whenever the object's script is changed. diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 53309bae96..52da08c02f 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -253,13 +253,16 @@ <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> Default text [Color] of the [OptionButton]. </theme_item> - <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> Text [Color] used when the [OptionButton] is disabled. </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> Text [Color] used when the [OptionButton] is being hovered. </theme_item> - <theme_item name="font_color_pressed" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [OptionButton]. + </theme_item> + <theme_item name="font_pressed_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the [OptionButton] is being pressed. </theme_item> <theme_item name="font_size" type="int"> @@ -280,6 +283,9 @@ <theme_item name="normal_mirrored" type="StyleBox"> Default [StyleBox] for the [OptionButton] (for right-to-left layouts). </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="pressed" type="StyleBox"> [StyleBox] used when the [OptionButton] is being pressed (for left-to-right layouts). </theme_item> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index d15bcfd114..1d9be7f165 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -5,7 +5,7 @@ </brief_description> <description> A simplified interface to a scene file. Provides access to operations and checks that can be performed on the scene resource itself. - Can be used to save a node to a file. When saving, the node as well as all the node it owns get saved (see [code]owner[/code] property on [Node]). + Can be used to save a node to a file. When saving, the node as well as all the nodes it owns get saved (see [code]owner[/code] property on [Node]). [b]Note:[/b] The node doesn't need to own itself. [b]Example of loading a saved scene:[/b] [codeblocks] diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml index c26cf0514c..b6f95305ed 100644 --- a/doc/classes/PhysicsDirectSpaceState2D.xml +++ b/doc/classes/PhysicsDirectSpaceState2D.xml @@ -16,8 +16,9 @@ <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D"> </argument> <description> - Checks how far the shape can travel toward a point. If the shape can not move, the array will be empty. - [b]Note:[/b] Both the shape and the motion are supplied through a [PhysicsShapeQueryParameters2D] object. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. + Checks how far a [Shape2D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [PhysicsShapeQueryParameters2D] object. + Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [code][1.0, 1.0][/code] will be returned. + [b]Note:[/b] Any [Shape2D]s that the shape is already colliding with e.g. inside of, will be ignored. Use [method collide_shape] to determine the [Shape2D]s that the shape is already colliding with. </description> </method> <method name="collide_shape"> diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml index 789e8cc731..243d071c56 100644 --- a/doc/classes/PhysicsDirectSpaceState3D.xml +++ b/doc/classes/PhysicsDirectSpaceState3D.xml @@ -18,8 +18,9 @@ <argument index="1" name="motion" type="Vector3"> </argument> <description> - Checks whether the shape can travel to a point. The method will return an array with two floats between 0 and 1, both representing a fraction of [code]motion[/code]. The first is how far the shape can move without triggering a collision, and the second is the point at which a collision will occur. If no collision is detected, the returned array will be [code][1, 1][/code]. - If the shape can not move, the returned array will be [code][0, 0][/code] under Bullet, and empty under GodotPhysics3D. + Checks how far a [Shape3D] can move without colliding. All the parameters for the query, including the shape, are supplied through a [PhysicsShapeQueryParameters3D] object. + Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [code][1.0, 1.0][/code] will be returned. + [b]Note:[/b] Any [Shape3D]s that the shape is already colliding with e.g. inside of, will be ignored. Use [method collide_shape] to determine the [Shape3D]s that the shape is already colliding with. </description> </method> <method name="collide_shape"> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index 6a1508b0e3..1fa82adb7a 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -850,21 +850,6 @@ <description> </description> </method> - <method name="damped_spring_joint_create"> - <return type="RID"> - </return> - <argument index="0" name="anchor_a" type="Vector2"> - </argument> - <argument index="1" name="anchor_b" type="Vector2"> - </argument> - <argument index="2" name="body_a" type="RID"> - </argument> - <argument index="3" name="body_b" type="RID"> - </argument> - <description> - Creates a damped spring joint between two bodies. If not specified, the second body is assumed to be the joint itself. - </description> - </method> <method name="damped_spring_joint_get_param" qualifiers="const"> <return type="float"> </return> @@ -907,21 +892,18 @@ Returns information about the current state of the 2D physics engine. See [enum ProcessInfo] for a list of available states. </description> </method> - <method name="groove_joint_create"> - <return type="RID"> + <method name="joint_clear"> + <return type="void"> </return> - <argument index="0" name="groove1_a" type="Vector2"> - </argument> - <argument index="1" name="groove2_a" type="Vector2"> - </argument> - <argument index="2" name="anchor_b" type="Vector2"> - </argument> - <argument index="3" name="body_a" type="RID"> - </argument> - <argument index="4" name="body_b" type="RID"> + <argument index="0" name="joint" type="RID"> </argument> <description> - Creates a groove joint between two bodies. If not specified, the bodies are assumed to be the joint itself. + </description> + </method> + <method name="joint_create"> + <return type="RID"> + </return> + <description> </description> </method> <method name="joint_get_param" qualifiers="const"> @@ -944,36 +926,71 @@ Returns a joint's type (see [enum JointType]). </description> </method> - <method name="joint_set_param"> + <method name="joint_make_damped_spring"> <return type="void"> </return> <argument index="0" name="joint" type="RID"> </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam"> + <argument index="1" name="anchor_a" type="Vector2"> </argument> - <argument index="2" name="value" type="float"> + <argument index="2" name="anchor_b" type="Vector2"> + </argument> + <argument index="3" name="body_a" type="RID"> + </argument> + <argument index="4" name="body_b" type="RID"> </argument> <description> - Sets a joint parameter. See [enum JointParam] for a list of available parameters. </description> </method> - <method name="line_shape_create"> - <return type="RID"> + <method name="joint_make_groove"> + <return type="void"> </return> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="groove1_a" type="Vector2"> + </argument> + <argument index="2" name="groove2_a" type="Vector2"> + </argument> + <argument index="3" name="anchor_b" type="Vector2"> + </argument> + <argument index="4" name="body_a" type="RID"> + </argument> + <argument index="5" name="body_b" type="RID"> + </argument> <description> </description> </method> - <method name="pin_joint_create"> - <return type="RID"> + <method name="joint_make_pin"> + <return type="void"> </return> - <argument index="0" name="anchor" type="Vector2"> + <argument index="0" name="joint" type="RID"> </argument> - <argument index="1" name="body_a" type="RID"> + <argument index="1" name="anchor" type="Vector2"> </argument> - <argument index="2" name="body_b" type="RID"> + <argument index="2" name="body_a" type="RID"> + </argument> + <argument index="3" name="body_b" type="RID"> </argument> <description> - Creates a pin joint between two bodies. If not specified, the second body is assumed to be the joint itself. + </description> + </method> + <method name="joint_set_param"> + <return type="void"> + </return> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam"> + </argument> + <argument index="2" name="value" type="float"> + </argument> + <description> + Sets a joint parameter. See [enum JointParam] for a list of available parameters. + </description> + </method> + <method name="line_shape_create"> + <return type="RID"> + </return> + <description> </description> </method> <method name="ray_shape_create"> @@ -1233,15 +1250,18 @@ <constant name="BODY_STATE_CAN_SLEEP" value="4" enum="BodyState"> Constant to set/get whether the body can sleep. </constant> - <constant name="JOINT_PIN" value="0" enum="JointType"> + <constant name="JOINT_TYPE_PIN" value="0" enum="JointType"> Constant to create pin joints. </constant> - <constant name="JOINT_GROOVE" value="1" enum="JointType"> + <constant name="JOINT_TYPE_GROOVE" value="1" enum="JointType"> Constant to create groove joints. </constant> - <constant name="JOINT_DAMPED_SPRING" value="2" enum="JointType"> + <constant name="JOINT_TYPE_DAMPED_SPRING" value="2" enum="JointType"> Constant to create damped spring joints. </constant> + <constant name="JOINT_TYPE_MAX" value="3" enum="JointType"> + Represents the size of the [enum JointType] enum. + </constant> <constant name="JOINT_PARAM_BIAS" value="0" enum="JointParam"> </constant> <constant name="JOINT_PARAM_MAX_BIAS" value="1" enum="JointParam"> diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 5fd3ef5db2..9a7926e937 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -129,15 +129,6 @@ Returns the transform matrix for an area. </description> </method> - <method name="area_is_ray_pickable" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <description> - If [code]true[/code], area collides with rays. - </description> - </method> <method name="area_remove_shape"> <return type="void"> </return> @@ -421,12 +412,7 @@ <method name="body_create"> <return type="RID"> </return> - <argument index="0" name="mode" type="int" enum="PhysicsServer3D.BodyMode" default="2"> - </argument> - <argument index="1" name="init_sleeping" type="bool" default="false"> - </argument> <description> - Creates a physics body. The first parameter can be any value from [enum BodyMode] constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. </description> </method> <method name="body_get_collision_layer" qualifiers="const"> @@ -582,15 +568,6 @@ Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). </description> </method> - <method name="body_is_ray_pickable" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <description> - If [code]true[/code], the body can be detected by rays. - </description> - </method> <method name="body_remove_collision_exception"> <return type="void"> </return> @@ -815,6 +792,24 @@ Sets a body state (see [enum BodyState] constants). </description> </method> + <method name="box_shape_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="capsule_shape_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="concave_polygon_shape_create"> + <return type="RID"> + </return> + <description> + </description> + </method> <method name="cone_twist_joint_get_param" qualifiers="const"> <return type="float"> </return> @@ -839,6 +834,24 @@ Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). </description> </method> + <method name="convex_polygon_shape_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="custom_shape_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="cylinder_shape_create"> + <return type="RID"> + </return> + <description> + </description> + </method> <method name="free_rid"> <return type="void"> </return> @@ -848,7 +861,7 @@ Destroys any of the objects created by PhysicsServer3D. If the [RID] passed is not one of the objects that can be created by PhysicsServer3D, an error will be sent to the console. </description> </method> - <method name="generic_6dof_joint_get_flag"> + <method name="generic_6dof_joint_get_flag" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="joint" type="RID"> @@ -861,7 +874,7 @@ Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). </description> </method> - <method name="generic_6dof_joint_get_param"> + <method name="generic_6dof_joint_get_param" qualifiers="const"> <return type="float"> </return> <argument index="0" name="joint" type="RID"> @@ -913,6 +926,12 @@ Returns an Info defined by the [enum ProcessInfo] input given. </description> </method> + <method name="heightmap_shape_create"> + <return type="RID"> + </return> + <description> + </description> + </method> <method name="hinge_joint_get_flag" qualifiers="const"> <return type="bool"> </return> @@ -961,97 +980,116 @@ Sets a hinge_joint parameter (see [enum HingeJointParam] constants). </description> </method> - <method name="joint_create_cone_twist"> - <return type="RID"> + <method name="joint_clear"> + <return type="void"> </return> - <argument index="0" name="body_A" type="RID"> - </argument> - <argument index="1" name="local_ref_A" type="Transform"> - </argument> - <argument index="2" name="body_B" type="RID"> - </argument> - <argument index="3" name="local_ref_B" type="Transform"> + <argument index="0" name="joint" type="RID"> </argument> <description> - Creates a [ConeTwistJoint3D]. </description> </method> - <method name="joint_create_generic_6dof"> + <method name="joint_create"> <return type="RID"> </return> - <argument index="0" name="body_A" type="RID"> - </argument> - <argument index="1" name="local_ref_A" type="Transform"> - </argument> - <argument index="2" name="body_B" type="RID"> + <description> + </description> + </method> + <method name="joint_get_solver_priority" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="joint" type="RID"> </argument> - <argument index="3" name="local_ref_B" type="Transform"> + <description> + Gets the priority value of the Joint3D. + </description> + </method> + <method name="joint_get_type" qualifiers="const"> + <return type="int" enum="PhysicsServer3D.JointType"> + </return> + <argument index="0" name="joint" type="RID"> </argument> <description> - Creates a [Generic6DOFJoint3D]. + Returns the type of the Joint3D. </description> </method> - <method name="joint_create_hinge"> - <return type="RID"> + <method name="joint_make_cone_twist"> + <return type="void"> </return> - <argument index="0" name="body_A" type="RID"> + <argument index="0" name="joint" type="RID"> </argument> - <argument index="1" name="hinge_A" type="Transform"> + <argument index="1" name="body_A" type="RID"> </argument> - <argument index="2" name="body_B" type="RID"> + <argument index="2" name="local_ref_A" type="Transform"> </argument> - <argument index="3" name="hinge_B" type="Transform"> + <argument index="3" name="body_B" type="RID"> + </argument> + <argument index="4" name="local_ref_B" type="Transform"> </argument> <description> - Creates a [HingeJoint3D]. </description> </method> - <method name="joint_create_pin"> - <return type="RID"> + <method name="joint_make_generic_6dof"> + <return type="void"> </return> - <argument index="0" name="body_A" type="RID"> + <argument index="0" name="joint" type="RID"> </argument> - <argument index="1" name="local_A" type="Vector3"> + <argument index="1" name="body_A" type="RID"> + </argument> + <argument index="2" name="local_ref_A" type="Transform"> </argument> - <argument index="2" name="body_B" type="RID"> + <argument index="3" name="body_B" type="RID"> </argument> - <argument index="3" name="local_B" type="Vector3"> + <argument index="4" name="local_ref_B" type="Transform"> </argument> <description> - Creates a [PinJoint3D]. </description> </method> - <method name="joint_create_slider"> - <return type="RID"> + <method name="joint_make_hinge"> + <return type="void"> </return> - <argument index="0" name="body_A" type="RID"> + <argument index="0" name="joint" type="RID"> + </argument> + <argument index="1" name="body_A" type="RID"> </argument> - <argument index="1" name="local_ref_A" type="Transform"> + <argument index="2" name="hinge_A" type="Transform"> </argument> - <argument index="2" name="body_B" type="RID"> + <argument index="3" name="body_B" type="RID"> </argument> - <argument index="3" name="local_ref_B" type="Transform"> + <argument index="4" name="hinge_B" type="Transform"> </argument> <description> - Creates a [SliderJoint3D]. </description> </method> - <method name="joint_get_solver_priority" qualifiers="const"> - <return type="int"> + <method name="joint_make_pin"> + <return type="void"> </return> <argument index="0" name="joint" type="RID"> </argument> + <argument index="1" name="body_A" type="RID"> + </argument> + <argument index="2" name="local_A" type="Vector3"> + </argument> + <argument index="3" name="body_B" type="RID"> + </argument> + <argument index="4" name="local_B" type="Vector3"> + </argument> <description> - Gets the priority value of the Joint3D. </description> </method> - <method name="joint_get_type" qualifiers="const"> - <return type="int" enum="PhysicsServer3D.JointType"> + <method name="joint_make_slider"> + <return type="void"> </return> <argument index="0" name="joint" type="RID"> </argument> + <argument index="1" name="body_A" type="RID"> + </argument> + <argument index="2" name="local_ref_A" type="Transform"> + </argument> + <argument index="3" name="body_B" type="RID"> + </argument> + <argument index="4" name="local_ref_B" type="Transform"> + </argument> <description> - Returns the type of the Joint3D. </description> </method> <method name="joint_set_solver_priority"> @@ -1129,22 +1167,25 @@ Sets a pin_joint parameter (see [enum PinJointParam] constants). </description> </method> - <method name="set_active"> - <return type="void"> + <method name="plane_shape_create"> + <return type="RID"> </return> - <argument index="0" name="active" type="bool"> - </argument> <description> - Activates or deactivates the 3D physics engine. </description> </method> - <method name="shape_create"> + <method name="ray_shape_create"> <return type="RID"> </return> - <argument index="0" name="type" type="int" enum="PhysicsServer3D.ShapeType"> + <description> + </description> + </method> + <method name="set_active"> + <return type="void"> + </return> + <argument index="0" name="active" type="bool"> </argument> <description> - Creates a shape of a type from [enum ShapeType]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. + Activates or deactivates the 3D physics engine. </description> </method> <method name="shape_get_data" qualifiers="const"> @@ -1260,23 +1301,32 @@ Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants. </description> </method> + <method name="sphere_shape_create"> + <return type="RID"> + </return> + <description> + </description> + </method> </methods> <constants> - <constant name="JOINT_PIN" value="0" enum="JointType"> + <constant name="JOINT_TYPE_PIN" value="0" enum="JointType"> The [Joint3D] is a [PinJoint3D]. </constant> - <constant name="JOINT_HINGE" value="1" enum="JointType"> + <constant name="JOINT_TYPE_HINGE" value="1" enum="JointType"> The [Joint3D] is a [HingeJoint3D]. </constant> - <constant name="JOINT_SLIDER" value="2" enum="JointType"> + <constant name="JOINT_TYPE_SLIDER" value="2" enum="JointType"> The [Joint3D] is a [SliderJoint3D]. </constant> - <constant name="JOINT_CONE_TWIST" value="3" enum="JointType"> + <constant name="JOINT_TYPE_CONE_TWIST" value="3" enum="JointType"> The [Joint3D] is a [ConeTwistJoint3D]. </constant> - <constant name="JOINT_6DOF" value="4" enum="JointType"> + <constant name="JOINT_TYPE_6DOF" value="4" enum="JointType"> The [Joint3D] is a [Generic6DOFJoint3D]. </constant> + <constant name="JOINT_TYPE_MAX" value="5" enum="JointType"> + Represents the size of the [enum JointType] enum. + </constant> <constant name="PIN_JOINT_BIAS" value="0" enum="PinJointParam"> The strength with which the pinned objects try to stay in positional relation to each other. The higher, the stronger. diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 2532af9a0c..51ec509a14 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -717,19 +717,22 @@ <theme_item name="font" type="Font"> [Font] used for the menu items. </theme_item> + <theme_item name="font_accelerator_color" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )"> + The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators. + </theme_item> <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> The default text [Color] for menu items' names. </theme_item> - <theme_item name="font_color_accel" type="Color" default="Color( 0.7, 0.7, 0.7, 0.8 )"> - The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators. - </theme_item> - <theme_item name="font_color_disabled" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )"> + <theme_item name="font_disabled_color" type="Color" default="Color( 0.4, 0.4, 0.4, 0.8 )"> [Color] used for disabled menu items' text. </theme_item> - <theme_item name="font_color_hover" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_hover_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> [Color] used for the hovered text. </theme_item> - <theme_item name="font_color_separator" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the menu item. + </theme_item> + <theme_item name="font_separator_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> [Color] used for labeled separators' text. See [method add_separator]. </theme_item> <theme_item name="font_size" type="int"> @@ -741,12 +744,19 @@ <theme_item name="hseparation" type="int" default="4"> The horizontal space between the item's name and the shortcut text/submenu arrow. </theme_item> + <theme_item name="item_end_padding" type="int" default="2"> + </theme_item> + <theme_item name="item_start_padding" type="int" default="2"> + </theme_item> <theme_item name="labeled_separator_left" type="StyleBox"> [StyleBox] for the left side of labeled separator. See [method add_separator]. </theme_item> <theme_item name="labeled_separator_right" type="StyleBox"> [StyleBox] for the right side of labeled separator. See [method add_separator]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the item text outline. + </theme_item> <theme_item name="panel" type="StyleBox"> Default [StyleBox] of the [PopupMenu] items. </theme_item> diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index c05cbf4413..160b61c720 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -32,11 +32,17 @@ <theme_item name="font_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> The color of the text. </theme_item> - <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [ProgressBar]. + </theme_item> + <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 1 )"> The color of the text's shadow. </theme_item> <theme_item name="font_size" type="int"> Font size used to draw the fill percentage if [member percent_visible] is [code]true[/code]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> </theme_items> </class> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index a82cf9a2a9..a1e5e60b4a 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -273,9 +273,11 @@ If [code]true[/code], flushes the standard output stream every time a line is printed. This affects both terminal logging and file logging. When running a project, this setting must be enabled if you want logs to be collected by service managers such as systemd/journalctl. This setting is disabled by default on release builds, since flushing on every printed line will negatively affect performance if lots of lines are printed in a rapid succession. Also, if this setting is enabled, logged files will still be written successfully if the application crashes or is otherwise killed by the user (without being closed "normally"). [b]Note:[/b] Regardless of this setting, the standard error stream ([code]stderr[/code]) is always flushed when a line is printed to it. + Changes to this setting will only be applied upon restarting the application. </member> <member name="application/run/flush_stdout_on_print.debug" type="bool" setter="" getter="" default="true"> Debug build override for [member application/run/flush_stdout_on_print], as performance is less important during debugging. + Changes to this setting will only be applied upon restarting the application. </member> <member name="application/run/frame_delay_msec" type="int" setter="" getter="" default="0"> Forces a delay between frames in the main loop (in milliseconds). This may be useful if you plan to disable vertical synchronization. @@ -289,31 +291,31 @@ <member name="application/run/main_scene" type="String" setter="" getter="" default=""""> Path to the main scene file that will be loaded when the project runs. </member> - <member name="audio/channel_disable_threshold_db" type="float" setter="" getter="" default="-60.0"> + <member name="audio/buses/channel_disable_threshold_db" type="float" setter="" getter="" default="-60.0"> Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing. </member> - <member name="audio/channel_disable_time" type="float" setter="" getter="" default="2.0"> + <member name="audio/buses/channel_disable_time" type="float" setter="" getter="" default="2.0"> Audio buses will disable automatically when sound goes below a given dB threshold for a given time. This saves CPU as effects assigned to that bus will no longer do any processing. </member> - <member name="audio/default_bus_layout" type="String" setter="" getter="" default=""res://default_bus_layout.tres""> + <member name="audio/buses/default_bus_layout" type="String" setter="" getter="" default=""res://default_bus_layout.tres""> Default [AudioBusLayout] resource file to use in the project, unless overridden by the scene. </member> - <member name="audio/driver" type="String" setter="" getter=""> + <member name="audio/driver/driver" type="String" setter="" getter=""> Specifies the audio driver to use. This setting is platform-dependent as each platform supports different audio drivers. If left empty, the default audio driver will be used. </member> - <member name="audio/enable_audio_input" type="bool" setter="" getter="" default="false"> + <member name="audio/driver/enable_input" type="bool" setter="" getter="" default="false"> If [code]true[/code], microphone input will be allowed. This requires appropriate permissions to be set when exporting to Android or iOS. </member> - <member name="audio/mix_rate" type="int" setter="" getter="" default="44100"> + <member name="audio/driver/mix_rate" type="int" setter="" getter="" default="44100"> Mixing rate used for audio. In general, it's better to not touch this and leave it to the host operating system. </member> - <member name="audio/output_latency" type="int" setter="" getter="" default="15"> + <member name="audio/driver/output_latency" type="int" setter="" getter="" default="15"> Output latency in milliseconds for audio. Lower values will result in lower audio latency at the cost of increased CPU usage. Low values may result in audible cracking on slower hardware. </member> - <member name="audio/output_latency.web" type="int" setter="" getter="" default="50"> - Safer override for [member audio/output_latency] in the Web platform, to avoid audio issues especially on mobile devices. + <member name="audio/driver/output_latency.web" type="int" setter="" getter="" default="50"> + Safer override for [member audio/driver/output_latency] in the Web platform, to avoid audio issues especially on mobile devices. </member> - <member name="audio/video_delay_compensation_ms" type="int" setter="" getter="" default="0"> + <member name="audio/video/video_delay_compensation_ms" type="int" setter="" getter="" default="0"> Setting to hardcode audio delay when playing video. Best to leave this untouched unless you know what you are doing. </member> <member name="compression/formats/gzip/compression_level" type="int" setter="" getter="" default="-1"> @@ -331,6 +333,18 @@ <member name="compression/formats/zstd/window_log_size" type="int" setter="" getter="" default="27"> Largest size limit (in power of 2) allowed when compressing using long-distance matching with Zstandard. Higher values can result in better compression, but will require more memory when compressing and decompressing. </member> + <member name="debug/file_logging/enable_file_logging" type="bool" setter="" getter="" default="false"> + If [code]true[/code], logs all output to files. + </member> + <member name="debug/file_logging/enable_file_logging.pc" type="bool" setter="" getter="" default="true"> + Desktop override for [member debug/file_logging/enable_file_logging], as log files are not readily accessible on mobile/Web platforms. + </member> + <member name="debug/file_logging/log_path" type="String" setter="" getter="" default=""user://logs/godot.log""> + Path to logs within the project. Using an [code]user://[/code] path is recommended. + </member> + <member name="debug/file_logging/max_log_files" type="int" setter="" getter="" default="5"> + Specifies the maximum amount of log files allowed (used for rotation). + </member> <member name="debug/gdscript/completion/autocomplete_setters_and_getters" type="bool" setter="" getter="" default="false"> If [code]true[/code], displays getters and setters in autocompletion results in the script editor. This setting is meant to be used when porting old projects (Godot 2), as using member variables is the preferred style from Godot 3 onwards. </member> @@ -448,6 +462,9 @@ <member name="debug/shapes/collision/contact_color" type="Color" setter="" getter="" default="Color( 1, 0.2, 0.1, 0.8 )"> Color of the contact points between collision shapes, visible when "Visible Collision Shapes" is enabled in the Debug menu. </member> + <member name="debug/shapes/collision/draw_2d_outlines" type="bool" setter="" getter="" default="true"> + Sets whether 2D physics will display collision outlines in game when "Visible Collision Shapes" is enabled in the Debug menu. + </member> <member name="debug/shapes/collision/max_contacts_displayed" type="int" setter="" getter="" default="10000"> Maximum number of contact points between collision shapes to display when "Visible Collision Shapes" is enabled in the Debug menu. </member> @@ -475,9 +492,6 @@ <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/force_right_to_left_layout_direction" type="bool" setter="" getter="" default="false"> - Force layout direction and text writing direction to RTL for all locales. - </member> <member name="display/window/handheld/orientation" type="String" setter="" getter="" default=""landscape""> Default orientation on mobile devices. </member> @@ -513,12 +527,6 @@ <member name="display/window/size/width" type="int" setter="" getter="" default="1024"> Sets the game's main viewport width. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled. </member> - <member name="display/window/tablet_driver" type="String" setter="" getter=""> - Specifies the tablet driver to use. If left empty, the default driver will be used. - </member> - <member name="display/window/text_name" type="String" setter="" getter="" default=""""> - Specifies the [TextServer] to use. If left empty, the default will be used. - </member> <member name="display/window/vsync/use_vsync" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables vertical synchronization. This eliminates tearing that may appear in moving scenes, at the cost of higher input latency and stuttering at lower framerates. If [code]false[/code], vertical synchronization will be disabled, however, many platforms will enforce it regardless (such as mobile platforms and HTML5). </member> @@ -526,12 +534,18 @@ If [code]Use Vsync[/code] is enabled and this setting is [code]true[/code], enables vertical synchronization via the operating system's window compositor when in windowed mode and the compositor is enabled. This will prevent stutter in certain situations. (Windows only.) [b]Note:[/b] This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it. </member> - <member name="editor/script_templates_search_path" type="String" setter="" getter="" default=""res://script_templates""> - Search path for project-specific script templates. Godot will search for script templates both in the editor-specific path and in this project-specific path. + <member name="editor/node_naming/name_casing" type="int" setter="" getter="" default="0"> + When creating node names automatically, set the type of casing in this project. This is mostly an editor setting. </member> - <member name="editor/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( "gd", "shader" )"> + <member name="editor/node_naming/name_num_separator" type="int" setter="" getter="" default="0"> + What to use to separate node name from number. This is mostly an editor setting. + </member> + <member name="editor/script/search_in_file_extensions" type="PackedStringArray" setter="" getter="" default="PackedStringArray( "gd", "shader" )"> Text-based file extensions to include in the script editor's "Find in Files" feature. You can add e.g. [code]tscn[/code] if you wish to also parse your scene files, especially if you use built-in scripts which are serialized in the scene files. </member> + <member name="editor/script/templates_search_path" type="String" setter="" getter="" default=""res://script_templates""> + Search path for project-specific script templates. Godot will search for script templates both in the editor-specific path and in this project-specific path. + </member> <member name="gui/common/default_scroll_deadzone" type="int" setter="" getter="" default="0"> Default value for [member ScrollContainer.scroll_deadzone], which will be used for all [ScrollContainer]s unless overridden. </member> @@ -566,6 +580,10 @@ Default [InputEventAction] to discard a modal or pending 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. </member> + <member name="input/ui_copy" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_cut" type="Dictionary" setter="" getter=""> + </member> <member name="input/ui_down" type="Dictionary" setter="" getter=""> Default [InputEventAction] to move down in the UI. [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. @@ -574,6 +592,12 @@ Default [InputEventAction] to go to the end position of a [Control] (e.g. last item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_END] on typical desktop UI systems. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> + <member name="input/ui_filedialog_refresh" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_filedialog_show_hidden" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_filedialog_up_one_level" type="Dictionary" setter="" getter=""> + </member> <member name="input/ui_focus_next" type="Dictionary" setter="" getter=""> Default [InputEventAction] to focus the next [Control] in the scene. The focus behavior can be configured via [member Control.focus_next]. [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. @@ -582,6 +606,10 @@ Default [InputEventAction] to focus the previous [Control] in the scene. The focus behavior can be configured via [member Control.focus_previous]. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> + <member name="input/ui_graph_delete" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_graph_duplicate" type="Dictionary" setter="" getter=""> + </member> <member name="input/ui_home" type="Dictionary" setter="" getter=""> Default [InputEventAction] to go to the start position of a [Control] (e.g. first item in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_HOME] on typical desktop UI systems. [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. @@ -590,6 +618,8 @@ Default [InputEventAction] to move left in the UI. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> + <member name="input/ui_menu" type="Dictionary" setter="" getter=""> + </member> <member name="input/ui_page_down" type="Dictionary" setter="" getter=""> Default [InputEventAction] to go down a page in a [Control] (e.g. in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_PAGEDOWN] on typical desktop UI systems. [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. @@ -598,6 +628,10 @@ Default [InputEventAction] to go up a page in a [Control] (e.g. in an [ItemList] or a [Tree]), matching the behavior of [constant KEY_PAGEUP] on typical desktop UI systems. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> + <member name="input/ui_paste" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_redo" type="Dictionary" setter="" getter=""> + </member> <member name="input/ui_right" type="Dictionary" setter="" getter=""> Default [InputEventAction] to move right in the UI. [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. @@ -606,10 +640,102 @@ Default [InputEventAction] to select an item in a [Control] (e.g. in an [ItemList] or a [Tree]). [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> + <member name="input/ui_swap_input_direction" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_backspace" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_backspace_all_to_left" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_backspace_all_to_left.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_backspace_word" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_backspace_word.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_document_end" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_document_end.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_document_start" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_document_start.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_down" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_left" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_line_end" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_line_end.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_line_start" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_line_start.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_page_down" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_page_up" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_right" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_up" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_word_left" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_word_left.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_word_right" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_caret_word_right.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_completion_accept" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_completion_query" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_dedent" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_delete" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_delete_all_to_right" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_delete_all_to_right.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_delete_word" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_delete_word.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_indent" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_newline" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_newline_above" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_newline_blank" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_scroll_down" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_scroll_down.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_scroll_up" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_scroll_up.OSX" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_select_all" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_text_toggle_insert_mode" type="Dictionary" setter="" getter=""> + </member> + <member name="input/ui_undo" type="Dictionary" setter="" getter=""> + </member> <member name="input/ui_up" type="Dictionary" setter="" getter=""> Default [InputEventAction] to move up in the UI. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> + <member name="input_devices/pen_tablet/driver" type="String" setter="" getter=""> + Specifies the tablet driver to use. If left empty, the default driver will be used. + </member> + <member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter=""> + Override for [member input_devices/pen_tablet/driver] on Windows. + </member> <member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true"> If [code]true[/code], sends mouse input events when tapping or swiping on the touchscreen. </member> @@ -619,6 +745,18 @@ <member name="input_devices/pointing/ios/touch_delay" type="float" setter="" getter="" default="0.15"> Default delay for touch events. This only affects iOS devices. </member> + <member name="internationalization/locale/fallback" type="String" setter="" getter="" default=""en""> + The locale to fall back to if a translation isn't available in a given language. If left empty, [code]en[/code] (English) will be used. + </member> + <member name="internationalization/locale/test" type="String" setter="" getter="" default=""""> + If non-empty, this locale will be used when running the project from the editor. + </member> + <member name="internationalization/rendering/force_right_to_left_layout_direction" type="bool" setter="" getter="" default="false"> + Force layout direction and text writing direction to RTL for all locales. + </member> + <member name="internationalization/rendering/text_driver" type="String" setter="" getter="" default=""""> + Specifies the [TextServer] to use. If left empty, the default will be used. + </member> <member name="layer_names/2d_physics/layer_0" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 0. If left empty, the layer will display as "Layer 0". </member> @@ -859,24 +997,6 @@ <member name="layer_names/3d_render/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 3D render layer 9. If left empty, the layer will display as "Layer 9". </member> - <member name="locale/fallback" type="String" setter="" getter="" default=""en""> - The locale to fall back to if a translation isn't available in a given language. If left empty, [code]en[/code] (English) will be used. - </member> - <member name="locale/test" type="String" setter="" getter="" default=""""> - If non-empty, this locale will be used when running the project from the editor. - </member> - <member name="logging/file_logging/enable_file_logging" type="bool" setter="" getter="" default="false"> - If [code]true[/code], logs all output to files. - </member> - <member name="logging/file_logging/enable_file_logging.pc" type="bool" setter="" getter="" default="true"> - Desktop override for [member logging/file_logging/enable_file_logging], as log files are not readily accessible on mobile/Web platforms. - </member> - <member name="logging/file_logging/log_path" type="String" setter="" getter="" default=""user://logs/godot.log""> - Path to logs within the project. Using an [code]user://[/code] path is recommended. - </member> - <member name="logging/file_logging/max_log_files" type="int" setter="" getter="" default="5"> - Specifies the maximum amount of log files allowed (used for rotation). - </member> <member name="memory/limits/command_queue/multithreading_queue_size_kb" type="int" setter="" getter="" default="256"> </member> <member name="memory/limits/message_queue/max_size_kb" type="int" setter="" getter="" default="4096"> @@ -930,12 +1050,6 @@ The CA certificates bundle to use for SSL connections. If this is set to a non-empty value, this will [i]override[/i] Godot's default [url=https://github.com/godotengine/godot/blob/master/thirdparty/certs/ca-certificates.crt]Mozilla certificate bundle[/url]. If left empty, the default certificate bundle will be used. If in doubt, leave this setting empty. </member> - <member name="node/name_casing" type="int" setter="" getter="" default="0"> - When creating node names automatically, set the type of casing in this project. This is mostly an editor setting. - </member> - <member name="node/name_num_separator" type="int" setter="" getter="" default="0"> - What to use to separate node name from number. This is mostly an editor setting. - </member> <member name="physics/2d/bp_hash_table_size" type="int" setter="" getter="" default="4096"> Size of the hash table used for the broad-phase 2D hash grid algorithm. </member> @@ -985,22 +1099,18 @@ Sets which physics engine to use for 2D physics. "DEFAULT" and "GodotPhysics2D" are the same, as there is currently no alternative 2D physics server implemented. </member> + <member name="physics/2d/run_on_thread" type="bool" setter="" getter="" default="false"> + Sets whether 2D physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process. + </member> <member name="physics/2d/sleep_threshold_angular" type="float" setter="" getter="" default="0.139626"> Threshold angular velocity under which a 2D physics body will be considered inactive. See [constant PhysicsServer2D.SPACE_PARAM_BODY_ANGULAR_VELOCITY_SLEEP_THRESHOLD]. </member> <member name="physics/2d/sleep_threshold_linear" type="float" setter="" getter="" default="2.0"> Threshold linear velocity under which a 2D physics body will be considered inactive. See [constant PhysicsServer2D.SPACE_PARAM_BODY_LINEAR_VELOCITY_SLEEP_THRESHOLD]. </member> - <member name="physics/2d/thread_model" type="int" setter="" getter="" default="1"> - Sets whether physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process. - [b]Warning:[/b] As of Godot 3.2, there are mixed reports about the use of a Multi-Threaded thread model for physics. Be sure to assess whether it does give you extra performance and no regressions when using it. - </member> <member name="physics/2d/time_before_sleep" type="float" setter="" getter="" default="0.5"> Time (in seconds) of inactivity before which a 2D physics body will put to sleep. See [constant PhysicsServer2D.SPACE_PARAM_BODY_TIME_TO_SLEEP]. </member> - <member name="physics/3d/active_soft_world" type="bool" setter="" getter="" default="true"> - Sets whether the 3D physics world will be created with support for [SoftBody3D] physics. Only applies to the Bullet physics engine. - </member> <member name="physics/3d/default_angular_damp" type="float" setter="" getter="" default="0.1"> The default angular damp in 3D. [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. @@ -1041,6 +1151,15 @@ Sets which physics engine to use for 3D physics. "DEFAULT" is currently the [url=https://bulletphysics.org]Bullet[/url] physics engine. The "GodotPhysics3D" engine is still supported as an alternative. </member> + <member name="physics/3d/run_on_thread" type="bool" setter="" getter="" default="false"> + Sets whether 3D physics is run on the main thread or a separate one. Running the server on a thread increases performance, but restricts API access to only physics process. + </member> + <member name="physics/3d/sleep_threshold_angular" type="float" setter="" getter="" default="0.139626"> + </member> + <member name="physics/3d/sleep_threshold_linear" type="float" setter="" getter="" default="0.1"> + </member> + <member name="physics/3d/time_before_sleep" type="float" setter="" getter="" default="0.5"> + </member> <member name="physics/common/enable_object_picking" type="bool" setter="" getter="" default="true"> Enables [member Viewport.physics_object_picking] on the root viewport. </member> @@ -1052,273 +1171,269 @@ Fix to improve physics jitter, specially on monitors where refresh rate is different than the physics FPS. [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead. </member> - <member name="rendering/environment/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )"> - Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color]. + <member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1"> </member> - <member name="rendering/environment/default_environment" type="String" setter="" getter="" default=""""> - [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here. + <member name="rendering/2d/sdf/scale" type="int" setter="" getter="" default="1"> </member> - <member name="rendering/forward_renderer/threaded_render_minimum_instances" type="int" setter="" getter="" default="500"> + <member name="rendering/2d/shadow_atlas/size" type="int" setter="" getter="" default="2048"> </member> - <member name="rendering/gpu_lightmapper/performance/max_rays_per_pass" type="int" setter="" getter="" default="32"> + <member name="rendering/2d/snap/snap_2d_transforms_to_pixel" type="bool" setter="" getter="" default="false"> </member> - <member name="rendering/gpu_lightmapper/performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64"> + <member name="rendering/2d/snap/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false"> </member> - <member name="rendering/gpu_lightmapper/performance/region_size" type="int" setter="" getter="" default="512"> + <member name="rendering/anti_aliasing/quality/msaa" type="int" setter="" getter="" default="0"> + Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. </member> - <member name="rendering/gpu_lightmapper/quality/high_quality_probe_ray_count" type="int" setter="" getter="" default="512"> + <member name="rendering/anti_aliasing/quality/screen_space_aa" type="int" setter="" getter="" default="0"> + Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. + Another way to combat specular aliasing is to enable [member rendering/anti_aliasing/screen_space_roughness_limiter/enabled]. </member> - <member name="rendering/gpu_lightmapper/quality/high_quality_ray_count" type="int" setter="" getter="" default="256"> + <member name="rendering/anti_aliasing/quality/use_debanding" type="bool" setter="" getter="" default="false"> </member> - <member name="rendering/gpu_lightmapper/quality/low_quality_probe_ray_count" type="int" setter="" getter="" default="64"> + <member name="rendering/anti_aliasing/screen_space_roughness_limiter/amount" type="float" setter="" getter="" default="0.25"> </member> - <member name="rendering/gpu_lightmapper/quality/low_quality_ray_count" type="int" setter="" getter="" default="16"> + <member name="rendering/anti_aliasing/screen_space_roughness_limiter/enabled" type="bool" setter="" getter="" default="true"> </member> - <member name="rendering/gpu_lightmapper/quality/medium_quality_probe_ray_count" type="int" setter="" getter="" default="256"> + <member name="rendering/anti_aliasing/screen_space_roughness_limiter/limit" type="float" setter="" getter="" default="0.18"> </member> - <member name="rendering/gpu_lightmapper/quality/medium_quality_ray_count" type="int" setter="" getter="" default="64"> + <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2"> + Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother. </member> - <member name="rendering/gpu_lightmapper/quality/ultra_quality_probe_ray_count" type="int" setter="" getter="" default="2048"> + <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_shape" type="int" setter="" getter="" default="1"> + Sets the depth of field shape. Can be Box, Hexagon, or Circle. Box is the fastest. Circle is the most realistic, but also the most expensive to compute. </member> - <member name="rendering/gpu_lightmapper/quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024"> + <member name="rendering/camera/depth_of_field/depth_of_field_use_jitter" type="bool" setter="" getter="" default="false"> + If [code]true[/code], jitters DOF samples to make effect slightly blurrier and hide lines created from low sample rates. This can result in a slightly grainy appearance when used with a low number of samples. </member> - <member name="rendering/high_end/global_shader_variables_buffer_size" type="int" setter="" getter="" default="65536"> + <member name="rendering/driver/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default=""PowerVR,Mali,Adreno,Apple""> + Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this. </member> - <member name="rendering/lightmapper/probe_capture_update_speed" type="float" setter="" getter="" default="15"> + <member name="rendering/driver/depth_prepass/enable" type="bool" setter="" getter="" default="true"> + If [code]true[/code], performs a previous depth pass before rendering materials. This increases performance in scenes with high overdraw, when complex materials and lighting are used. </member> - <member name="rendering/limits/rendering/max_renderable_elements" type="int" setter="" getter="" default="128000"> - Max amount of elements renderable in a frame. If more than this are visible per frame, they will be dropped. Keep in mind elements refer to mesh surfaces and not meshes themselves. + <member name="rendering/driver/driver_name" type="String" setter="" getter="" default=""Vulkan""> + The video driver to use (currently only "Vulkan" is implemented). + [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--rendering-driver[/code] command line argument. + [b]FIXME:[/b] No longer valid after DisplayServer split: + In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time. </member> - <member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600"> + <member name="rendering/driver/rd_renderer/use_low_end_renderer" type="bool" setter="" getter="" default="false"> </member> - <member name="rendering/quality/2d/snap_2d_transforms_to_pixel" type="bool" setter="" getter="" default="false"> + <member name="rendering/driver/rd_renderer/use_low_end_renderer.mobile" type="bool" setter="" getter="" default="true"> </member> - <member name="rendering/quality/2d/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false"> + <member name="rendering/driver/threads/thread_model" type="int" setter="" getter="" default="1"> + Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter. </member> - <member name="rendering/quality/2d_sdf/oversize" type="int" setter="" getter="" default="1"> + <member name="rendering/environment/defaults/default_clear_color" type="Color" setter="" getter="" default="Color( 0.3, 0.3, 0.3, 1 )"> + Default background clear color. Overridable per [Viewport] using its [Environment]. See [member Environment.background_mode] and [member Environment.background_color] in particular. To change this default color programmatically, use [method RenderingServer.set_default_clear_color]. </member> - <member name="rendering/quality/2d_sdf/scale" type="int" setter="" getter="" default="1"> + <member name="rendering/environment/defaults/default_environment" type="String" setter="" getter="" default=""""> + [Environment] that will be used as a fallback environment in case a scene does not specify its own environment. The default environment is loaded in at scene load time regardless of whether you have set an environment or not. If you do not rely on the fallback environment, it is best to delete [code]default_env.tres[/code], or to specify a different default environment here. </member> - <member name="rendering/quality/2d_shadow_atlas/size" type="int" setter="" getter="" default="2048"> + <member name="rendering/environment/glow/upscale_mode" type="int" setter="" getter="" default="1"> + Sets how the glow effect is upscaled before being copied onto the screen. Linear is faster, but looks blocky. Bicubic is slower but looks smooth. </member> - <member name="rendering/quality/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2"> - Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother. + <member name="rendering/environment/glow/upscale_mode.mobile" type="int" setter="" getter="" default="0"> + Lower-end override for [member rendering/environment/glow/upscale_mode] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/depth_of_field/depth_of_field_bokeh_shape" type="int" setter="" getter="" default="1"> - Sets the depth of field shape. Can be Box, Hexagon, or Circle. Box is the fastest. Circle is the most realistic, but also the most expensive to compute. + <member name="rendering/environment/glow/use_high_quality" type="bool" setter="" getter="" default="false"> + Takes more samples during downsample pass of glow. This ensures that single pixels are captured by glow which makes the glow look smoother and more stable during movement. However, it is very expensive and makes the glow post process take twice as long. </member> - <member name="rendering/quality/depth_of_field/depth_of_field_use_jitter" type="bool" setter="" getter="" default="false"> - If [code]true[/code], jitters DOF samples to make effect slightly blurrier and hide lines created from low sample rates. This can result in a slightly grainy appearance when used with a low number of samples. + <member name="rendering/environment/screen_space_reflection/roughness_quality" type="int" setter="" getter="" default="1"> + Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better. </member> - <member name="rendering/quality/depth_prepass/disable_for_vendors" type="String" setter="" getter="" default=""PowerVR,Mali,Adreno,Apple""> - Disables depth pre-pass for some GPU vendors (usually mobile), as their architecture already does this. + <member name="rendering/environment/ssao/adaptive_target" type="float" setter="" getter="" default="0.5"> + Quality target to use when [member rendering/environment/ssao/quality] is set to [code]ULTRA[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]MEDIUM[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. </member> - <member name="rendering/quality/depth_prepass/enable" type="bool" setter="" getter="" default="true"> - If [code]true[/code], performs a previous depth pass before rendering materials. This increases performance in scenes with high overdraw, when complex materials and lighting are used. + <member name="rendering/environment/ssao/blur_passes" type="int" setter="" getter="" default="2"> + Number of blur passes to use when computing screen-space ambient occlusion. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail. </member> - <member name="rendering/quality/directional_shadow/size" type="int" setter="" getter="" default="4096"> - The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2. + <member name="rendering/environment/ssao/fadeout_from" type="float" setter="" getter="" default="50.0"> + Distance at which the screen-space ambient occlusion effect starts to fade out. Use this hide ambient occlusion at great distances. </member> - <member name="rendering/quality/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048"> - Lower-end override for [member rendering/quality/directional_shadow/size] on mobile devices, due to performance concerns or driver support. + <member name="rendering/environment/ssao/fadeout_to" type="float" setter="" getter="" default="300.0"> + Distance at which the screen-space ambient occlusion is fully faded out. Use this hide ambient occlusion at great distances. </member> - <member name="rendering/quality/directional_shadow/soft_shadow_quality" type="int" setter="" getter="" default="2"> - Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy. + <member name="rendering/environment/ssao/half_size" type="bool" setter="" getter="" default="false"> + If [code]true[/code], screen-space ambient occlusion will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details. </member> - <member name="rendering/quality/directional_shadow/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0"> - Lower-end override for [member rendering/quality/directional_shadow/soft_shadow_quality] on mobile devices, due to performance concerns or driver support. + <member name="rendering/environment/ssao/half_size.mobile" type="bool" setter="" getter="" default="true"> + Lower-end override for [member rendering/environment/ssao/half_size] on mobile devices, due to performance concerns. </member> - <member name="rendering/quality/driver/driver_name" type="String" setter="" getter="" default=""Vulkan""> - The video driver to use ("GLES2" or "Vulkan"). - [b]Note:[/b] The backend in use can be overridden at runtime via the [code]--rendering-driver[/code] command line argument. - [b]FIXME:[/b] No longer valid after DisplayServer split: - In such cases, this property is not updated, so use [code]OS.get_current_video_driver[/code] to query it at run-time. + <member name="rendering/environment/ssao/quality" type="int" setter="" getter="" default="2"> + Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/environment/ssao/adaptive_target] setting. </member> - <member name="rendering/quality/gi_probes/anisotropic" type="bool" setter="" getter="" default="false"> - If [code]true[/code], take additional samples when rendering objects affected by a [GIProbe] to reduce artifacts from only sampling in one direction. + <member name="rendering/environment/subsurface_scattering/subsurface_scattering_depth_scale" type="float" setter="" getter="" default="0.01"> + Scales the depth over which the subsurface scattering effect is applied. A high value may allow light to scatter into a part of the mesh or another mesh that is close in screen space but far in depth. </member> - <member name="rendering/quality/gi_probes/quality" type="int" setter="" getter="" default="1"> - Sets the number of cone samples taken when rendering objects affected by [GIProbe]s. + <member name="rendering/environment/subsurface_scattering/subsurface_scattering_quality" type="int" setter="" getter="" default="1"> + Sets the quality of the subsurface scattering effect. Higher values are slower but look nicer. </member> - <member name="rendering/quality/glow/upscale_mode" type="int" setter="" getter="" default="1"> - Sets how the glow effect is upscaled before being copied onto the screen. Linear is faster, but looks blocky. Bicubic is slower but looks smooth. + <member name="rendering/environment/subsurface_scattering/subsurface_scattering_scale" type="float" setter="" getter="" default="0.05"> + Scales the distance over which samples are taken for subsurface scattering effect. Changing this does not impact performance, but higher values will result in significant artifacts as the samples will become obviously spread out. A lower value results in a smaller spread of scattered light. </member> - <member name="rendering/quality/glow/upscale_mode.mobile" type="int" setter="" getter="" default="0"> - Lower-end override for [member rendering/quality/glow/upscale_mode] on mobile devices, due to performance concerns or driver support. + <member name="rendering/environment/volumetric_fog/use_filter" type="int" setter="" getter="" default="1"> </member> - <member name="rendering/quality/glow/use_high_quality" type="bool" setter="" getter="" default="false"> - Takes more samples during downsample pass of glow. This ensures that single pixels are captured by glow which makes the glow look smoother and more stable during movement. However, it is very expensive and makes the glow post process take twice as long. + <member name="rendering/environment/volumetric_fog/volume_depth" type="int" setter="" getter="" default="128"> </member> - <member name="rendering/quality/intended_usage/framebuffer_allocation" type="int" setter="" getter="" default="2"> - Strategy used for framebuffer allocation. The simpler it is, the less resources it uses (but the less features it supports). If set to "2D Without Sampling" or "3D Without Effects", sample buffers will not be allocated. This means [code]SCREEN_TEXTURE[/code] and [code]DEPTH_TEXTURE[/code] will not be available in shaders and post-processing effects will not be available in the [Environment]. + <member name="rendering/environment/volumetric_fog/volume_size" type="int" setter="" getter="" default="64"> </member> - <member name="rendering/quality/intended_usage/framebuffer_allocation.mobile" type="int" setter="" getter="" default="3"> - Lower-end override for [member rendering/quality/intended_usage/framebuffer_allocation] on mobile devices, due to performance concerns or driver support. + <member name="rendering/global_illumination/gi/use_half_resolution" type="bool" setter="" getter="" default="false"> </member> - <member name="rendering/quality/mesh_lod/threshold_pixels" type="float" setter="" getter="" default="1.0"> + <member name="rendering/global_illumination/gi_probes/anisotropic" type="bool" setter="" getter="" default="false"> + If [code]true[/code], take additional samples when rendering objects affected by a [GIProbe] to reduce artifacts from only sampling in one direction. </member> - <member name="rendering/quality/rd_renderer/use_low_end_renderer" type="bool" setter="" getter="" default="false"> + <member name="rendering/global_illumination/gi_probes/quality" type="int" setter="" getter="" default="1"> + Sets the number of cone samples taken when rendering objects affected by [GIProbe]s. </member> - <member name="rendering/quality/rd_renderer/use_low_end_renderer.mobile" type="bool" setter="" getter="" default="true"> + <member name="rendering/global_illumination/sdfgi/frames_to_converge" type="int" setter="" getter="" default="4"> </member> - <member name="rendering/quality/reflection_atlas/reflection_count" type="int" setter="" getter="" default="64"> - Number of cubemaps to store in the reflection atlas. The number of [ReflectionProbe]s in a scene will be limited by this amount. A higher number requires more VRAM. + <member name="rendering/global_illumination/sdfgi/frames_to_update_lights" type="int" setter="" getter="" default="2"> </member> - <member name="rendering/quality/reflection_atlas/reflection_size" type="int" setter="" getter="" default="256"> - Size of cubemap faces for [ReflectionProbe]s. A higher number requires more VRAM and may make reflection probe updating slower. + <member name="rendering/global_illumination/sdfgi/probe_ray_count" type="int" setter="" getter="" default="1"> </member> - <member name="rendering/quality/reflection_atlas/reflection_size.mobile" type="int" setter="" getter="" default="128"> - Lower-end override for [member rendering/quality/reflection_atlas/reflection_size] on mobile devices, due to performance concerns or driver support. + <member name="rendering/lightmapping/bake_performance/max_rays_per_pass" type="int" setter="" getter="" default="32"> </member> - <member name="rendering/quality/reflections/fast_filter_high_quality" type="bool" setter="" getter="" default="false"> - Use a higher quality variant of the fast filtering algorithm. Significantly slower than using default quality, but results in smoother reflections. Should only be used when the scene is especially detailed. + <member name="rendering/lightmapping/bake_performance/max_rays_per_probe_pass" type="int" setter="" getter="" default="64"> </member> - <member name="rendering/quality/reflections/ggx_samples" type="int" setter="" getter="" default="1024"> - Sets the number of samples to take when using importance sampling for [Sky]s and [ReflectionProbe]s. A higher value will result in smoother, higher quality reflections, but increases time to calculate radiance maps. In general, fewer samples are needed for simpler, low dynamic range environments while more samples are needed for HDR environments and environments with a high level of detail. + <member name="rendering/lightmapping/bake_performance/region_size" type="int" setter="" getter="" default="512"> </member> - <member name="rendering/quality/reflections/ggx_samples.mobile" type="int" setter="" getter="" default="128"> - Lower-end override for [member rendering/quality/reflections/ggx_samples] on mobile devices, due to performance concerns or driver support. + <member name="rendering/lightmapping/bake_quality/high_quality_probe_ray_count" type="int" setter="" getter="" default="512"> </member> - <member name="rendering/quality/reflections/roughness_layers" type="int" setter="" getter="" default="8"> - Limits the number of layers to use in radiance maps when using importance sampling. A lower number will be slightly faster and take up less VRAM. + <member name="rendering/lightmapping/bake_quality/high_quality_ray_count" type="int" setter="" getter="" default="256"> </member> - <member name="rendering/quality/reflections/texture_array_reflections" type="bool" setter="" getter="" default="true"> - If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise and upscaling artifacts on reflections, but is significantly slower to compute and uses [member rendering/quality/reflections/roughness_layers] times more memory. + <member name="rendering/lightmapping/bake_quality/low_quality_probe_ray_count" type="int" setter="" getter="" default="64"> </member> - <member name="rendering/quality/reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false"> - Lower-end override for [member rendering/quality/reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support. + <member name="rendering/lightmapping/bake_quality/low_quality_ray_count" type="int" setter="" getter="" default="16"> </member> - <member name="rendering/quality/screen_filters/msaa" type="int" setter="" getter="" default="0"> - Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. - [b]Note:[/b] MSAA is not available on HTML5 export using the GLES2 backend. + <member name="rendering/lightmapping/bake_quality/medium_quality_probe_ray_count" type="int" setter="" getter="" default="256"> </member> - <member name="rendering/quality/screen_filters/screen_space_aa" type="int" setter="" getter="" default="0"> - Sets the screen-space antialiasing mode for the default screen [Viewport]. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. - Another way to combat specular aliasing is to enable [member rendering/quality/screen_filters/screen_space_roughness_limiter_enabled]. + <member name="rendering/lightmapping/bake_quality/medium_quality_ray_count" type="int" setter="" getter="" default="64"> </member> - <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_amount" type="float" setter="" getter="" default="0.25"> + <member name="rendering/lightmapping/bake_quality/ultra_quality_probe_ray_count" type="int" setter="" getter="" default="2048"> </member> - <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_enabled" type="bool" setter="" getter="" default="true"> + <member name="rendering/lightmapping/bake_quality/ultra_quality_ray_count" type="int" setter="" getter="" default="1024"> </member> - <member name="rendering/quality/screen_filters/screen_space_roughness_limiter_limit" type="float" setter="" getter="" default="0.18"> + <member name="rendering/lightmapping/probe_capture/update_speed" type="float" setter="" getter="" default="15"> </member> - <member name="rendering/quality/screen_filters/use_debanding" type="bool" setter="" getter="" default="false"> + <member name="rendering/limits/cluster_builder/max_clustered_elements" type="float" setter="" getter="" default="512"> </member> - <member name="rendering/quality/screen_space_reflection/roughness_quality" type="int" setter="" getter="" default="1"> - Sets the quality for rough screen-space reflections. Turning off will make all screen space reflections sharp, while higher values make rough reflections look better. + <member name="rendering/limits/forward_renderer/threaded_render_minimum_instances" type="int" setter="" getter="" default="500"> </member> - <member name="rendering/quality/shading/force_blinn_over_ggx" type="bool" setter="" getter="" default="false"> - If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model. + <member name="rendering/limits/global_shader_variables/buffer_size" type="int" setter="" getter="" default="65536"> </member> - <member name="rendering/quality/shading/force_blinn_over_ggx.mobile" type="bool" setter="" getter="" default="true"> - Lower-end override for [member rendering/quality/shading/force_blinn_over_ggx] on mobile devices, due to performance concerns or driver support. + <member name="rendering/limits/spatial_indexer/threaded_cull_minimum_instances" type="int" setter="" getter="" default="1000"> </member> - <member name="rendering/quality/shading/force_lambert_over_burley" type="bool" setter="" getter="" default="false"> - If [code]true[/code], uses faster but lower-quality Lambert material lighting model instead of Burley. + <member name="rendering/limits/spatial_indexer/update_iterations_per_frame" type="int" setter="" getter="" default="10"> </member> - <member name="rendering/quality/shading/force_lambert_over_burley.mobile" type="bool" setter="" getter="" default="true"> - Lower-end override for [member rendering/quality/shading/force_lambert_over_burley] on mobile devices, due to performance concerns or driver support. + <member name="rendering/limits/time/time_rollover_secs" type="float" setter="" getter="" default="3600"> </member> - <member name="rendering/quality/shading/force_vertex_shading" type="bool" setter="" getter="" default="false"> - If [code]true[/code], forces vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can be used to optimize performance on low-end mobile devices. + <member name="rendering/mesh_lod/lod_change/threshold_pixels" type="float" setter="" getter="" default="1.0"> </member> - <member name="rendering/quality/shading/force_vertex_shading.mobile" type="bool" setter="" getter="" default="true"> - Lower-end override for [member rendering/quality/shading/force_vertex_shading] on mobile devices, due to performance concerns or driver support. + <member name="rendering/reflections/reflection_atlas/reflection_count" type="int" setter="" getter="" default="64"> + Number of cubemaps to store in the reflection atlas. The number of [ReflectionProbe]s in a scene will be limited by this amount. A higher number requires more VRAM. </member> - <member name="rendering/quality/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="1"> - Subdivision quadrant size for shadow mapping. See shadow mapping documentation. + <member name="rendering/reflections/reflection_atlas/reflection_size" type="int" setter="" getter="" default="256"> + Size of cubemap faces for [ReflectionProbe]s. A higher number requires more VRAM and may make reflection probe updating slower. </member> - <member name="rendering/quality/shadow_atlas/quadrant_1_subdiv" type="int" setter="" getter="" default="2"> - Subdivision quadrant size for shadow mapping. See shadow mapping documentation. + <member name="rendering/reflections/reflection_atlas/reflection_size.mobile" type="int" setter="" getter="" default="128"> + Lower-end override for [member rendering/reflections/reflection_atlas/reflection_size] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/shadow_atlas/quadrant_2_subdiv" type="int" setter="" getter="" default="3"> - Subdivision quadrant size for shadow mapping. See shadow mapping documentation. + <member name="rendering/reflections/sky_reflections/fast_filter_high_quality" type="bool" setter="" getter="" default="false"> + Use a higher quality variant of the fast filtering algorithm. Significantly slower than using default quality, but results in smoother reflections. Should only be used when the scene is especially detailed. </member> - <member name="rendering/quality/shadow_atlas/quadrant_3_subdiv" type="int" setter="" getter="" default="4"> - Subdivision quadrant size for shadow mapping. See shadow mapping documentation. + <member name="rendering/reflections/sky_reflections/ggx_samples" type="int" setter="" getter="" default="1024"> + Sets the number of samples to take when using importance sampling for [Sky]s and [ReflectionProbe]s. A higher value will result in smoother, higher quality reflections, but increases time to calculate radiance maps. In general, fewer samples are needed for simpler, low dynamic range environments while more samples are needed for HDR environments and environments with a high level of detail. </member> - <member name="rendering/quality/shadow_atlas/size" type="int" setter="" getter="" default="4096"> - Size for shadow atlas (used for OmniLights and SpotLights). See documentation. + <member name="rendering/reflections/sky_reflections/ggx_samples.mobile" type="int" setter="" getter="" default="128"> + Lower-end override for [member rendering/reflections/sky_reflections/ggx_samples] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048"> - Lower-end override for [member rendering/quality/shadow_atlas/size] on mobile devices, due to performance concerns or driver support. + <member name="rendering/reflections/sky_reflections/roughness_layers" type="int" setter="" getter="" default="8"> + Limits the number of layers to use in radiance maps when using importance sampling. A lower number will be slightly faster and take up less VRAM. </member> - <member name="rendering/quality/shadows/soft_shadow_quality" type="int" setter="" getter="" default="2"> - Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy. + <member name="rendering/reflections/sky_reflections/texture_array_reflections" type="bool" setter="" getter="" default="true"> + If [code]true[/code], uses texture arrays instead of mipmaps for reflection probes and panorama backgrounds (sky). This reduces jitter noise and upscaling artifacts on reflections, but is significantly slower to compute and uses [member rendering/reflections/sky_reflections/roughness_layers] times more memory. </member> - <member name="rendering/quality/shadows/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0"> - Lower-end override for [member rendering/quality/shadows/soft_shadow_quality] on mobile devices, due to performance concerns or driver support. + <member name="rendering/reflections/sky_reflections/texture_array_reflections.mobile" type="bool" setter="" getter="" default="false"> + Lower-end override for [member rendering/reflections/sky_reflections/texture_array_reflections] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/ssao/adaptive_target" type="float" setter="" getter="" default="0.5"> - Quality target to use when [member rendering/quality/ssao/quality] is set to [code]ULTRA[/code]. A value of [code]0.0[/code] provides a quality and speed similar to [code]MEDIUM[/code] while a value of [code]1.0[/code] provides much higher quality than any of the other settings at the cost of performance. + <member name="rendering/shading/overrides/force_blinn_over_ggx" type="bool" setter="" getter="" default="false"> + If [code]true[/code], uses faster but lower-quality Blinn model to generate blurred reflections instead of the GGX model. </member> - <member name="rendering/quality/ssao/blur_passes" type="int" setter="" getter="" default="2"> - Number of blur passes to use when computing screen-space ambient occlusion. A higher number will result in a smoother look, but will be slower to compute and will have less high-frequency detail. + <member name="rendering/shading/overrides/force_blinn_over_ggx.mobile" type="bool" setter="" getter="" default="true"> + Lower-end override for [member rendering/shading/overrides/force_blinn_over_ggx] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/ssao/fadeout_from" type="float" setter="" getter="" default="50.0"> - Distance at which the screen-space ambient occlusion effect starts to fade out. Use this hide ambient occlusion at great distances. + <member name="rendering/shading/overrides/force_lambert_over_burley" type="bool" setter="" getter="" default="false"> + If [code]true[/code], uses faster but lower-quality Lambert material lighting model instead of Burley. </member> - <member name="rendering/quality/ssao/fadeout_to" type="float" setter="" getter="" default="300.0"> - Distance at which the screen-space ambient occlusion is fully faded out. Use this hide ambient occlusion at great distances. + <member name="rendering/shading/overrides/force_lambert_over_burley.mobile" type="bool" setter="" getter="" default="true"> + Lower-end override for [member rendering/shading/overrides/force_lambert_over_burley] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/ssao/half_size" type="bool" setter="" getter="" default="false"> - If [code]true[/code], screen-space ambient occlusion will be rendered at half size and then upscaled before being added to the scene. This is significantly faster but may miss small details. + <member name="rendering/shading/overrides/force_vertex_shading" type="bool" setter="" getter="" default="false"> + If [code]true[/code], forces vertex shading for all rendering. This can increase performance a lot, but also reduces quality immensely. Can be used to optimize performance on low-end mobile devices. </member> - <member name="rendering/quality/ssao/half_size.mobile" type="bool" setter="" getter="" default="true"> - Lower-end override for [member rendering/quality/ssao/half_size] on mobile devices, due to performance concerns. + <member name="rendering/shading/overrides/force_vertex_shading.mobile" type="bool" setter="" getter="" default="true"> + Lower-end override for [member rendering/shading/overrides/force_vertex_shading] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/ssao/quality" type="int" setter="" getter="" default="2"> - Sets the quality of the screen-space ambient occlusion effect. Higher values take more samples and so will result in better quality, at the cost of performance. Setting to [code]ULTRA[/code] will use the [member rendering/quality/ssao/adaptive_target] setting. + <member name="rendering/shadows/directional_shadow/16_bits" type="bool" setter="" getter="" default="true"> </member> - <member name="rendering/quality/subsurface_scattering/subsurface_scattering_depth_scale" type="float" setter="" getter="" default="0.01"> - Scales the depth over which the subsurface scattering effect is applied. A high value may allow light to scatter into a part of the mesh or another mesh that is close in screen space but far in depth. + <member name="rendering/shadows/directional_shadow/size" type="int" setter="" getter="" default="4096"> + The directional shadow's size in pixels. Higher values will result in sharper shadows, at the cost of performance. The value will be rounded up to the nearest power of 2. </member> - <member name="rendering/quality/subsurface_scattering/subsurface_scattering_quality" type="int" setter="" getter="" default="1"> - Sets the quality of the subsurface scattering effect. Higher values are slower but look nicer. + <member name="rendering/shadows/directional_shadow/size.mobile" type="int" setter="" getter="" default="2048"> + Lower-end override for [member rendering/shadows/directional_shadow/size] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/subsurface_scattering/subsurface_scattering_scale" type="float" setter="" getter="" default="0.05"> - Scales the distance over which samples are taken for subsurface scattering effect. Changing this does not impact performance, but higher values will result in significant artifacts as the samples will become obviously spread out. A lower value results in a smaller spread of scattered light. + <member name="rendering/shadows/directional_shadow/soft_shadow_quality" type="int" setter="" getter="" default="2"> + Quality setting for shadows cast by [DirectionalLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy. </member> - <member name="rendering/quality/texture_filters/anisotropic_filtering_level" type="int" setter="" getter="" default="2"> - Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled. + <member name="rendering/shadows/directional_shadow/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0"> + Lower-end override for [member rendering/shadows/directional_shadow/soft_shadow_quality] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/quality/texture_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false"> - If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used. + <member name="rendering/shadows/shadow_atlas/16_bits" type="bool" setter="" getter="" default="true"> </member> - <member name="rendering/sdfgi/frames_to_converge" type="int" setter="" getter="" default="1"> + <member name="rendering/shadows/shadow_atlas/quadrant_0_subdiv" type="int" setter="" getter="" default="2"> + Subdivision quadrant size for shadow mapping. See shadow mapping documentation. </member> - <member name="rendering/sdfgi/probe_ray_count" type="int" setter="" getter="" default="2"> + <member name="rendering/shadows/shadow_atlas/quadrant_1_subdiv" type="int" setter="" getter="" default="2"> + Subdivision quadrant size for shadow mapping. See shadow mapping documentation. </member> - <member name="rendering/spatial_indexer/threaded_cull_minimum_instances" type="int" setter="" getter="" default="1000"> + <member name="rendering/shadows/shadow_atlas/quadrant_2_subdiv" type="int" setter="" getter="" default="3"> + Subdivision quadrant size for shadow mapping. See shadow mapping documentation. </member> - <member name="rendering/spatial_indexer/update_iterations_per_frame" type="int" setter="" getter="" default="10"> + <member name="rendering/shadows/shadow_atlas/quadrant_3_subdiv" type="int" setter="" getter="" default="4"> + Subdivision quadrant size for shadow mapping. See shadow mapping documentation. </member> - <member name="rendering/threads/thread_model" type="int" setter="" getter="" default="1"> - Thread model for rendering. Rendering on a thread can vastly improve performance, but synchronizing to the main thread can cause a bit more jitter. + <member name="rendering/shadows/shadow_atlas/size" type="int" setter="" getter="" default="4096"> + Size for shadow atlas (used for OmniLights and SpotLights). See documentation. </member> - <member name="rendering/volumetric_fog/directional_shadow_shrink" type="int" setter="" getter="" default="512"> + <member name="rendering/shadows/shadow_atlas/size.mobile" type="int" setter="" getter="" default="2048"> + Lower-end override for [member rendering/shadows/shadow_atlas/size] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/volumetric_fog/positional_shadow_shrink" type="int" setter="" getter="" default="512"> + <member name="rendering/shadows/shadows/soft_shadow_quality" type="int" setter="" getter="" default="2"> + Quality setting for shadows cast by [OmniLight3D]s and [SpotLight3D]s. Higher quality settings use more samples when reading from shadow maps and are thus slower. Low quality settings may result in shadows looking grainy. </member> - <member name="rendering/volumetric_fog/use_filter" type="int" setter="" getter="" default="0"> + <member name="rendering/shadows/shadows/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0"> + Lower-end override for [member rendering/shadows/shadows/soft_shadow_quality] on mobile devices, due to performance concerns or driver support. </member> - <member name="rendering/volumetric_fog/volume_depth" type="int" setter="" getter="" default="128"> + <member name="rendering/textures/default_filters/anisotropic_filtering_level" type="int" setter="" getter="" default="2"> + Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled. </member> - <member name="rendering/volumetric_fog/volume_size" type="int" setter="" getter="" default="64"> + <member name="rendering/textures/default_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false"> + If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used. </member> - <member name="rendering/vram_compression/import_bptc" type="bool" setter="" getter="" default="false"> + <member name="rendering/textures/vram_compression/import_bptc" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the BPTC algorithm. This texture compression algorithm is only supported on desktop platforms, and only when using the Vulkan renderer. </member> - <member name="rendering/vram_compression/import_etc" type="bool" setter="" getter="" default="false"> + <member name="rendering/textures/vram_compression/import_etc" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression algorithm. This algorithm doesn't support alpha channels in textures. </member> - <member name="rendering/vram_compression/import_etc2" type="bool" setter="" getter="" default="true"> + <member name="rendering/textures/vram_compression/import_etc2" type="bool" setter="" getter="" default="true"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the Ericsson Texture Compression 2 algorithm. This texture compression algorithm is only supported when using the Vulkan renderer. </member> - <member name="rendering/vram_compression/import_pvrtc" type="bool" setter="" getter="" default="false"> + <member name="rendering/textures/vram_compression/import_pvrtc" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the PowerVR Texture Compression algorithm. This texture compression algorithm is only supported on iOS. </member> - <member name="rendering/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true"> + <member name="rendering/textures/vram_compression/import_s3tc" type="bool" setter="" getter="" default="true"> If [code]true[/code], the texture importer will import VRAM-compressed textures using the S3 Texture Compression algorithm. This algorithm is only supported on desktop platforms and consoles. </member> <member name="rendering/vulkan/descriptor_pools/max_descriptors_per_pool" type="int" setter="" getter="" default="64"> diff --git a/doc/classes/Reference.xml b/doc/classes/Reference.xml index 44ee6fbda1..724d2db924 100644 --- a/doc/classes/Reference.xml +++ b/doc/classes/Reference.xml @@ -5,7 +5,7 @@ </brief_description> <description> Base class for any object that keeps a reference count. [Resource] and many other helper objects inherit this class. - Unlike [Object]s, References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with [method Object.free]. + Unlike other [Object] types, References keep an internal reference counter so that they are automatically released when no longer in use, and only then. References therefore do not need to be freed manually with [method Object.free]. In the vast majority of use cases, instantiating and using [Reference]-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused. [b]Note:[/b] In C#, references will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free references that are no longer in use. This means that unused references will linger on for a while before being removed. </description> diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index 7cdc9ffaca..841d2bde72 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -7,6 +7,30 @@ <tutorials> </tutorials> <methods> + <method name="barrier"> + <return type="void"> + </return> + <argument index="0" name="from" type="int" default="7"> + </argument> + <argument index="1" name="to" type="int" default="7"> + </argument> + <description> + </description> + </method> + <method name="buffer_clear"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="buffer" type="RID"> + </argument> + <argument index="1" name="offset" type="int"> + </argument> + <argument index="2" name="size_bytes" type="int"> + </argument> + <argument index="3" name="post_barrier" type="int" default="7"> + </argument> + <description> + </description> + </method> <method name="buffer_get_data"> <return type="PackedByteArray"> </return> @@ -26,7 +50,7 @@ </argument> <argument index="3" name="data" type="PackedByteArray"> </argument> - <argument index="4" name="sync_with_draw" type="bool" default="true"> + <argument index="4" name="post_barrier" type="int" default="7"> </argument> <description> </description> @@ -36,8 +60,6 @@ </return> <argument index="0" name="name" type="String"> </argument> - <argument index="1" name="sync_to_draw" type="bool"> - </argument> <description> </description> </method> @@ -52,6 +74,8 @@ <method name="compute_list_begin"> <return type="int"> </return> + <argument index="0" name="allow_draw_overlap" type="bool" default="false"> + </argument> <description> </description> </method> @@ -94,6 +118,8 @@ <method name="compute_list_end"> <return type="void"> </return> + <argument index="0" name="post_barrier" type="int" default="7"> + </argument> <description> </description> </method> @@ -131,6 +157,32 @@ <description> </description> </method> + <method name="draw_command_begin_label"> + <return type="void"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="draw_command_end_label"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="draw_command_insert_label"> + <return type="void"> + </return> + <argument index="0" name="name" type="String"> + </argument> + <argument index="1" name="color" type="Color"> + </argument> + <description> + </description> + </method> <method name="draw_list_begin"> <return type="int"> </return> @@ -272,6 +324,8 @@ <method name="draw_list_end"> <return type="void"> </return> + <argument index="0" name="post_barrier" type="int" default="7"> + </argument> <description> </description> </method> @@ -302,7 +356,9 @@ </return> <argument index="0" name="size" type="Vector2i"> </argument> - <argument index="1" name="validate_with_format" type="int" default="-1"> + <argument index="1" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0"> + </argument> + <argument index="2" name="validate_with_format" type="int" default="-1"> </argument> <description> </description> @@ -318,7 +374,7 @@ <method name="framebuffer_format_create_empty"> <return type="int"> </return> - <argument index="0" name="size" type="Vector2i"> + <argument index="0" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0"> </argument> <description> </description> @@ -347,6 +403,12 @@ <description> </description> </method> + <method name="full_barrier"> + <return type="void"> + </return> + <description> + </description> + </method> <method name="get_captured_timestamp_cpu_time" qualifiers="const"> <return type="int"> </return> @@ -383,6 +445,24 @@ <description> </description> </method> + <method name="get_device_name" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_device_pipeline_cache_uuid" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> + <method name="get_device_vendor_name" qualifiers="const"> + <return type="String"> + </return> + <description> + </description> + </method> <method name="get_frame_delay" qualifiers="const"> <return type="int"> </return> @@ -410,7 +490,7 @@ </argument> <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray( )"> </argument> - <argument index="3" name="arg3" type="bool" default="false"> + <argument index="3" name="use_restart_indices" type="bool" default="false"> </argument> <description> </description> @@ -485,6 +565,16 @@ <description> </description> </method> + <method name="set_resource_name"> + <return type="void"> + </return> + <argument index="0" name="id" type="RID"> + </argument> + <argument index="1" name="name" type="String"> + </argument> + <description> + </description> + </method> <method name="shader_compile_from_source"> <return type="RDShaderBytecode"> </return> @@ -562,7 +652,7 @@ </argument> <argument index="5" name="layer_count" type="int"> </argument> - <argument index="6" name="sync_with_draw" type="bool" default="false"> + <argument index="6" name="post_barrier" type="int" default="7"> </argument> <description> </description> @@ -588,7 +678,7 @@ </argument> <argument index="8" name="dst_layer" type="int"> </argument> - <argument index="9" name="sync_with_draw" type="bool" default="false"> + <argument index="9" name="post_barrier" type="int" default="7"> </argument> <description> </description> @@ -674,7 +764,7 @@ </argument> <argument index="1" name="to_texture" type="RID"> </argument> - <argument index="2" name="sync_with_draw" type="bool" default="false"> + <argument index="2" name="post_barrier" type="int" default="7"> </argument> <description> </description> @@ -688,7 +778,7 @@ </argument> <argument index="2" name="data" type="PackedByteArray"> </argument> - <argument index="3" name="sync_with_draw" type="bool" default="false"> + <argument index="3" name="post_barrier" type="int" default="7"> </argument> <description> </description> @@ -745,6 +835,16 @@ </method> </methods> <constants> + <constant name="BARRIER_MASK_RASTER" value="1"> + </constant> + <constant name="BARRIER_MASK_COMPUTE" value="2"> + </constant> + <constant name="BARRIER_MASK_TRANSFER" value="4"> + </constant> + <constant name="BARRIER_MASK_ALL" value="7"> + </constant> + <constant name="BARRIER_MASK_NO_BARRIER" value="8"> + </constant> <constant name="DATA_FORMAT_R4G4_UNORM_PACK8" value="0" enum="DataFormat"> </constant> <constant name="DATA_FORMAT_R4G4B4A4_UNORM_PACK16" value="1" enum="DataFormat"> @@ -1507,13 +1607,17 @@ </constant> <constant name="INITIAL_ACTION_CLEAR" value="0" enum="InitialAction"> </constant> - <constant name="INITIAL_ACTION_KEEP" value="1" enum="InitialAction"> + <constant name="INITIAL_ACTION_CLEAR_REGION" value="1" enum="InitialAction"> + </constant> + <constant name="INITIAL_ACTION_CLEAR_REGION_CONTINUE" value="2" enum="InitialAction"> + </constant> + <constant name="INITIAL_ACTION_KEEP" value="3" enum="InitialAction"> </constant> - <constant name="INITIAL_ACTION_DROP" value="2" enum="InitialAction"> + <constant name="INITIAL_ACTION_DROP" value="4" enum="InitialAction"> </constant> - <constant name="INITIAL_ACTION_CONTINUE" value="3" enum="InitialAction"> + <constant name="INITIAL_ACTION_CONTINUE" value="5" enum="InitialAction"> </constant> - <constant name="INITIAL_ACTION_MAX" value="4" enum="InitialAction"> + <constant name="INITIAL_ACTION_MAX" value="6" enum="InitialAction"> </constant> <constant name="FINAL_ACTION_READ" value="0" enum="FinalAction"> </constant> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 4be97b7d3d..dfd4a5c2d5 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1802,7 +1802,7 @@ Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh. </description> </method> - <method name="multimesh_allocate"> + <method name="multimesh_allocate_data"> <return type="void"> </return> <argument index="0" name="multimesh" type="RID"> @@ -2549,7 +2549,7 @@ Sets a shader's default texture. Overwrites the texture given by name. </description> </method> - <method name="skeleton_allocate"> + <method name="skeleton_allocate_data"> <return type="void"> </return> <argument index="0" name="skeleton" type="RID"> @@ -2559,7 +2559,6 @@ <argument index="2" name="is_2d_skeleton" type="bool" default="false"> </argument> <description> - Allocates the GPU buffers for this skeleton. </description> </method> <method name="skeleton_bone_get_transform" qualifiers="const"> @@ -2949,6 +2948,8 @@ </argument> <argument index="1" name="size" type="int"> </argument> + <argument index="2" name="use_16_bits" type="bool" default="false"> + </argument> <description> Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2. </description> @@ -3451,7 +3452,7 @@ <constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="17" enum="ViewportDebugDraw"> </constant> <constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode"> - Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant Sky.PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/quality/reflections/ggx_samples]. + Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant Sky.PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/reflections/sky_reflections/ggx_samples]. </constant> <constant name="SKY_MODE_REALTIME" value="3" enum="SkyMode"> Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 54984b7785..2548f8d911 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -4,7 +4,7 @@ Base class for all resources. </brief_description> <description> - Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Unlike [Object]s, they are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. + Resource is the base class for all Godot-specific resource types, serving primarily as data containers. Since they inherit from [Reference], resources are reference-counted and freed when no longer in use. They are also cached once loaded from disk, so that any further attempts to load a resource from a given path will return the same reference (all this in contrast to a [Node], which is not reference-counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. [b]Note:[/b] In C#, resources will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free resources that are no longer in use. This means that unused resources will linger on for a while before being removed. </description> <tutorials> @@ -29,6 +29,19 @@ [b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared. </description> </method> + <method name="emit_changed"> + <return type="void"> + </return> + <description> + Emits the [signal changed] signal. + If external objects which depend on this resource should be updated, this method must be called manually whenever the state of this resource has changed (such as modification of properties). + The method is equivalent to: + [codeblock] + emit_signal("changed") + [/codeblock] + [b]Note:[/b] This method is called automatically for built-in resources. + </description> + </method> <method name="get_local_scene" qualifiers="const"> <return type="Node"> </return> @@ -66,7 +79,7 @@ If [code]true[/code], the resource will be made unique in each instance of its local scene. It can thus be modified in a scene instance without impacting other instances of that same scene. </member> <member name="resource_name" type="String" setter="set_name" getter="get_name" default=""""> - The name of the resource. This is an optional identifier. + The name of the resource. This is an optional identifier. If [member resource_name] is not empty, its value will be displayed to represent the current resource in the editor inspector. For built-in scripts, the [member resource_name] will be displayed as the tab name in the script editor. </member> <member name="resource_path" type="String" setter="set_path" getter="get_path" default=""""> The path to the resource. In case it has its own file, it will return its filepath. If it's tied to the scene, it will return the scene's path, followed by the resource's index. diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index ad0c438f98..2683156ec5 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -57,8 +57,13 @@ </argument> <argument index="1" name="original_path" type="String"> </argument> + <argument index="2" name="use_sub_threads" type="bool"> + </argument> + <argument index="3" name="cache_mode" type="int"> + </argument> <description> Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a [Resource] object on success, or an [enum Error] constant in case of failure. + The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. </description> </method> <method name="rename_dependencies" qualifiers="virtual"> @@ -75,5 +80,11 @@ </method> </methods> <constants> + <constant name="CACHE_MODE_IGNORE" value="0" enum="CacheMode"> + </constant> + <constant name="CACHE_MODE_REUSE" value="1" enum="CacheMode"> + </constant> + <constant name="CACHE_MODE_REPLACE" value="2" enum="CacheMode"> + </constant> </constants> </class> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index c55a51c7ae..c81b21333f 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -58,13 +58,13 @@ </argument> <argument index="1" name="type_hint" type="String" default=""""> </argument> - <argument index="2" name="no_cache" type="bool" default="false"> + <argument index="2" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1"> </argument> <description> Loads a resource at the given [code]path[/code], caching the result for further access. 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 [code]type_hint[/code] 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]. - If [code]no_cache[/code] is [code]true[/code], the resource cache will be bypassed and the resource will be loaded anew. Otherwise, the cached resource will be returned if it exists. + The [code]cache_mode[/code] 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. 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. </description> @@ -127,5 +127,11 @@ <constant name="THREAD_LOAD_LOADED" value="3" enum="ThreadLoadStatus"> The resource was loaded successfully and can be accessed via [method load_threaded_get]. </constant> + <constant name="CACHE_MODE_IGNORE" value="0" enum="CacheMode"> + </constant> + <constant name="CACHE_MODE_REUSE" value="1" enum="CacheMode"> + </constant> + <constant name="CACHE_MODE_REPLACE" value="2" enum="CacheMode"> + </constant> </constants> </class> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 147e41bf1b..7ca70f5a7a 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -70,7 +70,35 @@ <return type="int"> </return> <description> - Returns the total number of newlines in the tag stack's text tags. Considers wrapped text as one line. + Returns the total number of lines in the text. Wrapped text is counted as multiple lines. + </description> + </method> + <method name="get_paragraph_count" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph. + </description> + </method> + <method name="get_selected_text" qualifiers="const"> + <return type="String"> + </return> + <description> + Returns the current selection text. Does not include BBCodes. + </description> + </method> + <method name="get_selection_from" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the current selection first character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes. + </description> + </method> + <method name="get_selection_to" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the current selection last character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes. </description> </method> <method name="get_total_character_count" qualifiers="const"> @@ -94,6 +122,13 @@ Returns the number of visible lines. </description> </method> + <method name="get_visible_paragraph_count" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. + </description> + </method> <method name="install_effect"> <return type="void"> </return> @@ -342,6 +377,15 @@ Scrolls the window's top line to match [code]line[/code]. </description> </method> + <method name="scroll_to_paragraph"> + <return type="void"> + </return> + <argument index="0" name="paragraph" type="int"> + </argument> + <description> + Scrolls the window's top line to match first line of the [code]paragraph[/code]. + </description> + </method> <method name="set_cell_border_color"> <return type="void"> </return> @@ -455,6 +499,7 @@ </member> <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1"> The restricted number of characters to display in the label. If [code]-1[/code], all characters will be displayed. + [b]Note:[/b] Setting this property updates [member percent_visible] based on current [method get_total_character_count]. </member> </members> <signals> @@ -573,10 +618,13 @@ <theme_item name="focus" type="StyleBox"> The background The background used when the [RichTextLabel] is focused. </theme_item> - <theme_item name="font_color_selected" type="Color" default="Color( 0.49, 0.49, 0.49, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The default tint of text outline. + </theme_item> + <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> The color of selected text, used when [member selection_enabled] is [code]true[/code]. </theme_item> - <theme_item name="font_color_shadow" type="Color" default="Color( 0, 0, 0, 0 )"> + <theme_item name="font_shadow_color" type="Color" default="Color( 0, 0, 0, 0 )"> The color of the font's shadow. </theme_item> <theme_item name="italics_font" type="Font"> @@ -603,6 +651,9 @@ <theme_item name="normal_font_size" type="int"> The default text font size. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="selection_color" type="Color" default="Color( 0.1, 0.1, 1, 0.8 )"> The color of the selection box. </theme_item> diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 2a0b44f3f3..6b27c77f26 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -180,14 +180,16 @@ <argument index="0" name="body" type="Node"> </argument> <description> - Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. + Emitted when a collision with another [PhysicsBody2D] or [TileMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> <signal name="body_exited"> <argument index="0" name="body" type="Node"> </argument> <description> - Emitted when a body exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. + Emitted when the collision with another [PhysicsBody2D] or [TileMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> <signal name="body_shape_entered"> @@ -200,7 +202,11 @@ <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a body enters into contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. + Emitted when one of this RigidBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + [code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. + [code]local_shape[/code] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D]. </description> </signal> <signal name="body_shape_exited"> @@ -213,7 +219,11 @@ <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a body shape exits contact with this one. Reports colliding shape information. See [CollisionObject2D] for shape index information. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. + Emitted when the collision between one of this RigidBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. + [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + [code]body_shape[/code] the index of the [Shape2D] of the other [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. + [code]local_shape[/code] the index of the [Shape2D] of this RigidBody2D used by the [PhysicsServer2D]. </description> </signal> <signal name="sleeping_state_changed"> diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml index b4171d36fc..1c6c8852a9 100644 --- a/doc/classes/RigidBody3D.xml +++ b/doc/classes/RigidBody3D.xml @@ -204,14 +204,16 @@ <argument index="0" name="body" type="Node"> </argument> <description> - Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. + Emitted when a collision with another [PhysicsBody3D] or [GridMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> <signal name="body_exited"> <argument index="0" name="body" type="Node"> </argument> <description> - Emitted when a body shape exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. + Emitted when the collision with another [PhysicsBody3D] or [GridMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> <signal name="body_shape_entered"> @@ -224,8 +226,11 @@ <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a body enters into contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. - This signal not only receives the body that collided with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body collided with. + Emitted when one of this RigidBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + [code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. + [code]local_shape[/code] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D]. [b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices. </description> </signal> @@ -239,8 +244,11 @@ <argument index="3" name="local_shape" type="int"> </argument> <description> - Emitted when a body shape exits contact with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. - This signal not only receives the body that stopped colliding with this one, but also its [RID] ([code]body_id[/code]), the shape index from the colliding body ([code]body_shape[/code]), and the shape index from this body ([code]local_shape[/code]) the other body stopped colliding with. + Emitted when the collision between one of this RigidBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. + [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s. + [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + [code]body_shape[/code] the index of the [Shape3D] of the other [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. + [code]local_shape[/code] the index of the [Shape3D] of this RigidBody3D used by the [PhysicsServer3D]. [b]Note:[/b] Bullet physics cannot identify the shape index when using a [ConcavePolygonShape3D]. Don't use multiple [CollisionShape3D]s when using a [ConcavePolygonShape3D] with Bullet physics if you need shape indices. </description> </signal> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index 2c99815abf..c54e2f4b88 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -64,10 +64,10 @@ </return> <argument index="0" name="time_sec" type="float"> </argument> - <argument index="1" name="pause_mode_process" type="bool" default="true"> + <argument index="1" name="process_always" type="bool" default="true"> </argument> <description> - Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [SceneTree]. If [code]pause_mode_process[/code] is set to [code]false[/code], pausing the [SceneTree] will also pause the timer. + Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [SceneTree]. If [code]process_always[/code] is set to [code]false[/code], pausing the [SceneTree] will also pause the timer. Commonly used to create a one-shot delay timer as in the following example: [codeblock] func some_function(): @@ -75,6 +75,7 @@ yield(get_tree().create_timer(1.0), "timeout") print("end") [/codeblock] + The timer will be automatically freed after its time elapses. </description> </method> <method name="get_frame" qualifiers="const"> @@ -180,10 +181,12 @@ <method name="quit"> <return type="void"> </return> - <argument index="0" name="exit_code" type="int" default="-1"> + <argument index="0" name="exit_code" type="int" default="0"> </argument> <description> - Quits the application at the end of the current iteration. A process [code]exit_code[/code] can optionally be passed as an argument. If this argument is [code]0[/code] or greater, it will override the [member OS.exit_code] defined before quitting the application. + Quits the application at the end of the current iteration. Argument [code]exit_code[/code] can optionally be given (defaulting to 0) to customize the exit status code. + By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. + For portability reasons, the exit code should be set between 0 and 125 (inclusive). </description> </method> <method name="reload_current_scene"> @@ -360,6 +363,11 @@ Emitted whenever the [SceneTree] hierarchy changed (children being moved or renamed, etc.). </description> </signal> + <signal name="tree_process_mode_changed"> + <description> + This signal is only emitted in the editor, it allows the editor to update the visibility of disabled nodes. Emitted whenever any node's [member Node.process_mode] is changed. + </description> + </signal> </signals> <constants> <constant name="GROUP_CALL_DEFAULT" value="0" enum="GroupCallFlags"> diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index d5a32dd20c..28620bd29b 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -37,6 +37,7 @@ <return type="ScriptEditorBase"> </return> <description> + Returns the [ScriptEditorBase] object that the user is currently editing. </description> </method> <method name="get_current_script"> @@ -60,6 +61,7 @@ <return type="Array"> </return> <description> + Returns an array with all [ScriptEditorBase] objects which are currently open in editor. </description> </method> <method name="get_open_scripts" qualifiers="const"> @@ -95,6 +97,8 @@ <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter"> </argument> <description> + Registers the [EditorSyntaxHighlighter] to the editor, the [EditorSyntaxHighlighter] will be available on all open scripts. + [b]Note:[/b] Does not apply to scripts that are already opened. </description> </method> <method name="unregister_syntax_highlighter"> @@ -103,6 +107,8 @@ <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter"> </argument> <description> + Unregisters the [EditorSyntaxHighlighter] from the editor. + [b]Note:[/b] The [EditorSyntaxHighlighter] will still be applied to scripts that are already opened. </description> </method> </methods> diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml index 9968ae06c3..ee498de302 100644 --- a/doc/classes/ScriptEditorBase.xml +++ b/doc/classes/ScriptEditorBase.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ScriptEditorBase" inherits="VBoxContainer" version="4.0"> <brief_description> + Base editor for editing scripts in the [ScriptEditor]. </brief_description> <description> + Base editor for editing scripts in the [ScriptEditor], this does not include documentation items. </description> <tutorials> </tutorials> @@ -13,34 +15,40 @@ <argument index="0" name="highlighter" type="Object"> </argument> <description> + Adds a [EditorSyntaxHighlighter] to the open script. </description> </method> </methods> <signals> <signal name="edited_script_changed"> <description> + Emitted after script validation. For visual scripts on modification. </description> </signal> <signal name="go_to_help"> <argument index="0" name="what" type="String"> </argument> <description> + Emitted when the user requests a specific documentation page. </description> </signal> <signal name="name_changed"> <description> + Emitted after script validation or when the edited resource has changed. Not used by visual scripts. </description> </signal> <signal name="replace_in_files_requested"> <argument index="0" name="text" type="String"> </argument> <description> + Emitted when the user request to find and replace text in the file system. Not used by visual scripts. </description> </signal> <signal name="request_help"> <argument index="0" name="topic" type="String"> </argument> <description> + Emitted when the user requests contextual help. </description> </signal> <signal name="request_open_script_at_line"> @@ -49,16 +57,19 @@ <argument index="1" name="line" type="int"> </argument> <description> + Emitted when the user requests a script. </description> </signal> <signal name="request_save_history"> <description> + Emitted when the user contextual goto and the item is in the same script. </description> </signal> <signal name="search_in_files_requested"> <argument index="0" name="text" type="String"> </argument> <description> + Emitted when the user request to search text in the file system. Not used by visual scripts. </description> </signal> </signals> diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml index 2d8bb5d051..f3e62175c6 100644 --- a/doc/classes/Shape3D.xml +++ b/doc/classes/Shape3D.xml @@ -13,7 +13,8 @@ </methods> <members> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04"> - The collision margin for the shape. + The collision margin for the shape. Used in Bullet Physics only. + Collision margins allows collision detection to be more efficient by adding an extra shell around shapes. Collision algorithms are more expensive when objects overlap by more than their margin, so a higher value for margins is better for performance, at the cost of accuracy around edges as it makes them less sharp. </member> </members> <constants> diff --git a/doc/classes/Sky.xml b/doc/classes/Sky.xml index a77515b3e6..d9553a3be3 100644 --- a/doc/classes/Sky.xml +++ b/doc/classes/Sky.xml @@ -52,13 +52,13 @@ 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 PROCESS_MODE_REALTIME]. If your shader uses any of the [code]LIGHT_*[/code] variables or any custom uniforms, this uses [constant PROCESS_MODE_INCREMENTAL]. Otherwise, this defaults to [constant PROCESS_MODE_QUALITY]. </constant> <constant name="PROCESS_MODE_QUALITY" value="1" enum="ProcessMode"> - Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/quality/reflections/ggx_samples]. + Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/reflections/sky_reflections/ggx_samples]. </constant> <constant name="PROCESS_MODE_INCREMENTAL" value="2" enum="ProcessMode"> - Uses the same high quality importance sampling to process the radiance map as [constant PROCESS_MODE_QUALITY], but updates over several frames. The number of frames is determined by [member ProjectSettings.rendering/quality/reflections/roughness_layers]. Use this when you need highest quality radiance maps, but have a sky that updates slowly. + Uses the same high quality importance sampling to process the radiance map as [constant PROCESS_MODE_QUALITY], but updates over several frames. The number of frames is determined by [member ProjectSettings.rendering/reflections/sky_reflections/roughness_layers]. Use this when you need highest quality radiance maps, but have a sky that updates slowly. </constant> <constant name="PROCESS_MODE_REALTIME" value="3" enum="ProcessMode"> - Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on [member ProjectSettings.rendering/quality/reflections/fast_filter_high_quality]. + Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. If you need better quality, but still need to update the sky every frame, consider turning on [member ProjectSettings.rendering/reflections/sky_reflections/fast_filter_high_quality]. [b]Note:[/b] The fast filtering algorithm is limited to 256x256 cubemaps, so [member radiance_size] must be set to [constant RADIANCE_SIZE_256]. </constant> </constants> diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml index d3ab955570..04e201e1bd 100644 --- a/doc/classes/SoftBody3D.xml +++ b/doc/classes/SoftBody3D.xml @@ -77,7 +77,7 @@ </method> </methods> <members> - <member name="areaAngular_stiffness" type="float" setter="set_areaAngular_stiffness" getter="get_areaAngular_stiffness" default="0.5"> + <member name="angular_stiffness" type="float" setter="set_angular_stiffness" getter="get_angular_stiffness" default="0.0"> </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The physics layers this SoftBody3D is in. @@ -87,11 +87,11 @@ <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The physics layers this SoftBody3D scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> - <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01"> + <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.0"> </member> <member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient" default="0.0"> </member> - <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5"> + <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.0"> </member> <member name="parent_collision_ignore" type="NodePath" setter="set_parent_collision_ignore" getter="get_parent_collision_ignore" default="NodePath("")"> [NodePath] to a [CollisionObject3D] this SoftBody3D should avoid clipping. @@ -103,13 +103,13 @@ <member name="ray_pickable" type="bool" setter="set_ray_pickable" getter="is_ray_pickable" default="true"> If [code]true[/code], the [SoftBody3D] will respond to [RayCast3D]s. </member> - <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="5"> + <member name="simulation_precision" type="int" setter="set_simulation_precision" getter="get_simulation_precision" default="0"> Increasing this value will improve the resulting simulation, but can affect performance. Use with care. </member> - <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="1.0"> + <member name="total_mass" type="float" setter="set_total_mass" getter="get_total_mass" default="0.0"> The SoftBody3D's mass. </member> - <member name="volume_stiffness" type="float" setter="set_volume_stiffness" getter="get_volume_stiffness" default="0.5"> + <member name="volume_stiffness" type="float" setter="set_volume_stiffness" getter="get_volume_stiffness" default="0.0"> </member> </members> <constants> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index e674ceb57e..a08d4f5b44 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -15,6 +15,7 @@ [/codeblock] The above code will create a [SpinBox], disable context menu on it and set the text alignment to right. See [Range] class for more options over the [SpinBox]. + [b]Note:[/b] [SpinBox] relies on an underlying [LineEdit] node. To theme a [SpinBox]'s background, add theme items for [LineEdit] and customize them. </description> <tutorials> </tutorials> diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 44b08408c1..078520a095 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -102,7 +102,7 @@ This mode performs standard alpha blending. It can display translucent areas, but transparency sorting issues may be visible when multiple transparent materials are overlapping. </constant> <constant name="ALPHA_CUT_DISCARD" value="1" enum="AlphaCutMode"> - This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/quality/screen_filters/screen_space_aa]). On the bright side, this mode doesn't suffer from transparency sorting issues when multiple transparent materials are overlapping. This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i]. + This mode only allows fully transparent or fully opaque pixels. Harsh edges will be visible unless some form of screen-space antialiasing is enabled (see [member ProjectSettings.rendering/anti_aliasing/quality/screen_space_aa]). On the bright side, this mode doesn't suffer from transparency sorting issues when multiple transparent materials are overlapping. This mode is also known as [i]alpha testing[/i] or [i]1-bit transparency[/i]. </constant> <constant name="ALPHA_CUT_OPAQUE_PREPASS" value="2" enum="AlphaCutMode"> This mode draws fully opaque pixels in the depth prepass. This is slower than [constant ALPHA_CUT_DISABLED] or [constant ALPHA_CUT_DISCARD], but it allows displaying translucent areas and smooth edges while using proper sorting. diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 79f21a0e70..c03f6357ab 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -63,9 +63,18 @@ <method name="bin_to_int"> <return type="int"> </return> - <argument index="0" name="with_prefix" type="bool" default="true"> - </argument> <description> + Converts a string containing a binary number into an integer. Binary strings can either be prefixed with [code]0b[/code] or not, and they can also start with a [code]-[/code] before the optional prefix. + [codeblocks] + [gdscript] + print("0x101".bin_to_int()) # Prints "5". + print("101".bin_to_int()) # Prints "5". + [/gdscript] + [csharp] + GD.Print("0x101".BinToInt()); // Prints "5". + GD.Print("101".BinToInt()); // Prints "5". + [/csharp] + [/codeblocks] </description> </method> <method name="c_escape"> @@ -221,34 +230,18 @@ <method name="hex_to_int"> <return type="int"> </return> - <argument index="0" name="with_prefix" type="bool" default="true"> - </argument> - <description> - Converts a string containing a hexadecimal number into a decimal integer. If [code]with_prefix[/code] is [code]true[/code], the hexadecimal string should start with the [code]0x[/code] prefix, otherwise [code]0[/code] is returned. - [codeblock] - print("0xff".hex_to_int()) # Print "255" - print("ab".hex_to_int(false)) # Print "171" - [/codeblock] - </description> - </method> - <method name="http_escape"> - <return type="String"> - </return> <description> - Escapes (encodes) a string to URL friendly format. Also referred to as 'URL encode'. - [codeblock] - print("https://example.org/?escaped=" + "Godot Engine:'docs'".http_escape()) - [/codeblock] - </description> - </method> - <method name="http_unescape"> - <return type="String"> - </return> - <description> - Unescapes (decodes) a string in URL encoded format. Also referred to as 'URL decode'. - [codeblock] - print("https://example.org/?escaped=" + "Godot%20Engine%3A%27docs%27".http_unescape()) - [/codeblock] + Converts a string containing a hexadecimal number into an integer. Hexadecimal strings can either be prefixed with [code]0x[/code] or not, and they can also start with a [code]-[/code] before the optional prefix. + [codeblocks] + [gdscript] + print("0xff".hex_to_int()) # Prints "255". + print("ab".hex_to_int()) # Prints "171". + [/gdscript] + [csharp] + GD.Print("0xff".HexToInt()); // Prints "255". + GD.Print("ab".HexToInt()); // Prints "171". + [/csharp] + [/codeblocks] </description> </method> <method name="insert"> @@ -406,7 +399,8 @@ <argument index="0" name="chars" type="String"> </argument> <description> - Returns a copy of the string with characters removed from the left. + Returns a copy of the string with characters removed from the left. The [code]chars[/code] argument is a string specifying the set of characters to be removed. + [b]Note:[/b] The [code]chars[/code] is not a prefix. See [method trim_prefix] method that will remove a single prefix string rather than a set of characters. </description> </method> <method name="match"> @@ -546,15 +540,6 @@ <description> </description> </method> - <method name="ord_at"> - <return type="int"> - </return> - <argument index="0" name="at" type="int"> - </argument> - <description> - Returns the character code at position [code]at[/code]. - </description> - </method> <method name="pad_decimals"> <return type="String"> </return> @@ -573,20 +558,6 @@ Formats a number to have an exact number of [code]digits[/code] before the decimal point. </description> </method> - <method name="percent_decode"> - <return type="String"> - </return> - <description> - Decode a percent-encoded string. See [method percent_encode]. - </description> - </method> - <method name="percent_encode"> - <return type="String"> - </return> - <description> - Percent-encodes a string. Encodes parameters in a URL when sending a HTTP GET request (and bodies of form-urlencoded POST requests). - </description> - </method> <method name="plus_file"> <return type="String"> </return> @@ -698,7 +669,8 @@ <argument index="0" name="chars" type="String"> </argument> <description> - Returns a copy of the string with characters removed from the right. + Returns a copy of the string with characters removed from the right. The [code]chars[/code] argument is a string specifying the set of characters to be removed. + [b]Note:[/b] The [code]chars[/code] is not a suffix. See [method trim_suffix] method that will remove a single suffix string rather than a set of characters. </description> </method> <method name="sha1_buffer"> @@ -876,6 +848,45 @@ Removes a given string from the end if it ends with it or leaves the string unchanged. </description> </method> + <method name="unicode_at"> + <return type="int"> + </return> + <argument index="0" name="at" type="int"> + </argument> + <description> + Returns the character code at position [code]at[/code]. + </description> + </method> + <method name="uri_decode"> + <return type="String"> + </return> + <description> + Decodes a string in URL encoded format. This is meant to decode parameters in a URL when receiving an HTTP request. + [codeblocks] + [gdscript] + print("https://example.org/?escaped=" + "Godot%20Engine%3A%27docs%27".uri_decode()) + [/gdscript] + [csharp] + GD.Print("https://example.org/?escaped=" + "Godot%20Engine%3a%27Docs%27".URIDecode()); + [/csharp] + [/codeblocks] + </description> + </method> + <method name="uri_encode"> + <return type="String"> + </return> + <description> + Encodes a string to URL friendly format. This is meant to encode parameters in a URL when sending an HTTP request. + [codeblocks] + [gdscript] + print("https://example.org/?escaped=" + "Godot Engine:'docs'".uri_encode()) + [/gdscript] + [csharp] + GD.Print("https://example.org/?escaped=" + "Godot Engine:'docs'".URIEncode()); + [/csharp] + [/codeblocks] + </description> + </method> <method name="xml_escape"> <return type="String"> </return> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 13ea7df294..d66ae210ec 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -4,12 +4,12 @@ Customizable [StyleBox] with a given set of parameters (no texture required). </brief_description> <description> - This [StyleBox] can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: + This [StyleBox] can be used to achieve all kinds of looks without the need of a texture. The following properties are customizable: - Color - Border width (individual width for each border) - Rounded corners (individual radius for each corner) - Shadow (with blur and offset) - Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example: + Setting corner radius to high values is allowed. As soon as corners overlap, the stylebox will switch to a relative system. Example: [codeblock] height = 30 corner_radius_top_left = 50 @@ -178,8 +178,8 @@ Border width for the top border. </member> <member name="corner_detail" type="int" setter="set_corner_detail" getter="get_corner_detail" default="8"> - This sets the amount of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius ([method set_corner_radius_all]) into account. - For corner radii smaller than 10, [code]4[/code] or [code]5[/code] should be enough. For corner radii smaller than 30, values between [code]8[/code] and [code]12[/code] should be enough. + This sets the number of vertices used for each corner. Higher values result in rounder corners but take more processing power to compute. When choosing a value, you should take the corner radius ([method set_corner_radius_all]) into account. + For corner radii less than 10, [code]4[/code] or [code]5[/code] should be enough. For corner radii less than 30, values between [code]8[/code] and [code]12[/code] should be enough. A corner detail of [code]1[/code] will result in chamfered corners instead of rounded corners, which is useful for some artistic effects. </member> <member name="corner_radius_bottom_left" type="int" setter="set_corner_radius" getter="get_corner_radius" default="0"> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index e10b65e309..331de4284e 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -155,8 +155,8 @@ <argument index="0" name="flip" type="bool" default="false"> </argument> <description> - Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted. - Requires the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES]. + Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. + [b]Note:[/b] [method generate_normals] only works if the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES]. </description> </method> <method name="generate_tangents"> diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml index 2d6e3de02a..642d75fa9b 100644 --- a/doc/classes/SyntaxHighlighter.xml +++ b/doc/classes/SyntaxHighlighter.xml @@ -1,50 +1,83 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="SyntaxHighlighter" inherits="Resource" version="4.0"> <brief_description> + Base Syntax highlighter resource for [TextEdit]. </brief_description> <description> + Base syntax highlighter resource all syntax highlighters extend from, provides syntax highlighting data to [TextEdit]. + The associated [TextEdit] node will call into the [SyntaxHighlighter] on a as needed basis. + [b]Note:[/b] Each Syntax highlighter instance should not be shared across multiple [TextEdit] nodes. </description> <tutorials> </tutorials> <methods> + <method name="_clear_highlighting_cache" qualifiers="virtual"> + <return type="void"> + </return> + <description> + Virtual method which can be overridden to clear any local caches. + </description> + </method> <method name="_get_line_syntax_highlighting" qualifiers="virtual"> <return type="Dictionary"> </return> - <argument index="0" name="p_line" type="int"> + <argument index="0" name="line" type="int"> </argument> <description> + Virtual method which can be overridden to return syntax highlighting data. + See [method get_line_syntax_highlighting] for more details. </description> </method> <method name="_update_cache" qualifiers="virtual"> <return type="void"> </return> <description> + Virtual method which can be overridden to update any local caches. </description> </method> <method name="clear_highlighting_cache"> <return type="void"> </return> <description> + Clears all cached syntax highlighting data. + Then calls overridable method [method _clear_highlighting_cache]. </description> </method> <method name="get_line_syntax_highlighting"> <return type="Dictionary"> </return> - <argument index="0" name="p_line" type="int"> + <argument index="0" name="line" type="int"> </argument> <description> + Returns syntax highlighting data for a single line. If the line is not cached, calls [method _get_line_syntax_highlighting] to calculate the data. + The return [Dictionary] is column number to [Dictionary]. The column number notes the start of a region, the region will end if another region is found, or at the end of the line. The nested [Dictionary] contains the data for that region, currently only the key "color" is supported. + [b]Example return:[/b] + [codeblock] + var color_map = { + 0: { + "color": Color(1, 0, 0) + }, + 5: { + "color": Color(0, 1, 0) + } + } + [/codeblock] + This will color columns 0-4 red, and columns 5-eol in green. </description> </method> <method name="get_text_edit"> <return type="TextEdit"> </return> <description> + Returns the associated [TextEdit] node. </description> </method> <method name="update_cache"> <return type="void"> </return> <description> + Clears then updates the [SyntaxHighlighter] caches. Override [method _update_cache] for a callback. + [b]Note:[/b] This is called automatically when the associated [TextEdit] node, updates its own cache. </description> </method> </methods> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 10cdd0eade..ddf6b465a4 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -198,18 +198,21 @@ <theme_item name="font" type="Font"> The font used to draw tab names. </theme_item> - <theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> - Font color of inactive tabs. - </theme_item> - <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> Font color of disabled tabs. </theme_item> - <theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the tab name. + </theme_item> + <theme_item name="font_selected_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> Font color of the currently selected tab. </theme_item> <theme_item name="font_size" type="int"> Font size of the tab names. </theme_item> + <theme_item name="font_unselected_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> + Font color of the other, unselected tabs. + </theme_item> <theme_item name="icon_separation" type="int" default="4"> Space between tab's name and its icon. </theme_item> @@ -225,20 +228,23 @@ <theme_item name="menu_highlight" type="Texture2D"> The icon for the menu button (see [method set_popup]) when it's being hovered with the cursor. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the tab text outline. + </theme_item> <theme_item name="panel" type="StyleBox"> The style for the background fill. </theme_item> <theme_item name="side_margin" type="int" default="8"> The space at the left and right edges of the tab bar. </theme_item> - <theme_item name="tab_bg" type="StyleBox"> - The style of inactive tabs. - </theme_item> <theme_item name="tab_disabled" type="StyleBox"> The style of disabled tabs. </theme_item> - <theme_item name="tab_fg" type="StyleBox"> + <theme_item name="tab_selected" type="StyleBox"> The style of the currently selected tab. </theme_item> + <theme_item name="tab_unselected" type="StyleBox"> + The style of the other, unselected tabs. + </theme_item> </theme_items> </class> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index 47cf869fe9..df9680bf28 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -359,18 +359,21 @@ <theme_item name="font" type="Font"> The font used to draw tab names. </theme_item> - <theme_item name="font_color_bg" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> - Font color of inactive tabs. - </theme_item> - <theme_item name="font_color_disabled" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> + <theme_item name="font_disabled_color" type="Color" default="Color( 0.9, 0.9, 0.9, 0.2 )"> Font color of disabled tabs. </theme_item> - <theme_item name="font_color_fg" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the tab name. + </theme_item> + <theme_item name="font_selected_color" type="Color" default="Color( 0.94, 0.94, 0.94, 1 )"> Font color of the currently selected tab. </theme_item> <theme_item name="font_size" type="int"> Font size of the tab names. </theme_item> + <theme_item name="font_unselected_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> + Font color of the other, unselected tabs. + </theme_item> <theme_item name="hseparation" type="int" default="4"> The horizontal separation between the tabs. </theme_item> @@ -380,16 +383,19 @@ <theme_item name="increment_highlight" type="Texture2D"> Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. </theme_item> - <theme_item name="panel" type="StyleBox"> + <theme_item name="outline_size" type="int" default="0"> + The size of the tab text outline. </theme_item> - <theme_item name="tab_bg" type="StyleBox"> - The style of an inactive tab. + <theme_item name="panel" type="StyleBox"> </theme_item> <theme_item name="tab_disabled" type="StyleBox"> - The style of a disabled tab + The style of disabled tabs. </theme_item> - <theme_item name="tab_fg" type="StyleBox"> + <theme_item name="tab_selected" type="StyleBox"> The style of the currently selected tab. </theme_item> + <theme_item name="tab_unselected" type="StyleBox"> + The style of the other, unselected tabs. + </theme_item> </theme_items> </class> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index e8a54c6c20..1d50cd60e5 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -697,7 +697,7 @@ </member> <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="1" /> <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> - If [code]true[/code], custom [code]font_color_selected[/code] will be used for selected text. + If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text. </member> <member name="readonly" type="bool" setter="set_readonly" getter="is_readonly" default="false"> If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. @@ -725,6 +725,7 @@ Set additional options for BiDi override. </member> <member name="syntax_highlighter" type="SyntaxHighlighter" setter="set_syntax_highlighter" getter="get_syntax_highlighter"> + Sets the [SyntaxHighlighter] to use. </member> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> String value of the [TextEdit]. @@ -914,7 +915,7 @@ </constants> <theme_items> <theme_item name="background_color" type="Color" default="Color( 0, 0, 0, 0 )"> - Sets the background [Color] of this [TextEdit]. [member syntax_highlighting] has to be enabled. + Sets the background [Color] of this [TextEdit]. </theme_item> <theme_item name="brace_mismatch_color" type="Color" default="Color( 1, 0.2, 0.2, 1 )"> </theme_item> @@ -953,9 +954,12 @@ <theme_item name="font_color" type="Color" default="Color( 0.88, 0.88, 0.88, 1 )"> Sets the font [Color]. </theme_item> - <theme_item name="font_color_readonly" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the [TextEdit]. </theme_item> - <theme_item name="font_color_selected" type="Color" default="Color( 0, 0, 0, 1 )"> + <theme_item name="font_readonly_color" type="Color" default="Color( 0.88, 0.88, 0.88, 0.5 )"> + </theme_item> + <theme_item name="font_selected_color" type="Color" default="Color( 0, 0, 0, 1 )"> Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled. </theme_item> <theme_item name="font_size" type="int"> @@ -970,6 +974,9 @@ <theme_item name="normal" type="StyleBox"> Sets the [StyleBox] of this [TextEdit]. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="read_only" type="StyleBox"> Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled. </theme_item> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index 791646000b..5635ec2be0 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -9,6 +9,19 @@ <tutorials> </tutorials> <methods> + <method name="create_font_bitmap"> + <return type="RID"> + </return> + <argument index="0" name="height" type="float"> + </argument> + <argument index="1" name="ascent" type="float"> + </argument> + <argument index="2" name="base_size" type="int"> + </argument> + <description> + Creates new, empty bitmap font. To free the resulting font, use [method free_rid] method. + </description> + </method> <method name="create_font_memory"> <return type="RID"> </return> @@ -78,6 +91,51 @@ Draws box displaying character hexadecimal code. Used for replacing missing characters. </description> </method> + <method name="font_bitmap_add_char"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="char" type="int"> + </argument> + <argument index="2" name="texture_idx" type="int"> + </argument> + <argument index="3" name="rect" type="Rect2"> + </argument> + <argument index="4" name="align" type="Vector2"> + </argument> + <argument index="5" name="advance" type="float"> + </argument> + <description> + Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance. + </description> + </method> + <method name="font_bitmap_add_kerning_pair"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="A" type="int"> + </argument> + <argument index="2" name="B" type="int"> + </argument> + <argument index="3" name="kerning" type="int"> + </argument> + <description> + Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. + </description> + </method> + <method name="font_bitmap_add_texture"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="texture" type="Texture"> + </argument> + <description> + Adds a texture to the bitmap font. + </description> + </method> <method name="font_draw_glyph" qualifiers="const"> <return type="Vector2"> </return> @@ -295,6 +353,24 @@ Returns list of script support overrides. </description> </method> + <method name="font_get_spacing_glyph" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <description> + Returns extra spacing for each glyphs in pixels. + </description> + </method> + <method name="font_get_spacing_space" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <description> + Sets extra spacing for each glyphs in pixels. + </description> + </method> <method name="font_get_supported_chars" qualifiers="const"> <return type="String"> </return> @@ -490,6 +566,28 @@ Adds override for [method font_is_script_supported]. </description> </method> + <method name="font_set_spacing_glyph"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + Returns extra spacing for the space character in pixels. + </description> + </method> + <method name="font_set_spacing_space"> + <return type="void"> + </return> + <argument index="0" name="font" type="RID"> + </argument> + <argument index="1" name="value" type="int"> + </argument> + <description> + Sets extra spacing for the space character in pixels. + </description> + </method> <method name="font_set_variation"> <return type="void"> </return> @@ -655,7 +753,7 @@ <method name="shaped_text_clear"> <return type="void"> </return> - <argument index="0" name="arg0" type="RID"> + <argument index="0" name="rid" type="RID"> </argument> <description> Clears text buffer (removes text and inline objects). diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 3f7f22ebcd..9f976838e9 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -236,7 +236,8 @@ <argument index="1" name="node_type" type="StringName"> </argument> <description> - Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code]. + Returns the [StyleBox] at [code]name[/code] if the theme has [code]node_type[/code]. + Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> @@ -246,6 +247,7 @@ </argument> <description> Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]node_type[/code]. + Valid [code]node_type[/code]s may be found using [method get_stylebox_type_list]. </description> </method> <method name="get_stylebox_type_list" qualifiers="const"> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index c500052592..a12ef614e3 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -5,6 +5,7 @@ </brief_description> <description> Node for 2D tile-based maps. Tilemaps use a [TileSet] which contain a list of tiles (textures plus optional collision, navigation, and/or occluder shapes) which are used to create grid-based maps. + When doing physics queries against the tilemap, the cell coordinates are encoded as [code]metadata[/code] for each detected collision shape returned by methods such as [method PhysicsDirectSpaceState2D.intersect_shape], [method PhysicsDirectBodyState2D.get_contact_collider_shape_metadata] etc. </description> <tutorials> <link title="Using Tilemaps">https://docs.godotengine.org/en/latest/tutorials/2d/using_tilemaps.html</link> @@ -143,7 +144,7 @@ <argument index="1" name="ignore_half_ofs" type="bool" default="false"> </argument> <description> - Returns the global position corresponding to the given tilemap (grid-based) coordinates. + Returns the local position corresponding to the given tilemap (grid-based) coordinates. Optionally, the tilemap's half offset can be ignored. </description> </method> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index ab75e21ce8..5265e75429 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -47,8 +47,8 @@ <member name="paused" type="bool" setter="set_paused" getter="is_paused"> If [code]true[/code], the timer is paused and will not process until it is unpaused again, even if [method start] is called. </member> - <member name="process_mode" type="int" setter="set_timer_process_mode" getter="get_timer_process_mode" enum="Timer.TimerProcessMode" default="1"> - Processing mode. See [enum TimerProcessMode]. + <member name="process_callback" type="int" setter="set_timer_process_callback" getter="get_timer_process_callback" enum="Timer.TimerProcessCallback" default="1"> + Processing callback. See [enum TimerProcessCallback]. </member> <member name="time_left" type="float" setter="" getter="get_time_left"> The timer's remaining time in seconds. Returns 0 if the timer is inactive. @@ -66,10 +66,10 @@ </signal> </signals> <constants> - <constant name="TIMER_PROCESS_PHYSICS" value="0" enum="TimerProcessMode"> + <constant name="TIMER_PROCESS_PHYSICS" value="0" enum="TimerProcessCallback"> Update the timer during the physics step at each frame (fixed framerate processing). </constant> - <constant name="TIMER_PROCESS_IDLE" value="1" enum="TimerProcessMode"> + <constant name="TIMER_PROCESS_IDLE" value="1" enum="TimerProcessCallback"> Update the timer during the idle time at each frame. </constant> </constants> diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml index 355804f2a3..bb4c17c531 100644 --- a/doc/classes/TouchScreenButton.xml +++ b/doc/classes/TouchScreenButton.xml @@ -4,7 +4,7 @@ Button for touch screen devices for gameplay use. </brief_description> <description> - TouchScreenButton allows you to create on-screen buttons for touch devices. It's intended for gameplay use, such as a unit you have to touch to move. + TouchScreenButton allows you to create on-screen buttons for touch devices. It's intended for gameplay use, such as a unit you have to touch to move. Unlike [Button], TouchScreenButton supports multitouch out of the box. Several TouchScreenButtons can be pressed at the same time with touch input. This node inherits from [Node2D]. Unlike with [Control] nodes, you cannot set anchors on it. If you want to create menus or user interfaces, you may want to use [Button] nodes instead. To make button nodes react to touch events, you can enable the Emulate Mouse option in the Project Settings. You can configure TouchScreenButton to be visible only on touch devices, helping you develop your game both for desktop and mobile devices. </description> @@ -30,7 +30,8 @@ The button's texture for the normal state. </member> <member name="passby_press" type="bool" setter="set_passby_press" getter="is_passby_press_enabled" default="false"> - If [code]true[/code], pass-by presses are enabled. + If [code]true[/code], the [signal pressed] and [signal released] signals are emitted whenever a pressed finger goes in and out of the button, even if the pressure started outside the active area of the button. + [b]Note:[/b] this is a "pass-by" (not "bypass") press mode. </member> <member name="pressed" type="Texture2D" setter="set_texture_pressed" getter="get_texture_pressed"> The button's texture for the pressed state. @@ -42,7 +43,7 @@ If [code]true[/code], the button's shape is centered in the provided texture. If no texture is used, this property has no effect. </member> <member name="shape_visible" type="bool" setter="set_shape_visible" getter="is_shape_visible" default="true"> - If [code]true[/code], the button's shape is visible. + If [code]true[/code], the button's shape is visible in the editor. </member> <member name="visibility_mode" type="int" setter="set_visibility_mode" getter="get_visibility_mode" enum="TouchScreenButton.VisibilityMode" default="0"> The button's visibility mode. See [enum VisibilityMode] for possible values. diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index cda69f6a64..d75b81eece 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -97,7 +97,7 @@ </return> <argument index="0" name="target" type="Vector3"> </argument> - <argument index="1" name="up" type="Vector3"> + <argument index="1" name="up" type="Vector3" default="Vector3( 0, 1, 0 )"> </argument> <description> Returns a copy of the transform rotated such that its -Z axis points towards the [code]target[/code] position. diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 01818e2993..8502707096 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -57,6 +57,13 @@ The new item will be the [code]idx[/code]th child of parent, or it will be the last child if there are not enough siblings. </description> </method> + <method name="edit_selected"> + <return type="bool"> + </return> + <description> + Edits the selected tree item as if it was clicked. The item must be set editable with [method TreeItem.set_editable]. Returns [code]true[/code] if the item could be edited. Fails if no item is selected. + </description> + </method> <method name="ensure_cursor_is_visible"> <return type="void"> </return> @@ -230,6 +237,14 @@ To tell whether a column of an item is selected, use [method TreeItem.is_selected]. </description> </method> + <method name="scroll_to_item"> + <return type="void"> + </return> + <argument index="0" name="item" type="Object"> + </argument> + <description> + </description> + </method> <method name="set_column_expand"> <return type="void"> </return> @@ -524,7 +539,10 @@ <theme_item name="font_color" type="Color" default="Color( 0.69, 0.69, 0.69, 1 )"> Default text [Color] of the item. </theme_item> - <theme_item name="font_color_selected" type="Color" default="Color( 1, 1, 1, 1 )"> + <theme_item name="font_outline_color" type="Color" default="Color( 1, 1, 1, 1 )"> + The tint of text outline of the item. + </theme_item> + <theme_item name="font_selected_color" type="Color" default="Color( 1, 1, 1, 1 )"> Text [Color] used when the item is selected. </theme_item> <theme_item name="font_size" type="int"> @@ -539,6 +557,9 @@ <theme_item name="item_margin" type="int" default="12"> The horizontal margin at the start of an item. This is used when folding is enabled for the item. </theme_item> + <theme_item name="outline_size" type="int" default="0"> + The size of the text outline. + </theme_item> <theme_item name="relationship_line_color" type="Color" default="Color( 0.27, 0.27, 0.27, 1 )"> [Color] of the relationship lines. </theme_item> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index e97c1e580c..fd157e5eb9 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -208,6 +208,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns the metadata value that was set for the given column using [method set_metadata]. </description> </method> <method name="get_next"> @@ -268,6 +269,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns the value of a [constant CELL_MODE_RANGE] column. </description> </method> <method name="get_range_config"> @@ -276,6 +278,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr". </description> </method> <method name="get_structured_text_bidi_override" qualifiers="const"> @@ -300,6 +303,7 @@ <argument index="0" name="column" type="int"> </argument> <description> + Gets the suffix string shown after the column value. </description> </method> <method name="get_text" qualifiers="const"> @@ -606,6 +610,7 @@ <argument index="1" name="meta" type="Variant"> </argument> <description> + Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data. </description> </method> <method name="set_opentype_feature"> @@ -629,6 +634,7 @@ <argument index="1" name="value" type="float"> </argument> <description> + Sets the value of a [constant CELL_MODE_RANGE] column. </description> </method> <method name="set_range_config"> @@ -645,6 +651,8 @@ <argument index="4" name="expr" type="bool" default="false"> </argument> <description> + Sets the range of accepted values for a column. The column must be in the [constant CELL_MODE_RANGE] mode. + If [code]expr[/code] is [code]true[/code], the edit mode slider will use an exponential scale as with [member Range.exp_edit]. </description> </method> <method name="set_selectable"> @@ -686,6 +694,7 @@ <argument index="1" name="text" type="String"> </argument> <description> + Sets a string to be shown after a column's value (for example, a unit abbreviation). </description> </method> <method name="set_text"> @@ -696,6 +705,7 @@ <argument index="1" name="text" type="String"> </argument> <description> + Sets the given column's text value. </description> </method> <method name="set_text_align"> @@ -748,7 +758,7 @@ Cell contains a string. </constant> <constant name="CELL_MODE_CHECK" value="1" enum="TreeCellMode"> - Cell can be checked. + Cell contains a checkbox. </constant> <constant name="CELL_MODE_RANGE" value="2" enum="TreeCellMode"> Cell contains a range. diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index 2cc3e974e2..e8124d0e6a 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -110,8 +110,10 @@ <method name="commit_action"> <return type="void"> </return> + <argument index="0" name="execute" type="bool" default="true"> + </argument> <description> - Commit the action. All "do" methods/properties are called/set when this function is called. + Commit the action. If [code]execute[/code] is true (default), all "do" methods/properties are called/set when this function is called. </description> </method> <method name="create_action"> @@ -126,11 +128,34 @@ The way actions are merged is dictated by the [code]merge_mode[/code] argument. See [enum MergeMode] for details. </description> </method> + <method name="get_action_name"> + <return type="String"> + </return> + <argument index="0" name="id" type="int"> + </argument> + <description> + Gets the action name from its index. + </description> + </method> + <method name="get_current_action"> + <return type="int"> + </return> + <description> + Gets the index of the current action. + </description> + </method> <method name="get_current_action_name" qualifiers="const"> <return type="String"> </return> <description> - Gets the name of the current action. + Gets the name of the current action, equivalent to [code]get_action_name(get_current_action())[/code]. + </description> + </method> + <method name="get_history_count"> + <return type="int"> + </return> + <description> + Return how many element are in the history. </description> </method> <method name="get_version" qualifiers="const"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 2d129a2c86..ea80b7c248 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -68,7 +68,7 @@ <argument index="0" name="to" type="Vector3"> </argument> <description> - Returns the minimum angle to the given vector, in radians. + Returns the unsigned minimum angle to the given vector, in radians. </description> </method> <method name="bounce"> @@ -465,6 +465,17 @@ Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. </description> </method> + <method name="signed_angle_to"> + <return type="float"> + </return> + <argument index="0" name="to" type="Vector3"> + </argument> + <argument index="1" name="axis" type="Vector3"> + </argument> + <description> + Returns the signed angle to the given vector, in radians. The sign of the angle is positive in a counter-clockwise direction and negative in a clockwise direction when viewed from the side specified by the [code]axis[/code]. + </description> + </method> <method name="slerp"> <return type="Vector3"> </return> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 80f97c3419..b2ab356b0d 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -7,6 +7,7 @@ Control node for playing video streams using [VideoStream] resources. Supported video formats are [url=https://www.webmproject.org/]WebM[/url] ([code].webm[/code], [VideoStreamWebm]), [url=https://www.theora.org/]Ogg Theora[/url] ([code].ogv[/code], [VideoStreamTheora]), and any format exposed via a GDNative plugin using [VideoStreamGDNative]. [b]Note:[/b] Due to a bug, VideoPlayer does not support localization remapping yet. + [b]Warning:[/b] On HTML5, video playback [i]will[/i] perform poorly due to missing architecture-specific assembly optimizations, especially for VP8/VP9. </description> <tutorials> </tutorials> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index e66b8353a8..8120ae539e 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -240,6 +240,8 @@ </member> <member name="sdf_scale" type="int" setter="set_sdf_scale" getter="get_sdf_scale" enum="Viewport.SDFScale" default="1"> </member> + <member name="shadow_atlas_16_bits" type="bool" setter="set_shadow_atlas_16_bits" getter="get_shadow_atlas_16_bits" default="true"> + </member> <member name="shadow_atlas_quad_0" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="2"> The subdivision amount of the first quadrant on the shadow atlas. </member> @@ -252,9 +254,9 @@ <member name="shadow_atlas_quad_3" type="int" setter="set_shadow_atlas_quadrant_subdiv" getter="get_shadow_atlas_quadrant_subdiv" enum="Viewport.ShadowAtlasQuadrantSubdiv" default="4"> The subdivision amount of the fourth quadrant on the shadow atlas. </member> - <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="0"> + <member name="shadow_atlas_size" type="int" setter="set_shadow_atlas_size" getter="get_shadow_atlas_size" default="2048"> The shadow atlas' resolution (used for omni and spot lights). The value will be rounded up to the nearest power of 2. - [b]Note:[/b] If this is set to 0, shadows won't be visible. Since user-created viewports default to a value of 0, this value must be set above 0 manually. + [b]Note:[/b] If this is set to 0, shadows won't be visible. </member> <member name="snap_2d_transforms_to_pixel" type="bool" setter="set_snap_2d_transforms_to_pixel" getter="is_snap_2d_transforms_to_pixel_enabled" default="false"> </member> @@ -409,6 +411,14 @@ </constant> <constant name="DEBUG_DRAW_DISABLE_LOD" value="18" enum="DebugDraw"> </constant> + <constant name="DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="19" enum="DebugDraw"> + </constant> + <constant name="DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="20" enum="DebugDraw"> + </constant> + <constant name="DEBUG_DRAW_CLUSTER_DECALS" value="21" enum="DebugDraw"> + </constant> + <constant name="DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="22" enum="DebugDraw"> + </constant> <constant name="DEFAULT_CANVAS_ITEM_TEXTURE_FILTER_NEAREST" value="0" enum="DefaultCanvasItemTextureFilter"> The texture filter reads from the nearest pixel only. The simplest and fastest method of filtering, but the texture will look pixelized. </constant> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index f03550bd5e..c29c30289a 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -169,6 +169,19 @@ Removes the specified node from the shader. </description> </method> + <method name="replace_node"> + <return type="void"> + </return> + <argument index="0" name="type" type="int" enum="VisualShader.Type"> + </argument> + <argument index="1" name="id" type="int"> + </argument> + <argument index="2" name="new_class" type="StringName"> + </argument> + <description> + Replaces the specified node with a node of new class type. + </description> + </method> <method name="set_mode"> <return type="void"> </return> diff --git a/doc/classes/VisualShaderNodeBooleanConstant.xml b/doc/classes/VisualShaderNodeBooleanConstant.xml index cccb64e874..688679f2a3 100644 --- a/doc/classes/VisualShaderNodeBooleanConstant.xml +++ b/doc/classes/VisualShaderNodeBooleanConstant.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeBooleanConstant" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeBooleanConstant" inherits="VisualShaderNodeConstant" version="4.0"> <brief_description> A boolean constant to be used within the visual shader graph. </brief_description> diff --git a/doc/classes/VisualShaderNodeClamp.xml b/doc/classes/VisualShaderNodeClamp.xml new file mode 100644 index 0000000000..504171bb13 --- /dev/null +++ b/doc/classes/VisualShaderNodeClamp.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeClamp" inherits="VisualShaderNode" version="4.0"> + <brief_description> + Clamps a value within the visual shader graph. + </brief_description> + <description> + Constrains a value to lie between [code]min[/code] and [code]max[/code] values. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeClamp.OpType" default="0"> + A type of operands and returned value. + </member> + </members> + <constants> + <constant name="OP_TYPE_FLOAT" value="0" enum="OpType"> + A floating-point scalar. + </constant> + <constant name="OP_TYPE_INT" value="1" enum="OpType"> + An integer scalar. + </constant> + <constant name="OP_TYPE_VECTOR" value="2" enum="OpType"> + A vector type. + </constant> + <constant name="OP_TYPE_MAX" value="3" enum="OpType"> + Represents the size of the [enum OpType] enum. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeColorConstant.xml b/doc/classes/VisualShaderNodeColorConstant.xml index 9b122ca8e1..8644013ef2 100644 --- a/doc/classes/VisualShaderNodeColorConstant.xml +++ b/doc/classes/VisualShaderNodeColorConstant.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeColorConstant" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeColorConstant" inherits="VisualShaderNodeConstant" version="4.0"> <brief_description> A [Color] constant to be used within the visual shader graph. </brief_description> diff --git a/doc/classes/VisualShaderNodeConstant.xml b/doc/classes/VisualShaderNodeConstant.xml new file mode 100644 index 0000000000..8c61529dd1 --- /dev/null +++ b/doc/classes/VisualShaderNodeConstant.xml @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeConstant" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A base type for the constants within the visual shader graph. + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeFloatConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml index 3ba9ff07d3..a71563af54 100644 --- a/doc/classes/VisualShaderNodeFloatConstant.xml +++ b/doc/classes/VisualShaderNodeFloatConstant.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeFloatConstant" inherits="VisualShaderNodeConstant" version="4.0"> <brief_description> A scalar floating-point constant to be used within the visual shader graph. </brief_description> diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml index 1c407b21ca..18d6e96ab5 100644 --- a/doc/classes/VisualShaderNodeIntConstant.xml +++ b/doc/classes/VisualShaderNodeIntConstant.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeIntConstant" inherits="VisualShaderNodeConstant" version="4.0"> <brief_description> A scalar integer constant to be used within the visual shader graph. </brief_description> diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml index 5c68c0ec71..a9f4144a01 100644 --- a/doc/classes/VisualShaderNodeIntFunc.xml +++ b/doc/classes/VisualShaderNodeIntFunc.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="3"> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeIntFunc.Function" default="2"> A function to be applied to the scalar. See [enum Function] for options. </member> </members> @@ -19,13 +19,10 @@ <constant name="FUNC_ABS" value="0" enum="Function"> Returns the absolute value of the parameter. Translates to [code]abs(x)[/code] in the Godot Shader Language. </constant> - <constant name="FUNC_CLAMP" value="1" enum="Function"> - Constrains a parameter between [code]min[/code] and [code]max[/code]. Translates to [code]clamp(x, min, max)[/code] in the Godot Shader Language. - </constant> - <constant name="FUNC_NEGATE" value="2" enum="Function"> + <constant name="FUNC_NEGATE" value="1" enum="Function"> Negates the [code]x[/code] using [code]-(x)[/code]. </constant> - <constant name="FUNC_SIGN" value="3" enum="Function"> + <constant name="FUNC_SIGN" value="2" enum="Function"> Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeMix.xml b/doc/classes/VisualShaderNodeMix.xml new file mode 100644 index 0000000000..c70ac7e599 --- /dev/null +++ b/doc/classes/VisualShaderNodeMix.xml @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeMix" inherits="VisualShaderNode" version="4.0"> + <brief_description> + Linearly interpolates between two values within the visual shader graph. + </brief_description> + <description> + Translates to [code]mix(a, b, weight)[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeMix.OpType" default="0"> + A type of operands and returned value. + </member> + </members> + <constants> + <constant name="OP_TYPE_SCALAR" value="0" enum="OpType"> + A scalar type. + </constant> + <constant name="OP_TYPE_VECTOR" value="1" enum="OpType"> + A vector type. + </constant> + <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType"> + A vector type. [code]weight[/code] port is using a scalar type. + </constant> + <constant name="OP_TYPE_MAX" value="3" enum="OpType"> + Represents the size of the [enum OpType] enum. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeSDFRaymarch.xml b/doc/classes/VisualShaderNodeSDFRaymarch.xml new file mode 100644 index 0000000000..775f2814c2 --- /dev/null +++ b/doc/classes/VisualShaderNodeSDFRaymarch.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeSDFRaymarch" inherits="VisualShaderNode" version="4.0"> + <brief_description> + SDF raymarching algorithm to be used within the visual shader graph. + </brief_description> + <description> + Casts a ray against the screen SDF (signed-distance field) and returns the distance travelled. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeSDFToScreenUV.xml b/doc/classes/VisualShaderNodeSDFToScreenUV.xml new file mode 100644 index 0000000000..ea04180095 --- /dev/null +++ b/doc/classes/VisualShaderNodeSDFToScreenUV.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeSDFToScreenUV" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A function to convert a SDF (signed-distance field) to screen UV, to be used within the visual shader graph. + </brief_description> + <description> + Translates to [code]sdf_to_screen_uv(sdf_pos)[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeScalarClamp.xml b/doc/classes/VisualShaderNodeScalarClamp.xml deleted file mode 100644 index 7432e8dfca..0000000000 --- a/doc/classes/VisualShaderNodeScalarClamp.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarClamp" inherits="VisualShaderNode" version="4.0"> - <brief_description> - Clamps a scalar value within the visual shader graph. - </brief_description> - <description> - Constrains a value to lie between [code]min[/code] and [code]max[/code] values. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeScalarInterp.xml b/doc/classes/VisualShaderNodeScalarInterp.xml deleted file mode 100644 index 393ea70e1a..0000000000 --- a/doc/classes/VisualShaderNodeScalarInterp.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarInterp" inherits="VisualShaderNode" version="4.0"> - <brief_description> - Linearly interpolates between two scalars within the visual shader graph. - </brief_description> - <description> - Translates to [code]mix(a, b, weight)[/code] in the shader language. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeScalarSmoothStep.xml b/doc/classes/VisualShaderNodeScalarSmoothStep.xml deleted file mode 100644 index e619cc8571..0000000000 --- a/doc/classes/VisualShaderNodeScalarSmoothStep.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarSmoothStep" inherits="VisualShaderNode" version="4.0"> - <brief_description> - Calculates a scalar SmoothStep function within the visual shader graph. - </brief_description> - <description> - Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language. - Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeScalarSwitch.xml b/doc/classes/VisualShaderNodeScalarSwitch.xml deleted file mode 100644 index 2ad5202745..0000000000 --- a/doc/classes/VisualShaderNodeScalarSwitch.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeScalarSwitch" inherits="VisualShaderNodeSwitch" version="4.0"> - <brief_description> - A boolean/scalar function for use within the visual shader graph. - </brief_description> - <description> - Returns an associated scalar if the provided boolean value is [code]true[/code] or [code]false[/code]. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeScreenUVToSDF.xml b/doc/classes/VisualShaderNodeScreenUVToSDF.xml new file mode 100644 index 0000000000..438c8dc67b --- /dev/null +++ b/doc/classes/VisualShaderNodeScreenUVToSDF.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeScreenUVToSDF" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A function to convert screen UV to a SDF (signed-distance field), to be used within the visual shader graph. + </brief_description> + <description> + Translates to [code]screen_uv_to_sdf(uv)[/code] in the shader language. If the UV port isn't connected, [code]SCREEN_UV[/code] is used instead. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeSmoothStep.xml b/doc/classes/VisualShaderNodeSmoothStep.xml new file mode 100644 index 0000000000..fa22d16da8 --- /dev/null +++ b/doc/classes/VisualShaderNodeSmoothStep.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeSmoothStep" inherits="VisualShaderNode" version="4.0"> + <brief_description> + Calculates a SmoothStep function within the visual shader graph. + </brief_description> + <description> + Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language. + Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeSmoothStep.OpType" default="0"> + A type of operands and returned value. + </member> + </members> + <constants> + <constant name="OP_TYPE_SCALAR" value="0" enum="OpType"> + A scalar type. + </constant> + <constant name="OP_TYPE_VECTOR" value="1" enum="OpType"> + A vector type. + </constant> + <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType"> + A vector type. [code]edge0[/code] and [code]edge1[/code] are using a scalar type. + </constant> + <constant name="OP_TYPE_MAX" value="3" enum="OpType"> + Represents the size of the [enum OpType] enum. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeStep.xml b/doc/classes/VisualShaderNodeStep.xml new file mode 100644 index 0000000000..694c144445 --- /dev/null +++ b/doc/classes/VisualShaderNodeStep.xml @@ -0,0 +1,33 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeStep" inherits="VisualShaderNode" version="4.0"> + <brief_description> + Calculates a Step function within the visual shader graph. + </brief_description> + <description> + Translates to [code]step(edge, x)[/code] in the shader language. + Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge[/code] and [code]1.0[/code] otherwise. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeStep.OpType" default="0"> + A type of operands and returned value. + </member> + </members> + <constants> + <constant name="OP_TYPE_SCALAR" value="0" enum="OpType"> + A scalar type. + </constant> + <constant name="OP_TYPE_VECTOR" value="1" enum="OpType"> + A vector type. + </constant> + <constant name="OP_TYPE_VECTOR_SCALAR" value="2" enum="OpType"> + A vector type. [code]edge[/code] port is using a scalar type. + </constant> + <constant name="OP_TYPE_MAX" value="3" enum="OpType"> + Represents the size of the [enum OpType] enum. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml index 9f8a12c0fd..3961070a74 100644 --- a/doc/classes/VisualShaderNodeSwitch.xml +++ b/doc/classes/VisualShaderNodeSwitch.xml @@ -1,15 +1,38 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeSwitch" inherits="VisualShaderNode" version="4.0"> <brief_description> - A boolean/vector function for use within the visual shader graph. + A selector function for use within the visual shader graph. </brief_description> <description> - Returns an associated vector if the provided boolean value is [code]true[/code] or [code]false[/code]. + Returns an associated value of the [code]op_type[/code] type if the provided boolean value is [code]true[/code] or [code]false[/code]. </description> <tutorials> </tutorials> <methods> </methods> + <members> + <member name="op_type" type="int" setter="set_op_type" getter="get_op_type" enum="VisualShaderNodeSwitch.OpType" default="0"> + A type of operands and returned value. + </member> + </members> <constants> + <constant name="OP_TYPE_FLOAT" value="0" enum="OpType"> + A floating-point scalar. + </constant> + <constant name="OP_TYPE_INT" value="1" enum="OpType"> + An integer scalar. + </constant> + <constant name="OP_TYPE_VECTOR" value="2" enum="OpType"> + A vector type. + </constant> + <constant name="OP_TYPE_BOOLEAN" value="3" enum="OpType"> + A boolean type. + </constant> + <constant name="OP_TYPE_TRANSFORM" value="4" enum="OpType"> + A transform type. + </constant> + <constant name="OP_TYPE_MAX" value="5" enum="OpType"> + Represents the size of the [enum OpType] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTextureSDF.xml b/doc/classes/VisualShaderNodeTextureSDF.xml new file mode 100644 index 0000000000..7d3d654bd0 --- /dev/null +++ b/doc/classes/VisualShaderNodeTextureSDF.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeTextureSDF" inherits="VisualShaderNode" version="4.0"> + <brief_description> + Performs a SDF (signed-distance field) texture lookup within the visual shader graph. + </brief_description> + <description> + Translates to [code]texture_sdf(sdf_pos)[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeTextureSDFNormal.xml b/doc/classes/VisualShaderNodeTextureSDFNormal.xml new file mode 100644 index 0000000000..5dbf3e545a --- /dev/null +++ b/doc/classes/VisualShaderNodeTextureSDFNormal.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeTextureSDFNormal" inherits="VisualShaderNode" version="4.0"> + <brief_description> + Performs a SDF (signed-distance field) normal texture lookup within the visual shader graph. + </brief_description> + <description> + Translates to [code]texture_sdf_normal(sdf_pos)[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeTransformConstant.xml b/doc/classes/VisualShaderNodeTransformConstant.xml index e5004e5bb6..b8f054e914 100644 --- a/doc/classes/VisualShaderNodeTransformConstant.xml +++ b/doc/classes/VisualShaderNodeTransformConstant.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeTransformConstant" inherits="VisualShaderNodeConstant" version="4.0"> <brief_description> A [Transform] constant for use within the visual shader graph. </brief_description> diff --git a/doc/classes/VisualShaderNodeVec3Constant.xml b/doc/classes/VisualShaderNodeVec3Constant.xml index 4dfc9dc081..b01bb514fe 100644 --- a/doc/classes/VisualShaderNodeVec3Constant.xml +++ b/doc/classes/VisualShaderNodeVec3Constant.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVec3Constant" inherits="VisualShaderNode" version="4.0"> +<class name="VisualShaderNodeVec3Constant" inherits="VisualShaderNodeConstant" version="4.0"> <brief_description> A [Vector3] constant to be used within the visual shader graph. </brief_description> diff --git a/doc/classes/VisualShaderNodeVectorClamp.xml b/doc/classes/VisualShaderNodeVectorClamp.xml deleted file mode 100644 index 567fed8a41..0000000000 --- a/doc/classes/VisualShaderNodeVectorClamp.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorClamp" inherits="VisualShaderNode" version="4.0"> - <brief_description> - Clamps a vector value within the visual shader graph. - </brief_description> - <description> - Constrains a value to lie between [code]min[/code] and [code]max[/code] values. The operation is performed on each component of the vector individually. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeVectorInterp.xml b/doc/classes/VisualShaderNodeVectorInterp.xml deleted file mode 100644 index b63d34b742..0000000000 --- a/doc/classes/VisualShaderNodeVectorInterp.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorInterp" inherits="VisualShaderNode" version="4.0"> - <brief_description> - Linearly interpolates between two vectors within the visual shader graph. - </brief_description> - <description> - Translates to [code]mix(a, b, weight)[/code] in the shader language, where [code]weight[/code] is a [Vector3] with weights for each component. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeVectorScalarMix.xml b/doc/classes/VisualShaderNodeVectorScalarMix.xml deleted file mode 100644 index 791a9e6be1..0000000000 --- a/doc/classes/VisualShaderNodeVectorScalarMix.xml +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorScalarMix" inherits="VisualShaderNode" version="4.0"> - <brief_description> - Linearly interpolates between two vectors using a scalar. For use within the visual shader graph. - </brief_description> - <description> - Translates to [code]mix(a, b, weight)[/code] in the shader language, where [code]a[/code] and [code]b[/code] are vectors and [code]weight[/code] is a scalar. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml b/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml deleted file mode 100644 index 580abaf5fe..0000000000 --- a/doc/classes/VisualShaderNodeVectorScalarSmoothStep.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorScalarSmoothStep" inherits="VisualShaderNode" version="4.0"> - <brief_description> - Calculates a vector SmoothStep function using scalar within the visual shader graph. - </brief_description> - <description> - Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language, where [code]x[/code] is a scalar. - Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeVectorScalarStep.xml b/doc/classes/VisualShaderNodeVectorScalarStep.xml deleted file mode 100644 index d61414f3a8..0000000000 --- a/doc/classes/VisualShaderNodeVectorScalarStep.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorScalarStep" inherits="VisualShaderNode" version="4.0"> - <brief_description> - Calculates a vector Step function within the visual shader graph. - </brief_description> - <description> - Translates to [code]step(edge, x)[/code] in the shader language. - Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge[/code] and [code]1.0[/code] otherwise. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeVectorSmoothStep.xml b/doc/classes/VisualShaderNodeVectorSmoothStep.xml deleted file mode 100644 index 1b77a3c535..0000000000 --- a/doc/classes/VisualShaderNodeVectorSmoothStep.xml +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeVectorSmoothStep" inherits="VisualShaderNode" version="4.0"> - <brief_description> - Calculates a vector SmoothStep function within the visual shader graph. - </brief_description> - <description> - Translates to [code]smoothstep(edge0, edge1, x)[/code] in the shader language, where [code]x[/code] is a vector. - Returns [code]0.0[/code] if [code]x[/code] is smaller than [code]edge0[/code] and [code]1.0[/code] if [code]x[/code] is larger than [code]edge1[/code]. Otherwise the return value is interpolated between [code]0.0[/code] and [code]1.0[/code] using Hermite polynomials. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 0f887c7705..b99a251a11 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -276,7 +276,7 @@ <method name="set_ime_active"> <return type="void"> </return> - <argument index="0" name="arg0" type="bool"> + <argument index="0" name="active" type="bool"> </argument> <description> </description> @@ -284,7 +284,7 @@ <method name="set_ime_position"> <return type="void"> </return> - <argument index="0" name="arg0" type="Vector2i"> + <argument index="0" name="position" type="Vector2i"> </argument> <description> </description> @@ -474,8 +474,17 @@ </theme_item> <theme_item name="title_font" type="Font"> </theme_item> + <theme_item name="title_font_size" type="int"> + The size of the title font. + </theme_item> <theme_item name="title_height" type="int" default="20"> </theme_item> + <theme_item name="title_outline_modulate" type="Color" default="Color( 1, 1, 1, 1 )"> + The color of the title outline. + </theme_item> + <theme_item name="title_outline_size" type="int" default="0"> + The size of the title outline. + </theme_item> <theme_item name="window_panel" type="StyleBox"> </theme_item> </theme_items> |