diff options
Diffstat (limited to 'doc')
133 files changed, 1957 insertions, 993 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index c86812742c..d4680d1836 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -96,7 +96,7 @@ <argument index="0" name="bytes" type="PackedByteArray" /> <description> Decodes a byte array back to a [Variant] value. Decoding objects is allowed. - [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). + [b]Warning:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). </description> </method> <method name="cartesian2polar"> @@ -212,6 +212,13 @@ Easing function, based on exponent. The curve values are: 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. </description> </method> + <method name="error_string"> + <return type="String" /> + <argument index="0" name="error" type="int" /> + <description> + Returns a human-readable name for the given error code. + </description> + </method> <method name="exp"> <return type="float" /> <argument index="0" name="x" type="float" /> @@ -511,7 +518,7 @@ nearest_po2(0) # Returns 0 (this may not be what you expect) nearest_po2(-1) # Returns 0 (this may not be what you expect) [/codeblock] - [b]WARNING:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2). + [b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2). </description> </method> <method name="polar2cartesian"> @@ -1128,6 +1135,36 @@ <constant name="VALIGN_BOTTOM" value="2" enum="VAlign"> Vertical bottom alignment, usually for text-derived classes. </constant> + <constant name="INLINE_ALIGN_TOP_TO" value="0" enum="InlineAlign"> + Aligns the top of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant. + </constant> + <constant name="INLINE_ALIGN_CENTER_TO" value="1" enum="InlineAlign"> + Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant. + </constant> + <constant name="INLINE_ALIGN_BOTTOM_TO" value="2" enum="InlineAlign"> + Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant. + </constant> + <constant name="INLINE_ALIGN_TO_TOP" value="0" enum="InlineAlign"> + Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the top of the text. + </constant> + <constant name="INLINE_ALIGN_TO_CENTER" value="4" enum="InlineAlign"> + Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the center of the text. + </constant> + <constant name="INLINE_ALIGN_TO_BASELINE" value="8" enum="InlineAlign"> + Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the baseline of the text. + </constant> + <constant name="INLINE_ALIGN_TO_BOTTOM" value="12" enum="InlineAlign"> + Aligns inline object (e.g. image, table) to the bottom of the text. + </constant> + <constant name="INLINE_ALIGN_TOP" value="0" enum="InlineAlign"> + Aligns top of the inline object (e.g. image, table) to the top of the text. Equvalent to [code]INLINE_ALIGN_TOP_TO | INLINE_ALIGN_TO_TOP[/code]. + </constant> + <constant name="INLINE_ALIGN_CENTER" value="5" enum="InlineAlign"> + Aligns center of the inline object (e.g. image, table) to the center of the text. Equvalent to [code]INLINE_ALIGN_CENTER_TO | INLINE_ALIGN_TO_CENTER[/code]. + </constant> + <constant name="INLINE_ALIGN_BOTTOM" value="14" enum="InlineAlign"> + Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equvalent to [code]INLINE_ALIGN_BOTTOM_TO | INLINE_ALIGN_TO_BOTTOM[/code]. + </constant> <constant name="SPKEY" value="16777216"> Keycodes with this bit applied are non-printable. </constant> @@ -2276,6 +2313,8 @@ <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="23" enum="PropertyHint"> Hints that an image is compressed using lossless compression. </constant> + <constant name="PROPERTY_HINT_OBJECT_ID" value="24" enum="PropertyHint"> + </constant> <constant name="PROPERTY_HINT_TYPE_STRING" value="25" enum="PropertyHint"> Hint that a property represents a particular type. If a property is [constant TYPE_STRING], allows to set a type from the create dialog. If you need to create an [Array] to contain elements of a specific type, the [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code] for specifying [Resource] types. For instance: [codeblock] @@ -2286,6 +2325,38 @@ [/codeblock] [b]Note:[/b] the final colon is required to specify for properly detecting built-in types. </constant> + <constant name="PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" value="26" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_METHOD_OF_VARIANT_TYPE" value="27" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_METHOD_OF_BASE_TYPE" value="28" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_METHOD_OF_INSTANCE" value="29" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_METHOD_OF_SCRIPT" value="30" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE" value="31" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_PROPERTY_OF_BASE_TYPE" value="32" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_PROPERTY_OF_INSTANCE" value="33" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_PROPERTY_OF_SCRIPT" value="34" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="35" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="36" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_SAVE_FILE" value="37" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="38" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_MAX" value="40" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags"> + </constant> <constant name="PROPERTY_USAGE_STORAGE" value="1" enum="PropertyUsageFlags"> The property is serialized and saved in the scene file (default). </constant> @@ -2325,6 +2396,36 @@ <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="8192" enum="PropertyUsageFlags"> The property is a script variable which should be serialized and saved in the scene file. </constant> + <constant name="PROPERTY_USAGE_STORE_IF_NULL" value="16384" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_ANIMATE_AS_TRIGGER" value="32768" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="65536" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="131072" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="262144" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="524288" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_INTERNAL" value="1048576" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="2097152" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="4194304" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="8388608" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="16777216" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="33554432" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="67108864" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="134217728" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="268435456" enum="PropertyUsageFlags"> + </constant> <constant name="PROPERTY_USAGE_DEFAULT" value="7" enum="PropertyUsageFlags"> Default usage (storage, editor and network). </constant> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index 868ec5a774..077c062d6b 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -93,7 +93,7 @@ <constants> </constants> <theme_items> - <theme_item name="panel" type="StyleBox"> + <theme_item name="panel" data_type="style" type="StyleBox"> Panel that fills up the background of the window. </theme_item> </theme_items> diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index 12a13ecfcc..66fa57cb52 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -311,8 +311,8 @@ <member name="device" type="String" setter="set_device" getter="get_device" default=""Default""> Name of the current device for audio output (see [method get_device_list]). </member> - <member name="global_rate_scale" type="float" setter="set_global_rate_scale" getter="get_global_rate_scale" default="1.0"> - Scales the rate at which audio is played (i.e. setting it to [code]0.5[/code] will make the audio be played twice as fast). + <member name="playback_speed_scale" type="float" setter="set_playback_speed_scale" getter="get_playback_speed_scale" default="1.0"> + Scales the rate at which audio is played (i.e. setting it to [code]0.5[/code] will make the audio be played at half its speed). </member> </members> <signals> diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index 9a4dd15c63..8fab84d885 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -109,6 +109,15 @@ Returns [code]true[/code] if this basis and [code]b[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> + <method name="looking_at" qualifiers="static"> + <return type="Basis" /> + <argument index="0" name="target" type="Vector3" /> + <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> + <description> + Creates a Basis with a rotation such that the forward axis (-Z) points towards the [code]target[/code] position. + The up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The [code]target[/code] and [code]up[/code] vectors cannot be zero, and cannot be parallel to each other. + </description> + </method> <method name="operator !=" qualifiers="operator"> <return type="bool" /> <argument index="0" name="right" type="Basis" /> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 823eda9c33..dfbd6c0680 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -104,64 +104,64 @@ </constant> </constants> <theme_items> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> [StyleBox] used when the [Button] is disabled. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> [StyleBox] used when the [Button] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the [Button]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [Button]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="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_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="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_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_hover_pressed_color" data_type="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)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [Button]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_pressed_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [Button]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> [StyleBox] used when the [Button] is being hovered. </theme_item> - <theme_item name="hseparation" type="int" default="2"> + <theme_item name="hseparation" data_type="constant" 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)"> + <theme_item name="icon_disabled_color" data_type="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)"> + <theme_item name="icon_hover_color" data_type="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)"> + <theme_item name="icon_hover_pressed_color" data_type="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)"> + <theme_item name="icon_normal_color" data_type="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)"> + <theme_item name="icon_pressed_color" data_type="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"> + <theme_item name="normal" data_type="style" type="StyleBox"> Default [StyleBox] for the [Button]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> [StyleBox] used when the [Button] is being pressed. </theme_item> </theme_items> diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index 2ada0c556d..8a91a91b22 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -29,11 +29,11 @@ Gets the camera transform. Subclassed cameras such as [ClippedCamera3D] may provide different transforms than the [Node] transform. </description> </method> - <method name="get_cull_mask_bit" qualifiers="const"> + <method name="get_cull_mask_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="layer" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns [code]true[/code] if the given [code]layer[/code] in the [member cull_mask] is enabled, [code]false[/code] otherwise. + Returns whether or not the specified layer of the [member cull_mask] is enabled, given a [code]layer_number[/code] between 1 and 20. </description> </method> <method name="get_frustum" qualifiers="const"> @@ -92,12 +92,12 @@ Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. </description> </method> - <method name="set_cull_mask_bit"> + <method name="set_cull_mask_value"> <return type="void" /> - <argument index="0" name="layer" type="int" /> - <argument index="1" name="enable" type="bool" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - Enables or disables the given [code]layer[/code] in the [member cull_mask]. + Based on [code]value[/code], enables or disables the specified layer in the [member cull_mask], given a [code]layer_number[/code] between 1 and 20. </description> </method> <method name="set_frustum"> diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml index fc7dcd3772..2dda36a1bc 100644 --- a/doc/classes/CameraFeed.xml +++ b/doc/classes/CameraFeed.xml @@ -10,7 +10,60 @@ <tutorials> </tutorials> <methods> + <method name="get_datatype" qualifiers="const"> + <return type="int" enum="CameraFeed.FeedDataType" /> + <description> + Returns feed image data type. + </description> + </method> + <method name="get_id" qualifiers="const"> + <return type="int" /> + <description> + Returns the unique ID for this feed. + </description> + </method> + <method name="get_name" qualifiers="const"> + <return type="String" /> + <description> + Returns the camera's name. + </description> + </method> + <method name="get_position" qualifiers="const"> + <return type="int" enum="CameraFeed.FeedPosition" /> + <description> + Returns the position of camera on the device. + </description> + </method> </methods> + <members> + <member name="feed_is_active" type="bool" setter="set_active" getter="is_active" default="false"> + If [code]true[/code], the feed is active. + </member> + <member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, -1, 0, 1)"> + The transform applied to the camera's image. + </member> + </members> <constants> + <constant name="FEED_NOIMAGE" value="0" enum="FeedDataType"> + No image set for the feed. + </constant> + <constant name="FEED_RGB" value="1" enum="FeedDataType"> + Feed supplies RGB images. + </constant> + <constant name="FEED_YCBCR" value="2" enum="FeedDataType"> + Feed supplies YCbCr images that need to be converted to RGB. + </constant> + <constant name="FEED_YCBCR_SEP" value="3" enum="FeedDataType"> + Feed supplies separate Y and CbCr images that need to be combined and converted to RGB. + </constant> + <constant name="FEED_UNSPECIFIED" value="0" enum="FeedPosition"> + Unspecified position. + </constant> + <constant name="FEED_FRONT" value="1" enum="FeedPosition"> + Camera is mounted at the front of the device. + </constant> + <constant name="FEED_BACK" value="2" enum="FeedPosition"> + Camera is mounted at the back of the device. + </constant> </constants> </class> diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml index 031abd0112..b8605ccaec 100644 --- a/doc/classes/CapsuleMesh.xml +++ b/doc/classes/CapsuleMesh.xml @@ -11,9 +11,8 @@ <methods> </methods> <members> - <member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height" default="1.0"> - Height of the middle cylindrical part of the capsule (without the hemispherical ends). - [b]Note:[/b] The capsule's total height is equal to [member mid_height] + 2 * [member radius]. + <member name="height" type="float" setter="set_height" getter="get_height" default="3.0"> + Total height of the capsule mesh (including the hemispherical ends). </member> <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64"> Number of radial segments on the capsule mesh. diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml index 290d260f0f..8ed7d56557 100644 --- a/doc/classes/CapsuleShape2D.xml +++ b/doc/classes/CapsuleShape2D.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="height" type="float" setter="set_height" getter="get_height" default="20.0"> + <member name="height" type="float" setter="set_height" getter="get_height" default="30.0"> The capsule's height. </member> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0"> diff --git a/doc/classes/CapsuleShape3D.xml b/doc/classes/CapsuleShape3D.xml index 27a6242bc9..c2b13224cf 100644 --- a/doc/classes/CapsuleShape3D.xml +++ b/doc/classes/CapsuleShape3D.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="height" type="float" setter="set_height" getter="get_height" default="1.0"> + <member name="height" type="float" setter="set_height" getter="get_height" default="3.0"> The capsule's height. </member> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index 1ace7ee6bf..a20b0aeea6 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -21,10 +21,10 @@ Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. </description> </method> - <method name="get_floor_velocity" qualifiers="const"> + <method name="get_platform_velocity" qualifiers="const"> <return type="Vector2" /> <description> - Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. + Returns the linear velocity of the platform at the last collision point. Only valid after calling [method move_and_slide]. </description> </method> <method name="get_slide_collision"> @@ -61,24 +61,43 @@ Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. </description> </method> + <method name="is_on_ceiling_only" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> <method name="is_on_floor" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. </description> </method> + <method name="is_on_floor_only" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> <method name="is_on_wall" qualifiers="const"> <return type="bool" /> <description> Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. </description> </method> + <method name="is_on_wall_only" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> <method name="move_and_slide"> <return type="void" /> <description> Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. Modifies [member linear_velocity] if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. + When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. </description> </method> </methods> @@ -89,11 +108,19 @@ A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. </member> + <member name="constant_speed_on_floor" type="bool" setter="set_constant_speed_on_floor_enabled" getter="is_constant_speed_on_floor_enabled" default="false"> + If [code]false[/code] (by default), the body will move faster on downward slopes and slower on upward slopes. + If [code]true[/code], the body will always move at the same speed on the ground no matter the slope. Note that you need to use [member floor_snap_length] to stick along a downward slope at constant speed. + </member> + <member name="exclude_body_layers" type="int" setter="set_exclude_body_layers" getter="get_exclude_body_layers" default="0"> + Collision layers that will be excluded for detecting bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all touching bodies are detected and propagate their velocity. You can add excluded layers to ignore bodies that are contained in these layers. + </member> <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398"> Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. </member> - <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true"> - If [code]true[/code], the body will be able to push [RigidBody2D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D]. + <member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="0.0"> + Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction]. + As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping. </member> <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)"> Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide]. @@ -101,9 +128,11 @@ <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4"> Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. </member> - <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2(0, 0)"> - When set to a value different from [code]Vector2(0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide]. - As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector2(0, 0)[/code]. + <member name="move_on_floor_only" type="bool" setter="set_move_on_floor_only_enabled" getter="is_move_on_floor_only_enabled" default="true"> + If [code]true[/code], the body will be able to move on the floor only, this option avoids to be able to walk on walls, it will however allow to slide down along them. + </member> + <member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true"> + If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically. </member> <member name="stop_on_slope" type="bool" setter="set_stop_on_slope_enabled" getter="is_stop_on_slope_enabled" default="false"> If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index 577ab5e84c..7dc4ae9be3 100644 --- a/doc/classes/CharacterBody3D.xml +++ b/doc/classes/CharacterBody3D.xml @@ -65,6 +65,7 @@ Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. Modifies [member linear_velocity] if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. + When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. </description> </method> </methods> @@ -78,9 +79,6 @@ <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398"> Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. </member> - <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true"> - If [code]true[/code], the body will be able to push [RigidBody3D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D]. - </member> <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)"> Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide]. </member> diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index 90f3725172..f13a6ea34a 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -18,76 +18,76 @@ <constants> </constants> <theme_items> - <theme_item name="check_vadjust" type="int" default="0"> + <theme_item name="check_vadjust" data_type="constant" type="int" default="0"> The vertical offset used when rendering the check icons (in pixels). </theme_item> - <theme_item name="checked" type="Texture2D"> + <theme_item name="checked" data_type="icon" type="Texture2D"> The check icon to display when the [CheckBox] is checked. </theme_item> - <theme_item name="checked_disabled" type="Texture2D"> + <theme_item name="checked_disabled" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is disabled. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is focused. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> The [Font] to use for the [CheckBox] text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> The [CheckBox] text's font color. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="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_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="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_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_hover_pressed_color" data_type="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_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_pressed_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [CheckBox]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is hovered. </theme_item> - <theme_item name="hover_pressed" type="StyleBox"> + <theme_item name="hover_pressed" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed. </theme_item> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The separation between the check icon and the text (in pixels). </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> The [StyleBox] to display as a background. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is pressed. </theme_item> - <theme_item name="radio_checked" type="Texture2D"> + <theme_item name="radio_checked" data_type="icon" type="Texture2D"> If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked. </theme_item> - <theme_item name="radio_checked_disabled" type="Texture2D"> + <theme_item name="radio_checked_disabled" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="radio_unchecked" type="Texture2D"> + <theme_item name="radio_unchecked" data_type="icon" type="Texture2D"> If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked. </theme_item> - <theme_item name="radio_unchecked_disabled" type="Texture2D"> + <theme_item name="radio_unchecked_disabled" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="unchecked" type="Texture2D"> + <theme_item name="unchecked" data_type="icon" type="Texture2D"> The check icon to display when the [CheckBox] is unchecked. </theme_item> - <theme_item name="unchecked_disabled" type="Texture2D"> + <theme_item name="unchecked_disabled" data_type="icon" type="Texture2D"> </theme_item> </theme_items> </class> diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index 7fa7093b32..a0a05bcb79 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -18,79 +18,79 @@ <constants> </constants> <theme_items> - <theme_item name="check_vadjust" type="int" default="0"> + <theme_item name="check_vadjust" data_type="constant" type="int" default="0"> The vertical offset used when rendering the toggle icons (in pixels). </theme_item> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is disabled. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is focused. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> The [Font] to use for the [CheckButton] text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> The [CheckButton] text's font color. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="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_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="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_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_hover_pressed_color" data_type="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_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_pressed_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [CheckButton]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is hovered. </theme_item> - <theme_item name="hover_pressed" type="StyleBox"> + <theme_item name="hover_pressed" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed. </theme_item> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The separation between the toggle icon and the text (in pixels). </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> The [StyleBox] to display as a background. </theme_item> - <theme_item name="off" type="Texture2D"> + <theme_item name="off" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is unchecked (for left-to-right layouts). </theme_item> - <theme_item name="off_disabled" type="Texture2D"> + <theme_item name="off_disabled" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is unchecked and disabled (for left-to-right layouts). </theme_item> - <theme_item name="off_disabled_mirrored" type="Texture2D"> + <theme_item name="off_disabled_mirrored" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is unchecked and disabled (for right-to-left layouts). </theme_item> - <theme_item name="off_mirrored" type="Texture2D"> + <theme_item name="off_mirrored" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is unchecked (for right-to-left layouts). </theme_item> - <theme_item name="on" type="Texture2D"> + <theme_item name="on" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is checked (for left-to-right layouts). </theme_item> - <theme_item name="on_disabled" type="Texture2D"> + <theme_item name="on_disabled" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is checked and disabled (for left-to-right layouts). </theme_item> - <theme_item name="on_disabled_mirrored" type="Texture2D"> + <theme_item name="on_disabled_mirrored" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is checked and disabled (for right-to-left layouts). </theme_item> - <theme_item name="on_mirrored" type="Texture2D"> + <theme_item name="on_mirrored" data_type="icon" 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"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is pressed. </theme_item> </theme_items> diff --git a/doc/classes/ClippedCamera3D.xml b/doc/classes/ClippedCamera3D.xml index 1a76412826..1a0d3499cd 100644 --- a/doc/classes/ClippedCamera3D.xml +++ b/doc/classes/ClippedCamera3D.xml @@ -35,12 +35,11 @@ Returns the distance the camera has been offset due to a collision. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> + <method name="get_collision_mask_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns [code]true[/code] if the specified bit index is on. - [b]Note:[/b] Bit indices range from 0-19. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="remove_exception"> @@ -57,13 +56,12 @@ Removes a collision exception with the specified [RID]. </description> </method> - <method name="set_collision_mask_bit"> + <method name="set_collision_mask_value"> <return type="void" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> - Sets the specified bit index to the [code]value[/code]. - [b]Note:[/b] Bit indices range from 0-19. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> </methods> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index 0b060ec277..47078330f3 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -560,128 +560,128 @@ </constant> </constants> <theme_items> - <theme_item name="background_color" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="background_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> Sets the background [Color]. </theme_item> - <theme_item name="bookmark" type="Texture2D"> + <theme_item name="bookmark" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] to draw in the bookmark gutter for bookmarked lines. </theme_item> - <theme_item name="bookmark_color" type="Color" default="Color(0.5, 0.64, 1, 0.8)"> + <theme_item name="bookmark_color" data_type="color" type="Color" default="Color(0.5, 0.64, 1, 0.8)"> [Color] of the bookmark icon for bookmarked lines. </theme_item> - <theme_item name="brace_mismatch_color" type="Color" default="Color(1, 0.2, 0.2, 1)"> + <theme_item name="brace_mismatch_color" data_type="color" type="Color" default="Color(1, 0.2, 0.2, 1)"> [Color] of the text to highlight mismatched braces. </theme_item> - <theme_item name="breakpoint" type="Texture2D"> + <theme_item name="breakpoint" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] to draw in the breakpoint gutter for breakpointed lines. </theme_item> - <theme_item name="breakpoint_color" type="Color" default="Color(0.9, 0.29, 0.3, 1)"> + <theme_item name="breakpoint_color" data_type="color" type="Color" default="Color(0.9, 0.29, 0.3, 1)"> [Color] of the breakpoint icon for bookmarked lines. </theme_item> - <theme_item name="can_fold" type="Texture2D"> + <theme_item name="can_fold" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] to draw in the line folding gutter when a line can be folded. </theme_item> - <theme_item name="caret_background_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> [Color] of the text behind the caret when block caret is enabled. </theme_item> - <theme_item name="caret_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> [Color] of the caret. </theme_item> - <theme_item name="code_folding_color" type="Color" default="Color(0.8, 0.8, 0.8, 0.8)"> + <theme_item name="code_folding_color" data_type="color" type="Color" default="Color(0.8, 0.8, 0.8, 0.8)"> [Color] for all icons related to line folding. </theme_item> - <theme_item name="completion" type="StyleBox"> + <theme_item name="completion" data_type="style" type="StyleBox"> [StyleBox] for the code completion popup. </theme_item> - <theme_item name="completion_background_color" type="Color" default="Color(0.17, 0.16, 0.2, 1)"> + <theme_item name="completion_background_color" data_type="color" type="Color" default="Color(0.17, 0.16, 0.2, 1)"> Sets the background [Color] for the code completion popup. </theme_item> - <theme_item name="completion_existing_color" type="Color" default="Color(0.87, 0.87, 0.87, 0.13)"> + <theme_item name="completion_existing_color" data_type="color" type="Color" default="Color(0.87, 0.87, 0.87, 0.13)"> Background highlight [Color] for matching text in code completion options. </theme_item> - <theme_item name="completion_font_color" type="Color" default="Color(0.67, 0.67, 0.67, 1)"> + <theme_item name="completion_font_color" data_type="color" type="Color" default="Color(0.67, 0.67, 0.67, 1)"> Font [Color] for the code completion popup. </theme_item> - <theme_item name="completion_lines" type="int" default="7"> + <theme_item name="completion_lines" data_type="constant" type="int" default="7"> Max number of options to display in the code completion popup at any one time. </theme_item> - <theme_item name="completion_max_width" type="int" default="50"> + <theme_item name="completion_max_width" data_type="constant" type="int" default="50"> Max width of options in the code completion popup. Options longer then this will be cut off. </theme_item> - <theme_item name="completion_scroll_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="completion_scroll_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> [Color] of the scrollbar in the code completion popup. </theme_item> - <theme_item name="completion_scroll_width" type="int" default="3"> + <theme_item name="completion_scroll_width" data_type="constant" type="int" default="3"> Width of the scrollbar in the code completion popup. </theme_item> - <theme_item name="completion_selected_color" type="Color" default="Color(0.26, 0.26, 0.27, 1)"> + <theme_item name="completion_selected_color" data_type="color" type="Color" default="Color(0.26, 0.26, 0.27, 1)"> Background highlight [Color] for the current selected option item in the code completion popup. </theme_item> - <theme_item name="current_line_color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)"> + <theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)"> Background [Color] of the line containing the caret. </theme_item> - <theme_item name="executing_line" type="Texture2D"> + <theme_item name="executing_line" data_type="icon" type="Texture2D"> Icon to draw in the executing gutter for executing lines. </theme_item> - <theme_item name="executing_line_color" type="Color" default="Color(0.98, 0.89, 0.27, 1)"> + <theme_item name="executing_line_color" data_type="color" type="Color" default="Color(0.98, 0.89, 0.27, 1)"> [Color] of the executing icon for executing lines. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> Sets the [StyleBox] when in focus. </theme_item> - <theme_item name="folded" type="Texture2D"> + <theme_item name="folded" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] to draw in the line folding gutter when a line is folded and can be unfolded. </theme_item> - <theme_item name="folded_eol_icon" type="Texture2D"> + <theme_item name="folded_eol_icon" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] to draw at the end of a folded line. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> Sets the default [Font]. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Sets the font [Color]. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [CodeEdit]. </theme_item> - <theme_item name="font_readonly_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> - Sets the font [Color] when [member readonly] is enabled. + <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> + Sets the font [Color] when [member TextEdit.editable] is disabled. </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 name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> + Sets the [Color] of the selected text. [member TextEdit.override_selected_font_color] has to be enabled. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Sets default font size. </theme_item> - <theme_item name="line_length_guideline_color" type="Color" default="Color(0.3, 0.5, 0.8, 0.1)"> + <theme_item name="line_length_guideline_color" data_type="color" type="Color" default="Color(0.3, 0.5, 0.8, 0.1)"> [Color] of the main line length guideline, secondary guidelines will have 50% alpha applied. </theme_item> - <theme_item name="line_number_color" type="Color" default="Color(0.67, 0.67, 0.67, 0.4)"> + <theme_item name="line_number_color" data_type="color" type="Color" default="Color(0.67, 0.67, 0.67, 0.4)"> Sets the [Color] of line numbers. </theme_item> - <theme_item name="line_spacing" type="int" default="4"> + <theme_item name="line_spacing" data_type="constant" type="int" default="4"> Sets the spacing between the lines. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Sets the [StyleBox]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="read_only" type="StyleBox"> - Sets the [StyleBox] when [member readonly] is enabled. + <theme_item name="read_only" data_type="style" type="StyleBox"> + Sets the [StyleBox] when [member TextEdit.editable] is disabled. </theme_item> - <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> + <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> Sets the highlight [Color] of text selections. </theme_item> - <theme_item name="space" type="Texture2D"> + <theme_item name="space" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] for space text characters. </theme_item> - <theme_item name="tab" type="Texture2D"> + <theme_item name="tab" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] for tab text characters. </theme_item> - <theme_item name="word_highlighted_color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)"> - Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled. + <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)"> + Sets the highlight [Color] of multiple occurrences. [member TextEdit.highlight_all_occurrences] has to be enabled. </theme_item> </theme_items> </class> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index 6bb756ea2c..7129c72e7c 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -25,18 +25,18 @@ Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. </description> </method> - <method name="get_collision_layer_bit" qualifiers="const"> + <method name="get_collision_layer_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified [code]bit[/code] of the [member collision_layer] is set. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> + <method name="get_collision_mask_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified [code]bit[/code] of the [member collision_mask] is set. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_rid" qualifiers="const"> @@ -79,22 +79,20 @@ Removes the given shape owner. </description> </method> - <method name="set_collision_layer_bit"> + <method name="set_collision_layer_value"> <return type="void" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> - If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_layer]. - If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_layer]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="set_collision_mask_bit"> + <method name="set_collision_mask_value"> <return type="void" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> - If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_mask]. - If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_mask]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="shape_find_owner" qualifiers="const"> diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml index 0210f6297f..f9151a2c2f 100644 --- a/doc/classes/CollisionObject3D.xml +++ b/doc/classes/CollisionObject3D.xml @@ -27,18 +27,18 @@ Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. </description> </method> - <method name="get_collision_layer_bit" qualifiers="const"> + <method name="get_collision_layer_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified [code]bit[/code] of the [member collision_layer] is set. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> + <method name="get_collision_mask_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified [code]bit[/code] of the [member collision_mask] is set. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_rid" qualifiers="const"> @@ -67,22 +67,20 @@ Removes the given shape owner. </description> </method> - <method name="set_collision_layer_bit"> + <method name="set_collision_layer_value"> <return type="void" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> - If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_layer]. - If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_layer]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="set_collision_mask_bit"> + <method name="set_collision_mask_value"> <return type="void" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> - If [code]value[/code] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_mask]. - If [code]value[/code] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_mask]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="shape_find_owner" qualifiers="const"> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 7b357034eb..99e121de75 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -92,39 +92,39 @@ </constant> </constants> <theme_items> - <theme_item name="add_preset" type="Texture2D"> + <theme_item name="add_preset" data_type="icon" type="Texture2D"> The icon for the "Add Preset" button. </theme_item> - <theme_item name="bar_arrow" type="Texture2D"> + <theme_item name="bar_arrow" data_type="icon" type="Texture2D"> The texture for the arrow grabber. </theme_item> - <theme_item name="color_hue" type="Texture2D"> + <theme_item name="color_hue" data_type="icon" type="Texture2D"> Custom texture for the hue selection slider on the right. </theme_item> - <theme_item name="color_sample" type="Texture2D"> + <theme_item name="color_sample" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="h_width" type="int" default="30"> + <theme_item name="h_width" data_type="constant" type="int" default="30"> The width of the hue selection slider. </theme_item> - <theme_item name="label_width" type="int" default="10"> + <theme_item name="label_width" data_type="constant" type="int" default="10"> </theme_item> - <theme_item name="margin" type="int" default="4"> + <theme_item name="margin" data_type="constant" type="int" default="4"> The margin around the [ColorPicker]. </theme_item> - <theme_item name="overbright_indicator" type="Texture2D"> + <theme_item name="overbright_indicator" data_type="icon" type="Texture2D"> The indicator used to signalize that the color value is outside the 0-1 range. </theme_item> - <theme_item name="picker_cursor" type="Texture2D"> + <theme_item name="picker_cursor" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="preset_bg" type="Texture2D"> + <theme_item name="preset_bg" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="screen_picker" type="Texture2D"> + <theme_item name="screen_picker" data_type="icon" type="Texture2D"> The icon for the screen color picker button. </theme_item> - <theme_item name="sv_height" type="int" default="256"> + <theme_item name="sv_height" data_type="constant" type="int" default="256"> The height of the saturation-value selection box. </theme_item> - <theme_item name="sv_width" type="int" default="256"> + <theme_item name="sv_width" data_type="constant" type="int" default="256"> The width of the saturation-value selection box. </theme_item> </theme_items> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index 770daa79c6..6b5a9f2503 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -55,49 +55,49 @@ <constants> </constants> <theme_items> - <theme_item name="bg" type="Texture2D"> + <theme_item name="bg" data_type="icon" type="Texture2D"> The background of the color preview rect on the button. </theme_item> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> [StyleBox] used when the [ColorPickerButton] is disabled. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> [StyleBox] used when the [ColorPickerButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the [ColorPickerButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Default text [Color] of the [ColorPickerButton]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.3)"> + <theme_item name="font_disabled_color" data_type="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_hover_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [ColorPickerButton] is being hovered. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_pressed_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [ColorPickerButton]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> [StyleBox] used when the [ColorPickerButton] is being hovered. </theme_item> - <theme_item name="hseparation" type="int" default="2"> + <theme_item name="hseparation" data_type="constant" type="int" default="2"> The horizontal space between [ColorPickerButton]'s icon and text. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Default [StyleBox] for the [ColorPickerButton]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> [StyleBox] used when the [ColorPickerButton] is being pressed. </theme_item> </theme_items> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 43e3c97bff..0834521c91 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -306,6 +306,18 @@ [/codeblocks] </description> </method> + <method name="begin_bulk_theme_override"> + <return type="void" /> + <description> + Prevents [code]*_theme_*_override[/code] methods from emitting [constant NOTIFICATION_THEME_CHANGED] until [method end_bulk_theme_override] is called. + </description> + </method> + <method name="end_bulk_theme_override"> + <return type="void" /> + <description> + Ends a bulk theme override update. See [method begin_bulk_theme_override]. + </description> + </method> <method name="find_next_valid_focus" qualifiers="const"> <return type="Control" /> <description> diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml index 4f51adb8fc..0060368207 100644 --- a/doc/classes/DirectionalLight3D.xml +++ b/doc/classes/DirectionalLight3D.xml @@ -36,7 +36,6 @@ <member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param" default="0.5"> The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_4_SPLITS[/code]. </member> - <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.05" /> <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" override="true" default="1.0" /> <member name="use_in_sky_only" type="bool" setter="set_sky_only" getter="is_sky_only" default="false"> If [code]true[/code], this [DirectionalLight3D] will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon. diff --git a/doc/classes/EditorCommandPalette.xml b/doc/classes/EditorCommandPalette.xml new file mode 100644 index 0000000000..743c59eec2 --- /dev/null +++ b/doc/classes/EditorCommandPalette.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorCommandPalette" inherits="ConfirmationDialog" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_command"> + <return type="void" /> + <argument index="0" name="command_name" type="String" /> + <argument index="1" name="key_name" type="String" /> + <argument index="2" name="binded_callable" type="Callable" /> + <argument index="3" name="shortcut_text" type="String" default=""None"" /> + <description> + </description> + </method> + <method name="remove_command"> + <return type="void" /> + <argument index="0" name="key_name" type="String" /> + <description> + </description> + </method> + </methods> + <members> + <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" /> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 6b4a2b03a3..6befe32e7a 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -14,7 +14,7 @@ <return type="String" /> <argument index="0" name="path" type="String" /> <description> - Gets the type of the file, given the full path. + Returns the resource type of the file, given the full path. This returns a string such as [code]"Resource"[/code] or [code]"GDScript"[/code], [i]not[/i] a file extension such as [code]".gd"[/code]. </description> </method> <method name="get_filesystem"> diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml index 28793cb8af..a8f94101a7 100644 --- a/doc/classes/EditorFileSystemDirectory.xml +++ b/doc/classes/EditorFileSystemDirectory.xml @@ -68,7 +68,7 @@ <return type="StringName" /> <argument index="0" name="idx" type="int" /> <description> - Returns the file extension of the file at index [code]idx[/code]. + Returns the resource type of the file at index [code]idx[/code]. This returns a string such as [code]"Resource"[/code] or [code]"GDScript"[/code], [i]not[/i] a file extension such as [code]".gd"[/code]. </description> </method> <method name="get_name"> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index 085568466a..62fd7a1d6e 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -13,6 +13,7 @@ On each of these calls, the "add" functions can be called. </description> <tutorials> + <link title="Inspector plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/inspector_plugins.html</link> </tutorials> <methods> <method name="_can_handle" qualifiers="virtual"> @@ -56,7 +57,7 @@ <return type="void" /> <argument index="0" name="control" type="Control" /> <description> - Adds a custom control, not necessarily a property editor. + Adds a custom control, which is not necessarily a property editor. </description> </method> <method name="add_property_editor"> @@ -64,7 +65,7 @@ <argument index="0" name="property" type="String" /> <argument index="1" name="editor" type="Control" /> <description> - Adds a property editor, this must inherit [EditorProperty]. + Adds a property editor for an individual property. The [code]editor[/code] control must extend [EditorProperty]. </description> </method> <method name="add_property_editor_for_multiple_properties"> @@ -73,7 +74,7 @@ <argument index="1" name="properties" type="PackedStringArray" /> <argument index="2" name="editor" type="Control" /> <description> - Adds an editor that allows modifying multiple properties, this must inherit [EditorProperty]. + Adds an editor that allows modifying multiple properties. The [code]editor[/code] control must extend [EditorProperty]. </description> </method> </methods> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index 185b4f8c39..91e1dfbf57 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -30,6 +30,11 @@ Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. </description> </method> + <method name="get_command_palette" qualifiers="const"> + <return type="EditorCommandPalette" /> + <description> + </description> + </method> <method name="get_current_path" qualifiers="const"> <return type="String" /> <description> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 41f42568ad..725b0ba8ff 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -47,14 +47,14 @@ <method name="get_tooltip_text" qualifiers="const"> <return type="String" /> <description> - Override if you want to allow a custom tooltip over your property. + Must be implemented to provide a custom tooltip to the property editor. </description> </method> <method name="set_bottom_editor"> <return type="void" /> <argument index="0" name="editor" type="Control" /> <description> - Adds controls with this function if you want them on the bottom (below the label). + Puts the [code]editor[/code] control below the property label. The control must be previously added using [method Node.add_child]. </description> </method> </methods> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index e4411ab125..886a18900e 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -149,20 +149,20 @@ See [url=https://docs.godotengine.org/en/latest/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information. [b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] (e.g. when pressing [kbd]F5[/kbd]), use [method OS.has_feature] with the [code]"editor"[/code] argument instead. [code]OS.has_feature("editor")[/code] will evaluate to [code]true[/code] both when the code is running in the editor and when running the project from the editor, but it will evaluate to [code]false[/code] when the code is run from an exported project. </member> - <member name="iterations_per_second" type="int" setter="set_iterations_per_second" getter="get_iterations_per_second" default="60"> - The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage. - </member> <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5"> Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of the in-game clock and real clock but smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. [b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics_jitter_fix] to [code]0[/code]. </member> + <member name="physics_ticks_per_second" type="int" setter="set_physics_ticks_per_second" getter="get_physics_ticks_per_second" default="60"> + The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage. See also [member target_fps]. + </member> <member name="print_error_messages" type="bool" setter="set_print_error_messages" getter="is_printing_error_messages" default="true"> If [code]false[/code], stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting. [b]Warning:[/b] If you set this to [code]false[/code] anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. If this is set to [code]false[/code] in a [code]@tool[/code] script, this will also impact the editor itself. Do [i]not[/i] report bugs before ensuring error messages are enabled (as they are by default). [b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor. </member> <member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0"> - The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. + The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. See also [member physics_ticks_per_second]. </member> <member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale" default="1.0"> Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. diff --git a/doc/classes/File.xml b/doc/classes/File.xml index de3beedf0f..6622619fb3 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -119,8 +119,15 @@ <return type="PackedStringArray" /> <argument index="0" name="delim" type="String" default="","" /> <description> - Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long. - Text is interpreted as being UTF-8 encoded. + Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long, and cannot be a double quotation mark. + Text is interpreted as being UTF-8 encoded. Text values must be enclosed in double quotes if they include the delimiter character. Double quotes within a text value can be escaped by doubling their occurrence. + For example, the following CSV lines are valid and will be properly parsed as two strings each: + [codeblock] + Alice,"Hello, Bob!" + Bob,Alice! What a surprise! + Alice,"I thought you'd reply with ""Hello, world""." + [/codeblock] + Note how the second line can omit the enclosing quotes as it does not include the delimiter. However it [i]could[/i] very well use quotes, it was only written without for demonstration purposes. The third line must use [code]""[/code] for each quotation mark that needs to be interpreted as such instead of the end of a text value. </description> </method> <method name="get_double" qualifiers="const"> diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 7e16a6bf5a..22b5c72fa9 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -123,34 +123,34 @@ </constant> </constants> <theme_items> - <theme_item name="back_folder" type="Texture2D"> + <theme_item name="back_folder" data_type="icon" type="Texture2D"> Custom icon for the back arrow. </theme_item> - <theme_item name="file" type="Texture2D"> + <theme_item name="file" data_type="icon" type="Texture2D"> Custom icon for files. </theme_item> - <theme_item name="file_icon_modulate" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="file_icon_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The color modulation applied to the file icon. </theme_item> - <theme_item name="files_disabled" type="Color" default="Color(0, 0, 0, 0.7)"> + <theme_item name="files_disabled" data_type="color" type="Color" default="Color(0, 0, 0, 0.7)"> The color tint for disabled files (when the [FileDialog] is used in open folder mode). </theme_item> - <theme_item name="folder" type="Texture2D"> + <theme_item name="folder" data_type="icon" type="Texture2D"> Custom icon for folders. </theme_item> - <theme_item name="folder_icon_modulate" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="folder_icon_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The color modulation applied to the folder icon. </theme_item> - <theme_item name="forward_folder" type="Texture2D"> + <theme_item name="forward_folder" data_type="icon" type="Texture2D"> Custom icon for the forward arrow. </theme_item> - <theme_item name="parent_folder" type="Texture2D"> + <theme_item name="parent_folder" data_type="icon" type="Texture2D"> Custom icon for the parent folder arrow. </theme_item> - <theme_item name="reload" type="Texture2D"> + <theme_item name="reload" data_type="icon" type="Texture2D"> Custom icon for the reload button. </theme_item> - <theme_item name="toggle_hidden" type="Texture2D"> + <theme_item name="toggle_hidden" data_type="icon" type="Texture2D"> Custom icon for the toggle hidden button. </theme_item> </theme_items> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 44c571e800..907cf8587d 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -32,6 +32,12 @@ Makes possible to disconnect nodes when dragging from the slot at the right if it has the specified type. </description> </method> + <method name="arrange_nodes"> + <return type="void" /> + <description> + Rearranges selected nodes in a layout with minimum crossings between connections and uniform horizontal and vertical gap between nodes. + </description> + </method> <method name="clear_connections"> <return type="void" /> <description> @@ -268,45 +274,47 @@ <constants> </constants> <theme_items> - <theme_item name="activity" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="activity" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> </theme_item> - <theme_item name="bezier_len_neg" type="int" default="160"> + <theme_item name="bezier_len_neg" data_type="constant" type="int" default="160"> </theme_item> - <theme_item name="bezier_len_pos" type="int" default="80"> + <theme_item name="bezier_len_pos" data_type="constant" type="int" default="80"> </theme_item> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> The background drawn under the grid. </theme_item> - <theme_item name="grid_major" type="Color" default="Color(1, 1, 1, 0.2)"> + <theme_item name="grid_major" data_type="color" type="Color" default="Color(1, 1, 1, 0.2)"> Color of major grid lines. </theme_item> - <theme_item name="grid_minor" type="Color" default="Color(1, 1, 1, 0.05)"> + <theme_item name="grid_minor" data_type="color" type="Color" default="Color(1, 1, 1, 0.05)"> Color of minor grid lines. </theme_item> - <theme_item name="minimap" type="Texture2D"> + <theme_item name="layout" data_type="icon" type="Texture2D"> + </theme_item> + <theme_item name="minimap" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="minus" type="Texture2D"> + <theme_item name="minus" data_type="icon" type="Texture2D"> The icon for the zoom out button. </theme_item> - <theme_item name="more" type="Texture2D"> + <theme_item name="more" data_type="icon" type="Texture2D"> The icon for the zoom in button. </theme_item> - <theme_item name="port_grab_distance_horizontal" type="int" default="48"> + <theme_item name="port_grab_distance_horizontal" data_type="constant" type="int" default="24"> The horizontal range within which a port can be grabbed (on both sides). </theme_item> - <theme_item name="port_grab_distance_vertical" type="int" default="6"> + <theme_item name="port_grab_distance_vertical" data_type="constant" type="int" default="6"> The vertical range within which a port can be grabbed (on both sides). </theme_item> - <theme_item name="reset" type="Texture2D"> + <theme_item name="reset" data_type="icon" type="Texture2D"> The icon for the zoom reset button. </theme_item> - <theme_item name="selection_fill" type="Color" default="Color(1, 1, 1, 0.3)"> + <theme_item name="selection_fill" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)"> The fill color of the selection rectangle. </theme_item> - <theme_item name="selection_stroke" type="Color" default="Color(1, 1, 1, 0.8)"> + <theme_item name="selection_stroke" data_type="color" type="Color" default="Color(1, 1, 1, 0.8)"> The outline color of the selection rectangle. </theme_item> - <theme_item name="snap" type="Texture2D"> + <theme_item name="snap" data_type="icon" type="Texture2D"> The icon for the snap toggle button. </theme_item> </theme_items> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index e1374b4f7a..ff6271d2aa 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -292,59 +292,59 @@ </constant> </constants> <theme_items> - <theme_item name="breakpoint" type="StyleBox"> + <theme_item name="breakpoint" data_type="style" type="StyleBox"> The background used when [member overlay] is set to [constant OVERLAY_BREAKPOINT]. </theme_item> - <theme_item name="close" type="Texture2D"> + <theme_item name="close" data_type="icon" type="Texture2D"> The icon for the close button, visible when [member show_close] is enabled. </theme_item> - <theme_item name="close_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="close_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> The color modulation applied to the close button icon. </theme_item> - <theme_item name="close_offset" type="int" default="18"> + <theme_item name="close_offset" data_type="constant" type="int" default="18"> The vertical offset of the close button. </theme_item> - <theme_item name="comment" type="StyleBox"> + <theme_item name="comment" data_type="style" type="StyleBox"> The [StyleBox] used when [member comment] is enabled. </theme_item> - <theme_item name="commentfocus" type="StyleBox"> + <theme_item name="commentfocus" data_type="style" type="StyleBox"> The [StyleBox] used when [member comment] is enabled and the [GraphNode] is focused. </theme_item> - <theme_item name="defaultfocus" type="StyleBox"> + <theme_item name="defaultfocus" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="defaultframe" type="StyleBox"> + <theme_item name="defaultframe" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="frame" type="StyleBox"> + <theme_item name="frame" data_type="style" type="StyleBox"> The default background for [GraphNode]. </theme_item> - <theme_item name="port" type="Texture2D"> + <theme_item name="port" data_type="icon" type="Texture2D"> The icon used for representing ports. </theme_item> - <theme_item name="port_offset" type="int" default="3"> + <theme_item name="port_offset" data_type="constant" type="int" default="3"> Horizontal offset for the ports. </theme_item> - <theme_item name="position" type="StyleBox"> + <theme_item name="position" data_type="style" type="StyleBox"> The background used when [member overlay] is set to [constant OVERLAY_POSITION]. </theme_item> - <theme_item name="resizer" type="Texture2D"> + <theme_item name="resizer" data_type="icon" type="Texture2D"> The icon used for resizer, visible when [member resizable] is enabled. </theme_item> - <theme_item name="resizer_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="resizer_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> The color modulation applied to the resizer icon. </theme_item> - <theme_item name="selectedframe" type="StyleBox"> + <theme_item name="selectedframe" data_type="style" type="StyleBox"> The background used when the [GraphNode] is selected. </theme_item> - <theme_item name="separation" type="int" default="1"> + <theme_item name="separation" data_type="constant" type="int" default="1"> The vertical distance between ports. </theme_item> - <theme_item name="title_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> Color of the title text. </theme_item> - <theme_item name="title_font" type="Font"> + <theme_item name="title_font" data_type="font" type="Font"> Font used for the title text. </theme_item> - <theme_item name="title_offset" type="int" default="20"> + <theme_item name="title_offset" data_type="constant" type="int" default="20"> Vertical offset of the title text. </theme_item> </theme_items> diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml index ca6b4e69c3..34e7cbcd79 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -21,10 +21,10 @@ <constants> </constants> <theme_items> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The horizontal separation of children nodes. </theme_item> - <theme_item name="vseparation" type="int" default="4"> + <theme_item name="vseparation" data_type="constant" type="int" default="4"> The vertical separation of children nodes. </theme_item> </theme_items> diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml index 7c76b8b001..9c3efb384e 100644 --- a/doc/classes/HBoxContainer.xml +++ b/doc/classes/HBoxContainer.xml @@ -13,7 +13,7 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int" default="4"> + <theme_item name="separation" data_type="constant" type="int" default="4"> The horizontal space between the [HBoxContainer]'s elements. </theme_item> </theme_items> diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml index 963454dab8..3bdd739cdf 100644 --- a/doc/classes/HScrollBar.xml +++ b/doc/classes/HScrollBar.xml @@ -13,31 +13,31 @@ <constants> </constants> <theme_items> - <theme_item name="decrement" type="Texture2D"> + <theme_item name="decrement" data_type="icon" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] left. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="decrement_highlight" type="Texture2D"> + <theme_item name="decrement_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the decrement button. </theme_item> - <theme_item name="grabber" type="StyleBox"> + <theme_item name="grabber" data_type="style" type="StyleBox"> Used as texture for the grabber, the draggable element representing current scroll. </theme_item> - <theme_item name="grabber_highlight" type="StyleBox"> + <theme_item name="grabber_highlight" data_type="style" type="StyleBox"> Used when the mouse hovers over the grabber. </theme_item> - <theme_item name="grabber_pressed" type="StyleBox"> + <theme_item name="grabber_pressed" data_type="style" type="StyleBox"> Used when the grabber is being dragged. </theme_item> - <theme_item name="increment" type="Texture2D"> + <theme_item name="increment" data_type="icon" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] right. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="increment_highlight" type="Texture2D"> + <theme_item name="increment_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the increment button. </theme_item> - <theme_item name="scroll" type="StyleBox"> + <theme_item name="scroll" data_type="style" type="StyleBox"> Used as background of this [ScrollBar]. </theme_item> - <theme_item name="scroll_focus" type="StyleBox"> + <theme_item name="scroll_focus" data_type="style" type="StyleBox"> Used as background when the [ScrollBar] has the GUI focus. </theme_item> </theme_items> diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml index 5b418d6428..24495d208e 100644 --- a/doc/classes/HSeparator.xml +++ b/doc/classes/HSeparator.xml @@ -13,10 +13,10 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int" default="4"> + <theme_item name="separation" data_type="constant" type="int" default="4"> The height of the area covered by the separator. Effectively works like a minimum height. </theme_item> - <theme_item name="separator" type="StyleBox"> + <theme_item name="separator" data_type="style" type="StyleBox"> The style for the separator line. Works best with [StyleBoxLine]. </theme_item> </theme_items> diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml index 0cbb4fd455..37aa968161 100644 --- a/doc/classes/HSlider.xml +++ b/doc/classes/HSlider.xml @@ -14,24 +14,24 @@ <constants> </constants> <theme_items> - <theme_item name="grabber" type="Texture2D"> + <theme_item name="grabber" data_type="icon" type="Texture2D"> The texture for the grabber (the draggable element). </theme_item> - <theme_item name="grabber_area" type="StyleBox"> + <theme_item name="grabber_area" data_type="style" type="StyleBox"> The background of the area to the left of the grabber. </theme_item> - <theme_item name="grabber_area_highlight" type="StyleBox"> + <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="grabber_disabled" type="Texture2D"> + <theme_item name="grabber_disabled" data_type="icon" type="Texture2D"> The texture for the grabber when it's disabled. </theme_item> - <theme_item name="grabber_highlight" type="Texture2D"> + <theme_item name="grabber_highlight" data_type="icon" type="Texture2D"> The texture for the grabber when it's focused. </theme_item> - <theme_item name="slider" type="StyleBox"> + <theme_item name="slider" data_type="style" type="StyleBox"> The background for the whole slider. Determines the height of the [code]grabber_area[/code]. </theme_item> - <theme_item name="tick" type="Texture2D"> + <theme_item name="tick" data_type="icon" type="Texture2D"> The texture for the ticks, visible when [member Slider.tick_count] is greater than 0. </theme_item> </theme_items> diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml index f6e9f33c20..6bc9913344 100644 --- a/doc/classes/HSplitContainer.xml +++ b/doc/classes/HSplitContainer.xml @@ -13,15 +13,15 @@ <constants> </constants> <theme_items> - <theme_item name="autohide" type="int" default="1"> + <theme_item name="autohide" data_type="constant" type="int" default="1"> Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible. </theme_item> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="grabber" type="Texture2D"> + <theme_item name="grabber" data_type="icon" type="Texture2D"> The icon used for the grabber drawn in the middle area. </theme_item> - <theme_item name="separation" type="int" default="12"> + <theme_item name="separation" data_type="constant" type="int" default="12"> The space between sides of the container. </theme_item> </theme_items> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index df42869dbe..22398cc3ce 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -10,6 +10,7 @@ For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616). [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header. [b]Note:[/b] SSL/TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error. + [b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period. </description> <tutorials> <link title="HTTP client class">https://docs.godotengine.org/en/latest/tutorials/networking/http_client_class.html</link> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 4a56c7e3fd..f45ddd0abb 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -6,6 +6,7 @@ <description> A node with the ability to send HTTP requests. Uses [HTTPClient] internally. Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP. + [b]Warning:[/b] See the notes and warnings on [HTTPClient] for limitations, especially regarding SSL security. [b]Example of contacting a REST API and printing one of its returned fields:[/b] [codeblocks] [gdscript] @@ -150,8 +151,6 @@ [/codeblocks] [b]Gzipped response bodies[/b]: HTTPRequest will automatically handle decompression of response bodies. A [code]Accept-Encoding[/code] header will be automatically added to each of your requests, unless one is already specified. Any response with a [code]Content-Encoding: gzip[/code] header will automatically be decompressed and delivered to you as uncompressed bytes. - [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header. - [b]Note:[/b] SSL/TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error. </description> <tutorials> <link title="Making HTTP requests">https://docs.godotengine.org/en/latest/tutorials/networking/http_request_class.html</link> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 293456b645..ebbcd2b894 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -217,7 +217,7 @@ </method> <method name="is_key_pressed" qualifiers="const"> <return type="bool" /> - <argument index="0" name="keycode" type="int" /> + <argument index="0" name="keycode" type="int" enum="Key" /> <description> Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum Key] constant. </description> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index 1b09ddee94..f670d907fc 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -29,11 +29,11 @@ <member name="echo" type="bool" setter="set_echo" getter="is_echo" default="false"> If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down. </member> - <member name="keycode" type="int" setter="set_keycode" getter="get_keycode" default="0"> + <member name="keycode" type="int" setter="set_keycode" getter="get_keycode" enum="Key" default="0"> The key keycode, which corresponds to one of the [enum Key] constants. Represent key in the current keyboard layout. To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey]. </member> - <member name="physical_keycode" type="int" setter="set_physical_keycode" getter="get_physical_keycode" default="0"> + <member name="physical_keycode" type="int" setter="set_physical_keycode" getter="get_physical_keycode" enum="Key" default="0"> Key physical keycode, which corresponds to one of the [enum Key] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard. To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey]. </member> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index c60864886e..06e98f7e57 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -462,55 +462,55 @@ </constant> </constants> <theme_items> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused. </theme_item> - <theme_item name="bg_focus" type="StyleBox"> + <theme_item name="bg_focus" data_type="style" type="StyleBox"> [StyleBox] used when the [ItemList] is being focused. </theme_item> - <theme_item name="cursor" type="StyleBox"> + <theme_item name="cursor" data_type="style" type="StyleBox"> [StyleBox] used for the cursor, when the [ItemList] is being focused. </theme_item> - <theme_item name="cursor_unfocused" type="StyleBox"> + <theme_item name="cursor_unfocused" data_type="style" type="StyleBox"> [StyleBox] used for the cursor, when the [ItemList] is not being focused. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the item's text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.63, 0.63, 0.63, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.63, 0.63, 0.63, 1)"> Default text [Color] of the item. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_selected_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the item's text. </theme_item> - <theme_item name="guide_color" type="Color" default="Color(0, 0, 0, 0.1)"> + <theme_item name="guide_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.1)"> [Color] of the guideline. The guideline is a line drawn between each row of items. </theme_item> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The horizontal spacing between items. </theme_item> - <theme_item name="icon_margin" type="int" default="4"> + <theme_item name="icon_margin" data_type="constant" type="int" default="4"> The spacing between item's icon and text. </theme_item> - <theme_item name="line_separation" type="int" default="2"> + <theme_item name="line_separation" data_type="constant" type="int" default="2"> The vertical spacing between each line of text. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the item text outline. </theme_item> - <theme_item name="selected" type="StyleBox"> + <theme_item name="selected" data_type="style" type="StyleBox"> [StyleBox] for the selected items, used when the [ItemList] is not being focused. </theme_item> - <theme_item name="selected_focus" type="StyleBox"> + <theme_item name="selected_focus" data_type="style" type="StyleBox"> [StyleBox] for the selected items, used when the [ItemList] is being focused. </theme_item> - <theme_item name="vseparation" type="int" default="2"> + <theme_item name="vseparation" data_type="constant" type="int" default="2"> The vertical spacing between items. </theme_item> </theme_items> diff --git a/doc/classes/JSONRPC.xml b/doc/classes/JSONRPC.xml index 30e99f4a30..8f1d1581b1 100644 --- a/doc/classes/JSONRPC.xml +++ b/doc/classes/JSONRPC.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="JSONRPC" inherits="Object" version="4.0"> <brief_description> + A helper to handle dictionaries which look like JSONRPC documents. </brief_description> <description> + [url=https://www.jsonrpc.org/]JSON-RPC[/url] is a standard which wraps a method call in a [JSON] object. The object has a particular structure and identifies which method is called, the parameters to that function, and carries an ID to keep track of responses. This class implements that standard on top of [Dictionary]; you will have to convert between a [Dictionary] and [JSON] with other functions. </description> <tutorials> </tutorials> @@ -12,6 +14,9 @@ <argument index="0" name="method" type="String" /> <argument index="1" name="params" type="Variant" /> <description> + Returns a dictionary in the form of a JSON-RPC notification. Notifications are one-shot messages which do not expect a response. + - [code]method[/code]: Name of the method being called. + - [code]params[/code]: An array or dictionary of parameters being passed to the method. </description> </method> <method name="make_request"> @@ -20,6 +25,10 @@ <argument index="1" name="params" type="Variant" /> <argument index="2" name="id" type="Variant" /> <description> + Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a server with the expectation of a response. The ID field is used for the server to specify which exact request it is responding to. + - [code]method[/code]: Name of the method being called. + - [code]params[/code]: An array or dictionary of parameters being passed to the method. + - [code]id[/code]: Uniquely identifies this request. The server is expected to send a response with the same ID. </description> </method> <method name="make_response"> @@ -27,6 +36,9 @@ <argument index="0" name="result" type="Variant" /> <argument index="1" name="id" type="Variant" /> <description> + When a server has received and processed a request, it is expected to send a response. If you did not want a response then you need to have sent a Notification instead. + - [code]result[/code]: The return value of the function which was called. + - [code]id[/code]: The ID of the request this response is targeted to. </description> </method> <method name="make_response_error" qualifiers="const"> @@ -35,6 +47,10 @@ <argument index="1" name="message" type="String" /> <argument index="2" name="id" type="Variant" default="null" /> <description> + Creates a response which indicates a previous reply has failed in some way. + - [code]code[/code]: The error code corresponding to what kind of error this is. See the [enum ErrorCode] constants. + - [code]message[/code]: A custom message about this error. + - [code]id[/code]: The request this error is a response to. </description> </method> <method name="process_action"> @@ -42,6 +58,9 @@ <argument index="0" name="action" type="Variant" /> <argument index="1" name="recurse" type="bool" default="false" /> <description> + Given a Dictionary which takes the form of a JSON-RPC request: unpack the request and run it. Methods are resolved by looking at the field called "method" and looking for an equivalently named function in the JSONRPC object. If one is found that method is called. + To add new supported methods extend the JSONRPC class and call [method process_action] on your subclass. + [code]action[/code]: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification. </description> </method> <method name="process_string"> @@ -64,6 +83,7 @@ <constant name="INVALID_REQUEST" value="-32600" enum="ErrorCode"> </constant> <constant name="METHOD_NOT_FOUND" value="-32601" enum="ErrorCode"> + A method call was requested but no function of that name existed in the JSONRPC subclass. </constant> <constant name="INVALID_PARAMS" value="-32602" enum="ErrorCode"> </constant> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 42ee246730..3c349e052f 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -163,37 +163,37 @@ </constant> </constants> <theme_items> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] used for the [Label]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Default text [Color] of the [Label]. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_shadow_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [Label]'s text. </theme_item> - <theme_item name="line_spacing" type="int" default="3"> + <theme_item name="line_spacing" data_type="constant" type="int" default="3"> Vertical space between lines in multiline [Label]. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Background [StyleBox] for the [Label]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> Text outline size. </theme_item> - <theme_item name="shadow_offset_x" type="int" default="1"> + <theme_item name="shadow_offset_x" data_type="constant" type="int" default="1"> The horizontal offset of the text's shadow. </theme_item> - <theme_item name="shadow_offset_y" type="int" default="1"> + <theme_item name="shadow_offset_y" data_type="constant" type="int" default="1"> The vertical offset of the text's shadow. </theme_item> - <theme_item name="shadow_outline_size" type="int" default="1"> + <theme_item name="shadow_outline_size" data_type="constant" type="int" default="1"> Shadow outline size. If set to 1 or greater, the shadow will be displayed around the whole text as an outline. </theme_item> </theme_items> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 45bb553c9c..834b5a41db 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -365,52 +365,52 @@ </constant> </constants> <theme_items> - <theme_item name="caret_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Color of the [LineEdit]'s caret (text cursor). </theme_item> - <theme_item name="clear" type="Texture2D"> + <theme_item name="clear" data_type="icon" type="Texture2D"> Texture for the clear button. See [member clear_button_enabled]. </theme_item> - <theme_item name="clear_button_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="clear_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Color used as default tint for the clear button. </theme_item> - <theme_item name="clear_button_color_pressed" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="clear_button_color_pressed" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Color used for the clear button when it's pressed. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> Background used when [LineEdit] has GUI focus. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> Font used for the text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default font color. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [LineEdit]. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="font_selected_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [LineEdit]'s text. </theme_item> - <theme_item name="font_uneditable_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> + <theme_item name="font_uneditable_color" data_type="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"> + <theme_item name="minimum_character_width" data_type="constant" 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"> + <theme_item name="normal" data_type="style" type="StyleBox"> Default background for the [LineEdit]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="read_only" type="StyleBox"> + <theme_item name="read_only" data_type="style" type="StyleBox"> Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]). </theme_item> - <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> + <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> Color of the selection rectangle. </theme_item> </theme_items> diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index dbf13fd842..e4445e9076 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -66,31 +66,31 @@ </constant> </constants> <theme_items> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> [StyleBox] used when the [LinkButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the [LinkButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [LinkButton]. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="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_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_pressed_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [LinkButton]'s text. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="underline_spacing" type="int" default="2"> + <theme_item name="underline_spacing" data_type="constant" type="int" default="2"> The vertical space between the baseline of text and the underline. </theme_item> </theme_items> diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml index a51632d5f1..419857c13f 100644 --- a/doc/classes/MarginContainer.xml +++ b/doc/classes/MarginContainer.xml @@ -32,16 +32,16 @@ <constants> </constants> <theme_items> - <theme_item name="margin_bottom" type="int" default="0"> + <theme_item name="margin_bottom" data_type="constant" type="int" default="0"> All direct children of [MarginContainer] will have a bottom margin of [code]margin_bottom[/code] pixels. </theme_item> - <theme_item name="margin_left" type="int" default="0"> + <theme_item name="margin_left" data_type="constant" type="int" default="0"> All direct children of [MarginContainer] will have a left margin of [code]margin_left[/code] pixels. </theme_item> - <theme_item name="margin_right" type="int" default="0"> + <theme_item name="margin_right" data_type="constant" type="int" default="0"> All direct children of [MarginContainer] will have a right margin of [code]margin_right[/code] pixels. </theme_item> - <theme_item name="margin_top" type="int" default="0"> + <theme_item name="margin_top" data_type="constant" type="int" default="0"> All direct children of [MarginContainer] will have a top margin of [code]margin_top[/code] pixels. </theme_item> </theme_items> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 2d4df97895..1c7e6f1f19 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -44,46 +44,46 @@ <constants> </constants> <theme_items> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> [StyleBox] used when the [MenuButton] is disabled. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> [StyleBox] used when the [MenuButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the [MenuButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [MenuButton]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(1, 1, 1, 0.3)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)"> Text [Color] used when the [MenuButton] is disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="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_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_pressed_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [MenuButton]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> [StyleBox] used when the [MenuButton] is being hovered. </theme_item> - <theme_item name="hseparation" type="int" default="3"> + <theme_item name="hseparation" data_type="constant" type="int" default="3"> The horizontal space between [MenuButton]'s icon and text. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Default [StyleBox] for the [MenuButton]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> [StyleBox] used when the [MenuButton] is being pressed. </theme_item> </theme_items> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index 552e0fce4c..b9f50ad02a 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -66,6 +66,34 @@ Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers. </description> </method> + <method name="send_despawn"> + <return type="int" enum="Error" /> + <argument index="0" name="peer_id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="path" type="NodePath" /> + <argument index="3" name="data" type="PackedByteArray" default="PackedByteArray()" /> + <description> + Sends a despawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant SPAWN_MODE_SERVER] (see [method spawnable_config]) and the request is sent by the server (see [method is_network_server]), the receiving peer(s) will automatically queue for deletion the node at [code]path[/code] and emit the signal [signal network_despawn]. In all other cases no deletion happens, and the signal [signal network_despawn_request] is emitted instead. + </description> + </method> + <method name="send_spawn"> + <return type="int" enum="Error" /> + <argument index="0" name="peer_id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="path" type="NodePath" /> + <argument index="3" name="data" type="PackedByteArray" default="PackedByteArray()" /> + <description> + Sends a spawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant SPAWN_MODE_SERVER] (see [method spawnable_config]) and the request is sent by the server (see [method is_network_server]), the receiving peer(s) will automatically instantiate that scene, add it to the [SceneTree] at the given [code]path[/code] and emit the signal [signal network_spawn]. In all other cases no instantiation happens, and the signal [signal network_spawn_request] is emitted instead. + </description> + </method> + <method name="spawnable_config"> + <return type="int" enum="Error" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="spawn_mode" type="int" enum="MultiplayerAPI.SpawnMode" /> + <description> + Configures the MultiplayerAPI to track instances of the [PackedScene] idenfied by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication. See [enum SpawnMode] for the possible configurations. + </description> + </method> </methods> <members> <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false"> @@ -94,6 +122,25 @@ Emitted when this MultiplayerAPI's [member network_peer] fails to establish a connection to a server. Only emitted on clients. </description> </signal> + <signal name="network_despawn"> + <argument index="0" name="id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="node" type="Node" /> + <argument index="3" name="data" type="PackedByteArray" /> + <description> + Emitted on a client before deleting a local Node upon receiving a despawn request from the server. + </description> + </signal> + <signal name="network_despawn_request"> + <argument index="0" name="id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="parent" type="Node" /> + <argument index="3" name="name" type="String" /> + <argument index="4" name="data" type="PackedByteArray" /> + <description> + Emitted when a network despawn request has been received from a client, or for a [PackedScene] that has been configured as [constant SPAWN_MODE_CUSTOM]. + </description> + </signal> <signal name="network_peer_connected"> <argument index="0" name="id" type="int" /> <description> @@ -113,6 +160,39 @@ Emitted when this MultiplayerAPI's [member network_peer] receive a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. </description> </signal> + <signal name="network_spawn"> + <argument index="0" name="id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="node" type="Node" /> + <argument index="3" name="data" type="PackedByteArray" /> + <description> + Emitted on a client after a new Node is instantiated locally and added to the SceneTree upon receiving a spawn request from the server. + </description> + </signal> + <signal name="network_spawn_request"> + <argument index="0" name="id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="parent" type="Node" /> + <argument index="3" name="name" type="String" /> + <argument index="4" name="data" type="PackedByteArray" /> + <description> + Emitted when a network spawn request has been received from a client, or for a [PackedScene] that has been configured as [constant SPAWN_MODE_CUSTOM]. + </description> + </signal> + <signal name="network_spawnable_added"> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="node" type="Node" /> + <description> + Emitted when an instance of a [PackedScene] that has been configured for networking enters the [SceneTree]. See [method spawnable_config]. + </description> + </signal> + <signal name="network_spawnable_removed"> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="node" type="Node" /> + <description> + Emitted when an instance of a [PackedScene] that has been configured for networking leaves the [SceneTree]. See [method spawnable_config]. + </description> + </signal> <signal name="server_disconnected"> <description> Emitted when this MultiplayerAPI's [member network_peer] disconnects from server. Only emitted on clients. @@ -132,5 +212,14 @@ <constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode"> Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master]. </constant> + <constant name="SPAWN_MODE_NONE" value="0" enum="SpawnMode"> + Used with [method spawnable_config] to identify a [PackedScene] that should not be replicated. + </constant> + <constant name="SPAWN_MODE_SERVER" value="1" enum="SpawnMode"> + Used with [method spawnable_config] to identify a [PackedScene] that should be automatically replicated from server to clients. + </constant> + <constant name="SPAWN_MODE_CUSTOM" value="2" enum="SpawnMode"> + Used with [method spawnable_config] to identify a [PackedScene] that can be manually replicated among peers. + </constant> </constants> </class> diff --git a/doc/classes/NativeExtension.xml b/doc/classes/NativeExtension.xml index fa8575383c..ac3e8d53d8 100644 --- a/doc/classes/NativeExtension.xml +++ b/doc/classes/NativeExtension.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NativeExtension" inherits="RefCounted" version="4.0"> +<class name="NativeExtension" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index 1d9b2b0a36..e476949360 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="NavigationMesh" inherits="Resource" version="4.0"> <brief_description> + A mesh to approximate the walkable areas and obstacles. </brief_description> <description> + A navigation mesh is a collection of polygons that define which areas of an environment are traversable to aid agents in pathfinding through complicated spaces. </description> <tutorials> <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link> @@ -12,124 +14,173 @@ <return type="void" /> <argument index="0" name="polygon" type="PackedInt32Array" /> <description> + Adds a polygon using the indices of the vertices you get when calling [method get_vertices]. </description> </method> <method name="clear_polygons"> <return type="void" /> <description> + Clears the array of polygons, but it doesn't clear the array of vertices. </description> </method> <method name="create_from_mesh"> <return type="void" /> <argument index="0" name="mesh" type="Mesh" /> <description> + Initializes the navigation mesh by setting the vertices and indices according to a [Mesh]. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> + <method name="get_collision_mask_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> + Returns whether or not the specified layer of the [member geometry/collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_polygon"> <return type="PackedInt32Array" /> <argument index="0" name="idx" type="int" /> <description> + Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon. </description> </method> <method name="get_polygon_count" qualifiers="const"> <return type="int" /> <description> + Returns the number of polygons in the navigation mesh. </description> </method> <method name="get_vertices" qualifiers="const"> <return type="PackedVector3Array" /> <description> + Returns a [PackedVector3Array] containing all the vertices being used to create the polygons. </description> </method> - <method name="set_collision_mask_bit"> + <method name="set_collision_mask_value"> <return type="void" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> + Based on [code]value[/code], enables or disables the specified layer in the [member geometry/collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="set_vertices"> <return type="void" /> <argument index="0" name="vertices" type="PackedVector3Array" /> <description> + Sets the vertices that can be then indexed to create polygons with the [method add_polygon] method. </description> </method> </methods> <members> <member name="agent/height" type="float" setter="set_agent_height" getter="get_agent_height" default="2.0"> - The minimum Y space needed for navigation to be generated. + The minimum floor to ceiling height that will still allow the floor area to be considered walkable. + [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/height]. </member> <member name="agent/max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb" default="0.9"> - The maximum height difference between two areas for navigation to be generated between them. + The minimum ledge height that is considered to still be traversable. + [b]Note:[/b] While baking, this value will be rounded down to the nearest multiple of [member cell/height]. </member> <member name="agent/max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope" default="45.0"> - The maximum angle a slope can be at for navigation to be generated on it. + The maximum slope that is considered walkable, in degrees. </member> <member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="0.6"> - Determines where the edge of a navigation mesh is. This way an agent will not overlap with another mesh or stand over nothing. + The distance to erode/shrink the walkable area of the heightfield away from obstructions. + [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/size]. </member> <member name="cell/height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.2"> - The height of a cell. + The Y axis cell size to use for fields. </member> <member name="cell/size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3"> - The size of cells in the [NavigationMesh]. + The XZ plane cell size to use for fields. </member> <member name="detail/sample_distance" type="float" setter="set_detail_sample_distance" getter="get_detail_sample_distance" default="6.0"> + The sampling distance to use when generating the detail mesh, in cell unit. </member> <member name="detail/sample_max_error" type="float" setter="set_detail_sample_max_error" getter="get_detail_sample_max_error" default="1.0"> + The maximum distance the detail mesh surface should deviate from heightfield, in cell unit. </member> <member name="edge/max_error" type="float" setter="set_edge_max_error" getter="get_edge_max_error" default="1.3"> + The maximum distance a simplfied contour's border edges should deviate the original raw contour. </member> <member name="edge/max_length" type="float" setter="set_edge_max_length" getter="get_edge_max_length" default="12.0"> + The maximum allowed length for contour edges along the border of the mesh. + [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/size]. </member> <member name="filter/filter_walkable_low_height_spans" type="bool" setter="set_filter_walkable_low_height_spans" getter="get_filter_walkable_low_height_spans" default="false"> + If [code]true[/code], marks walkable spans as not walkable if the clearance above the span is less than [member agent/height]. </member> <member name="filter/ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans" default="false"> + If [code]true[/code], marks spans that are ledges as non-walkable. </member> <member name="filter/low_hanging_obstacles" type="bool" setter="set_filter_low_hanging_obstacles" getter="get_filter_low_hanging_obstacles" default="false"> + If [code]true[/code], marks non-walkable spans as walkable if their maximum is within [member agent/max_climb] of a walkable neighbor. </member> <member name="geometry/collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> - The physics layers used to generate the [NavigationMesh]. + The physics layers to scan for static colliders. + Only used when [member geometry/parsed_geometry_type] is [constant PARSED_GEOMETRY_STATIC_COLLIDERS] or [constant PARSED_GEOMETRY_BOTH]. </member> - <member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" default="0"> - What kind of geometry is used to generate the [NavigationMesh]. + <member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" enum="NavigationMesh.ParsedGeometryType" default="0"> + Determines which type of nodes will be parsed as geometry. See [enum ParsedGeometryType] for possible values. </member> - <member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" default="0"> - Which geometry is used to generate the [NavigationMesh]. + <member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" enum="NavigationMesh.SourceGeometryMode" default="0"> + The source of the geometry used when baking. See [enum SourceGeometryMode] for possible values. </member> <member name="geometry/source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name"> - The name of the group that is used to generate the [NavigationMesh]. + The name of the group to scan for geometry. + Only used when [member geometry/source_geometry_mode] is [constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant SOURCE_GEOMETRY_GROUPS_EXPLICIT]. </member> <member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0"> - The number of vertices to use per polygon. Higher values will improve performance at the cost of lower precision. + The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. </member> <member name="region/merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size" default="20.0"> - If two adjacent regions' edges are separated by a distance lower than this value, the regions will be merged together. + Any regions with a size smaller than this will be merged with larger regions if possible. + [b]Note:[/b] This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400. </member> <member name="region/min_size" type="float" setter="set_region_min_size" getter="get_region_min_size" default="8.0"> The minimum size of a region for it to be created. + [b]Note:[/b] This value will be squared to calculate the minimum number of cells allowed to form isolated island areas. For example, a value of 8 will set the number of cells to 64. </member> - <member name="sample_partition_type/sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" default="0"> + <member name="sample_partition_type/sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" enum="NavigationMesh.SamplePartitionType" default="0"> + Partitioning algorithm for creating the navigation mesh polys. See [enum SamplePartitionType] for possible values. </member> </members> <constants> - <constant name="SAMPLE_PARTITION_WATERSHED" value="0"> + <constant name="SAMPLE_PARTITION_WATERSHED" value="0" enum="SamplePartitionType"> + Watershed partitioning. Generally the best choice if you precompute the navigation mesh, use this if you have large open areas. </constant> - <constant name="SAMPLE_PARTITION_MONOTONE" value="1"> + <constant name="SAMPLE_PARTITION_MONOTONE" value="1" enum="SamplePartitionType"> + Monotone partitioning. Use this if you want fast navigation mesh generation. </constant> - <constant name="SAMPLE_PARTITION_LAYERS" value="2"> + <constant name="SAMPLE_PARTITION_LAYERS" value="2" enum="SamplePartitionType"> + Layer partitioning. Good choice to use for tiled navigation mesh with medium and small sized tiles. </constant> - <constant name="PARSED_GEOMETRY_MESH_INSTANCES" value="0"> + <constant name="SAMPLE_PARTITION_MAX" value="3" enum="SamplePartitionType"> + Represents the size of the [enum SamplePartitionType] enum. </constant> - <constant name="PARSED_GEOMETRY_STATIC_COLLIDERS" value="1"> + <constant name="PARSED_GEOMETRY_MESH_INSTANCES" value="0" enum="ParsedGeometryType"> + Parses mesh instances as geometry. This includes [MeshInstance3D], [CSGShape3D], and [GridMap] nodes. </constant> - <constant name="PARSED_GEOMETRY_BOTH" value="2"> + <constant name="PARSED_GEOMETRY_STATIC_COLLIDERS" value="1" enum="ParsedGeometryType"> + Parses [StaticBody3D] colliders as geometry. The collider should be in any of the layers specified by [member geometry/collision_mask]. + </constant> + <constant name="PARSED_GEOMETRY_BOTH" value="2" enum="ParsedGeometryType"> + Both [constant PARSED_GEOMETRY_MESH_INSTANCES] and [constant PARSED_GEOMETRY_STATIC_COLLIDERS]. + </constant> + <constant name="PARSED_GEOMETRY_MAX" value="3" enum="ParsedGeometryType"> + Represents the size of the [enum ParsedGeometryType] enum. + </constant> + <constant name="SOURCE_GEOMETRY_NAVMESH_CHILDREN" value="0" enum="SourceGeometryMode"> + Scans the child nodes of [NavigationRegion3D] recursively for geometry. + </constant> + <constant name="SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN" value="1" enum="SourceGeometryMode"> + Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry/source_group_name]. + </constant> + <constant name="SOURCE_GEOMETRY_GROUPS_EXPLICIT" value="2" enum="SourceGeometryMode"> + Uses nodes in a group for geometry. The group is specified by [member geometry/source_group_name]. + </constant> + <constant name="SOURCE_GEOMETRY_MAX" value="3" enum="SourceGeometryMode"> + Represents the size of the [enum SourceGeometryMode] enum. </constant> </constants> </class> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 3874046628..096fbbf2c0 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -325,7 +325,7 @@ <method name="get_physics_process_delta_time" qualifiers="const"> <return type="float" /> <description> - Returns the time elapsed (in seconds) since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.iterations_per_second]. + Returns the time elapsed (in seconds) since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.physics_ticks_per_second]. </description> </method> <method name="get_process_delta_time" qualifiers="const"> @@ -605,7 +605,7 @@ <return type="void" /> <argument index="0" name="enable" type="bool" /> <description> - Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.iterations_per_second] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _ready] will be ignored. + Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.physics_ticks_per_second] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_physics_process_internal"> diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 983d8961fb..49901dc4d9 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -113,8 +113,9 @@ <argument index="0" name="target" type="Vector3" /> <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> <description> - Rotates itself so that the local -Z axis points towards the [code]target[/code] position. - The transform will first be rotated around the given [code]up[/code] vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the [code]target[/code] and [code]up[/code] vectors. + Rotates the node so that the local forward axis (-Z) points toward the [code]target[/code] position. + The local up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly. + The [code]target[/code] position cannot be the same as the node's position, the [code]up[/code] vector cannot be zero, and the direction from the node's position to the [code]target[/code] vector cannot be parallel to the [code]up[/code] vector. Operations take place in global space. </description> </method> @@ -124,7 +125,7 @@ <argument index="1" name="target" type="Vector3" /> <argument index="2" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> <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. + Moves the node to the specified [code]position[/code], and then rotates the node to point toward the [code]target[/code] as per [method look_at]. Operations take place in global space. </description> </method> <method name="orthonormalize"> diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml index 150bfd9257..cc4bddc229 100644 --- a/doc/classes/OccluderInstance3D.xml +++ b/doc/classes/OccluderInstance3D.xml @@ -7,17 +7,19 @@ <tutorials> </tutorials> <methods> - <method name="get_bake_mask_bit" qualifiers="const"> + <method name="get_bake_mask_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="layer" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> + Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [code]layer_number[/code] between 1 and 20. </description> </method> - <method name="set_bake_mask_bit"> + <method name="set_bake_mask_value"> <return type="void" /> - <argument index="0" name="layer" type="int" /> - <argument index="1" name="enabled" type="bool" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> + Based on [code]value[/code], enables or disables the specified layer in the [member bake_mask], given a [code]layer_number[/code] between 1 and 20. </description> </method> </methods> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index ae268203ad..8aa0ad073d 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -186,64 +186,64 @@ <constants> </constants> <theme_items> - <theme_item name="arrow" type="Texture2D"> + <theme_item name="arrow" data_type="icon" type="Texture2D"> The arrow icon to be drawn on the right end of the button. </theme_item> - <theme_item name="arrow_margin" type="int" default="2"> + <theme_item name="arrow_margin" data_type="constant" type="int" default="2"> The horizontal space between the arrow icon and the right edge of the button. </theme_item> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is disabled (for left-to-right layouts). </theme_item> - <theme_item name="disabled_mirrored" type="StyleBox"> + <theme_item name="disabled_mirrored" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is disabled (for right-to-left layouts). </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the [OptionButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [OptionButton]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="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_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="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_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_pressed_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [OptionButton]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is being hovered (for left-to-right layouts). </theme_item> - <theme_item name="hover_mirrored" type="StyleBox"> + <theme_item name="hover_mirrored" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is being hovered (for right-to-left layouts). </theme_item> - <theme_item name="hseparation" type="int" default="2"> + <theme_item name="hseparation" data_type="constant" type="int" default="2"> The horizontal space between [OptionButton]'s icon and text. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Default [StyleBox] for the [OptionButton] (for left-to-right layouts). </theme_item> - <theme_item name="normal_mirrored" type="StyleBox"> + <theme_item name="normal_mirrored" data_type="style" type="StyleBox"> Default [StyleBox] for the [OptionButton] (for right-to-left layouts). </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is being pressed (for left-to-right layouts). </theme_item> - <theme_item name="pressed_mirrored" type="StyleBox"> + <theme_item name="pressed_mirrored" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is being pressed (for right-to-left layouts). </theme_item> </theme_items> diff --git a/doc/classes/PacketPeerDTLS.xml b/doc/classes/PacketPeerDTLS.xml index 99a1aea5a6..b05743fb5a 100644 --- a/doc/classes/PacketPeerDTLS.xml +++ b/doc/classes/PacketPeerDTLS.xml @@ -5,6 +5,7 @@ </brief_description> <description> This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by [method DTLSServer.take_connection]. + [b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period. </description> <tutorials> </tutorials> diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml index b65c2c956d..9906abf895 100644 --- a/doc/classes/Panel.xml +++ b/doc/classes/Panel.xml @@ -24,10 +24,10 @@ </constant> </constants> <theme_items> - <theme_item name="panel" type="StyleBox"> + <theme_item name="panel" data_type="style" type="StyleBox"> The style of this [Panel]. </theme_item> - <theme_item name="panel_fg" type="StyleBox"> + <theme_item name="panel_fg" data_type="style" type="StyleBox"> </theme_item> </theme_items> </class> diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml index ad6080c780..f3f2f6839a 100644 --- a/doc/classes/PanelContainer.xml +++ b/doc/classes/PanelContainer.xml @@ -17,7 +17,7 @@ <constants> </constants> <theme_items> - <theme_item name="panel" type="StyleBox"> + <theme_item name="panel" data_type="style" type="StyleBox"> The style of [PanelContainer]'s background. </theme_item> </theme_items> diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index 4d1cd072d0..e00c473bcd 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -26,10 +26,8 @@ <method name="move_and_collide"> <return type="KinematicCollision2D" /> <argument index="0" name="rel_vec" type="Vector2" /> - <argument index="1" name="infinite_inertia" type="bool" default="true" /> - <argument index="2" name="exclude_raycast_shapes" type="bool" default="true" /> - <argument index="3" name="test_only" type="bool" default="false" /> - <argument index="4" name="safe_margin" type="float" default="0.08" /> + <argument index="1" name="test_only" type="bool" default="false" /> + <argument index="2" name="safe_margin" type="float" default="0.08" /> <description> Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision. If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. @@ -47,10 +45,8 @@ <return type="bool" /> <argument index="0" name="from" type="Transform2D" /> <argument index="1" name="rel_vec" type="Vector2" /> - <argument index="2" name="infinite_inertia" type="bool" default="true" /> - <argument index="3" name="exclude_raycast_shapes" type="bool" default="true" /> - <argument index="4" name="collision" type="KinematicCollision2D" default="null" /> - <argument index="5" name="safe_margin" type="float" default="0.08" /> + <argument index="2" name="collision" type="KinematicCollision2D" default="null" /> + <argument index="3" name="safe_margin" type="float" default="0.08" /> <description> Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision (should there be one). diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml index a2a68115d0..ea2553e28a 100644 --- a/doc/classes/PhysicsBody3D.xml +++ b/doc/classes/PhysicsBody3D.xml @@ -33,10 +33,8 @@ <method name="move_and_collide"> <return type="KinematicCollision3D" /> <argument index="0" name="rel_vec" type="Vector3" /> - <argument index="1" name="infinite_inertia" type="bool" default="true" /> - <argument index="2" name="exclude_raycast_shapes" type="bool" default="true" /> - <argument index="3" name="test_only" type="bool" default="false" /> - <argument index="4" name="safe_margin" type="float" default="0.001" /> + <argument index="1" name="test_only" type="bool" default="false" /> + <argument index="2" name="safe_margin" type="float" default="0.001" /> <description> Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision. If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. @@ -62,10 +60,8 @@ <return type="bool" /> <argument index="0" name="from" type="Transform3D" /> <argument index="1" name="rel_vec" type="Vector3" /> - <argument index="2" name="infinite_inertia" type="bool" default="true" /> - <argument index="3" name="exclude_raycast_shapes" type="bool" default="true" /> - <argument index="4" name="collision" type="KinematicCollision3D" default="null" /> - <argument index="5" name="safe_margin" type="float" default="0.001" /> + <argument index="2" name="collision" type="KinematicCollision3D" default="null" /> + <argument index="3" name="safe_margin" type="float" default="0.001" /> <description> Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision (should there be one). diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml index ab3a04698f..4c6adfca32 100644 --- a/doc/classes/PhysicsDirectBodyState2D.xml +++ b/doc/classes/PhysicsDirectBodyState2D.xml @@ -137,6 +137,13 @@ Returns the current state of the space, useful for queries. </description> </method> + <method name="get_velocity_at_local_position" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="local_position" type="Vector2" /> + <description> + Returns the body's velocity at the given relative position, including both translation and rotation. + </description> + </method> <method name="integrate_forces"> <return type="void" /> <description> diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml index 6af62c2bcc..271668e339 100644 --- a/doc/classes/PhysicsDirectBodyState3D.xml +++ b/doc/classes/PhysicsDirectBodyState3D.xml @@ -138,6 +138,13 @@ Returns the current state of the space, useful for queries. </description> </method> + <method name="get_velocity_at_local_position" qualifiers="const"> + <return type="Vector3" /> + <argument index="0" name="local_position" type="Vector3" /> + <description> + Returns the body's velocity at the given relative position, including both translation and rotation. + </description> + </method> <method name="integrate_forces"> <return type="void" /> <description> diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml index 2a32bc1cb9..e84b3e0e49 100644 --- a/doc/classes/PhysicsDirectSpaceState2D.xml +++ b/doc/classes/PhysicsDirectSpaceState2D.xml @@ -47,7 +47,7 @@ <argument index="0" name="point" type="Vector2" /> <argument index="1" name="max_results" type="int" default="32" /> <argument index="2" name="exclude" type="Array" default="[]" /> - <argument index="3" name="collision_layer" type="int" default="2147483647" /> + <argument index="3" name="collision_mask" type="int" default="2147483647" /> <argument index="4" name="collide_with_bodies" type="bool" default="true" /> <argument index="5" name="collide_with_areas" type="bool" default="false" /> <description> @@ -57,7 +57,7 @@ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. [b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected. </description> </method> @@ -67,7 +67,7 @@ <argument index="1" name="canvas_instance_id" type="int" /> <argument index="2" name="max_results" type="int" default="32" /> <argument index="3" name="exclude" type="Array" default="[]" /> - <argument index="4" name="collision_layer" type="int" default="2147483647" /> + <argument index="4" name="collision_mask" type="int" default="2147483647" /> <argument index="5" name="collide_with_bodies" type="bool" default="true" /> <argument index="6" name="collide_with_areas" type="bool" default="false" /> <description> @@ -78,7 +78,7 @@ <argument index="0" name="from" type="Vector2" /> <argument index="1" name="to" type="Vector2" /> <argument index="2" name="exclude" type="Array" default="[]" /> - <argument index="3" name="collision_layer" type="int" default="2147483647" /> + <argument index="3" name="collision_mask" type="int" default="2147483647" /> <argument index="4" name="collide_with_bodies" type="bool" default="true" /> <argument index="5" name="collide_with_areas" type="bool" default="false" /> <description> @@ -91,7 +91,7 @@ [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. If the ray did not intersect anything, then an empty dictionary is returned instead. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. </description> </method> <method name="intersect_shape"> diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml index a6bfc8754d..13db50a2c7 100644 --- a/doc/classes/PhysicsDirectSpaceState3D.xml +++ b/doc/classes/PhysicsDirectSpaceState3D.xml @@ -59,7 +59,7 @@ [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. If the ray did not intersect anything, then an empty dictionary is returned instead. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect, or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively. </description> </method> <method name="intersect_shape"> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index cf23fecd08..1df2fd0158 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -593,11 +593,9 @@ <argument index="0" name="body" type="RID" /> <argument index="1" name="from" type="Transform2D" /> <argument index="2" name="motion" type="Vector2" /> - <argument index="3" name="infinite_inertia" type="bool" /> - <argument index="4" name="margin" type="float" default="0.08" /> - <argument index="5" name="result" type="PhysicsTestMotionResult2D" default="null" /> - <argument index="6" name="exclude_raycast_shapes" type="bool" default="true" /> - <argument index="7" name="exclude" type="Array" default="[]" /> + <argument index="3" name="margin" type="float" default="0.08" /> + <argument index="4" name="result" type="PhysicsTestMotionResult2D" default="null" /> + <argument index="5" name="exclude" type="Array" default="[]" /> <description> Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult2D] can be passed to return additional information in. </description> @@ -718,16 +716,6 @@ Sets a joint parameter. See [enum JointParam] for a list of available parameters. </description> </method> - <method name="line_shape_create"> - <return type="RID" /> - <description> - </description> - </method> - <method name="ray_shape_create"> - <return type="RID" /> - <description> - </description> - </method> <method name="rectangle_shape_create"> <return type="RID" /> <description> @@ -819,6 +807,11 @@ Sets the value for a space parameter. See [enum SpaceParameter] for a list of available parameters. </description> </method> + <method name="world_margin_shape_create"> + <return type="RID" /> + <description> + </description> + </method> </methods> <constants> <constant name="SPACE_PARAM_CONTACT_RECYCLE_RADIUS" value="0" enum="SpaceParameter"> @@ -844,30 +837,28 @@ </constant> <constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="7" enum="SpaceParameter"> </constant> - <constant name="SHAPE_LINE" value="0" enum="ShapeType"> - This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks. - </constant> - <constant name="SHAPE_RAY" value="1" enum="ShapeType"> + <constant name="SHAPE_WORLD_MARGIN" value="0" enum="ShapeType"> + This is the constant for creating world margin shapes. A world margin shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks. </constant> - <constant name="SHAPE_SEGMENT" value="2" enum="ShapeType"> - This is the constant for creating segment shapes. A segment shape is a line from a point A to a point B. It can be checked for intersections. + <constant name="SHAPE_SEGMENT" value="1" enum="ShapeType"> + This is the constant for creating segment shapes. A segment shape is a [i]finite[/i] line from a point A to a point B. It can be checked for intersections. </constant> - <constant name="SHAPE_CIRCLE" value="3" enum="ShapeType"> + <constant name="SHAPE_CIRCLE" value="2" enum="ShapeType"> This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. </constant> - <constant name="SHAPE_RECTANGLE" value="4" enum="ShapeType"> + <constant name="SHAPE_RECTANGLE" value="3" enum="ShapeType"> This is the constant for creating rectangle shapes. A rectangle shape is defined by a width and a height. It can be used for intersections and inside/outside checks. </constant> - <constant name="SHAPE_CAPSULE" value="5" enum="ShapeType"> + <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType"> This is the constant for creating capsule shapes. A capsule shape is defined by a radius and a length. It can be used for intersections and inside/outside checks. </constant> - <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType"> + <constant name="SHAPE_CONVEX_POLYGON" value="5" enum="ShapeType"> This is the constant for creating convex polygon shapes. A polygon is defined by a list of points. It can be used for intersections and inside/outside checks. Unlike the [member CollisionPolygon2D.polygon] property, polygons modified with [method shape_set_data] do not verify that the points supplied form is a convex polygon. </constant> - <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType"> + <constant name="SHAPE_CONCAVE_POLYGON" value="6" enum="ShapeType"> This is the constant for creating concave polygon shapes. A polygon is defined by a list of points. It can be used for intersections checks, but not for inside/outside checks. </constant> - <constant name="SHAPE_CUSTOM" value="8" enum="ShapeType"> + <constant name="SHAPE_CUSTOM" value="7" enum="ShapeType"> This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. </constant> <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter"> diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 7bca8afdda..d46e38ac5f 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -569,9 +569,9 @@ <argument index="0" name="body" type="RID" /> <argument index="1" name="from" type="Transform3D" /> <argument index="2" name="motion" type="Vector3" /> - <argument index="3" name="infinite_inertia" type="bool" /> - <argument index="4" name="margin" type="float" default="0.001" /> - <argument index="5" name="result" type="PhysicsTestMotionResult3D" default="null" /> + <argument index="3" name="margin" type="float" default="0.001" /> + <argument index="4" name="result" type="PhysicsTestMotionResult3D" default="null" /> + <argument index="5" name="exclude" type="Array" default="[]" /> <description> Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult3D] can be passed to return additional information in. </description> @@ -849,11 +849,6 @@ <description> </description> </method> - <method name="ray_shape_create"> - <return type="RID" /> - <description> - </description> - </method> <method name="set_active"> <return type="void" /> <argument index="0" name="active" type="bool" /> @@ -1176,34 +1171,31 @@ <constant name="SHAPE_PLANE" value="0" enum="ShapeType"> The [Shape3D] is a [WorldMarginShape3D]. </constant> - <constant name="SHAPE_RAY" value="1" enum="ShapeType"> - The [Shape3D] is a [RayShape3D]. - </constant> - <constant name="SHAPE_SPHERE" value="2" enum="ShapeType"> + <constant name="SHAPE_SPHERE" value="1" enum="ShapeType"> The [Shape3D] is a [SphereShape3D]. </constant> - <constant name="SHAPE_BOX" value="3" enum="ShapeType"> + <constant name="SHAPE_BOX" value="2" enum="ShapeType"> The [Shape3D] is a [BoxShape3D]. </constant> - <constant name="SHAPE_CAPSULE" value="4" enum="ShapeType"> + <constant name="SHAPE_CAPSULE" value="3" enum="ShapeType"> The [Shape3D] is a [CapsuleShape3D]. </constant> - <constant name="SHAPE_CYLINDER" value="5" enum="ShapeType"> + <constant name="SHAPE_CYLINDER" value="4" enum="ShapeType"> The [Shape3D] is a [CylinderShape3D]. </constant> - <constant name="SHAPE_CONVEX_POLYGON" value="6" enum="ShapeType"> + <constant name="SHAPE_CONVEX_POLYGON" value="5" enum="ShapeType"> The [Shape3D] is a [ConvexPolygonShape3D]. </constant> - <constant name="SHAPE_CONCAVE_POLYGON" value="7" enum="ShapeType"> + <constant name="SHAPE_CONCAVE_POLYGON" value="6" enum="ShapeType"> The [Shape3D] is a [ConcavePolygonShape3D]. </constant> - <constant name="SHAPE_HEIGHTMAP" value="8" enum="ShapeType"> + <constant name="SHAPE_HEIGHTMAP" value="7" enum="ShapeType"> The [Shape3D] is a [HeightMapShape3D]. </constant> - <constant name="SHAPE_SOFT_BODY" value="9" enum="ShapeType"> + <constant name="SHAPE_SOFT_BODY" value="8" enum="ShapeType"> The [Shape3D] is a [SoftBody3D]. </constant> - <constant name="SHAPE_CUSTOM" value="10" enum="ShapeType"> + <constant name="SHAPE_CUSTOM" value="9" enum="ShapeType"> This constant is used internally by the engine. Any attempt to create this kind of shape results in an error. </constant> <constant name="AREA_PARAM_GRAVITY" value="0" enum="AreaParameter"> diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml index 229a40638a..8b006c68e7 100644 --- a/doc/classes/PhysicsShapeQueryParameters2D.xml +++ b/doc/classes/PhysicsShapeQueryParameters2D.xml @@ -17,8 +17,8 @@ <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> If [code]true[/code], the query will take [PhysicsBody2D]s into account. </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="2147483647"> - The physics layer(s) the query will take into account (as a bitmask). 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 name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647"> + The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. 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="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]"> The list of objects or object [RID]s that will be excluded from collisions. diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml index 9ca892acb3..de9b623591 100644 --- a/doc/classes/PhysicsShapeQueryParameters3D.xml +++ b/doc/classes/PhysicsShapeQueryParameters3D.xml @@ -18,7 +18,7 @@ If [code]true[/code], the query will take [PhysicsBody3D]s into account. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647"> - The physics layer(s) the query will take into account (as a bitmask). 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. + The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. 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="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]"> The list of objects or object [RID]s that will be excluded from collisions. diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index a2c8a581cf..61b5aa89a6 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -538,77 +538,77 @@ <constants> </constants> <theme_items> - <theme_item name="checked" type="Texture2D"> + <theme_item name="checked" data_type="icon" type="Texture2D"> [Texture2D] icon for the checked checkbox items. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="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)"> + <theme_item name="font_accelerator_color" data_type="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)"> + <theme_item name="font_color" data_type="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_disabled_color" type="Color" default="Color(0.4, 0.4, 0.4, 0.8)"> + <theme_item name="font_disabled_color" data_type="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_hover_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> [Color] used for the hovered text. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_separator_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the menu items. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> [StyleBox] displayed when the [PopupMenu] item is hovered. </theme_item> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" 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 name="item_end_padding" data_type="constant" type="int" default="2"> </theme_item> - <theme_item name="item_start_padding" type="int" default="2"> + <theme_item name="item_start_padding" data_type="constant" type="int" default="2"> </theme_item> - <theme_item name="labeled_separator_left" type="StyleBox"> + <theme_item name="labeled_separator_left" data_type="style" type="StyleBox"> [StyleBox] for the left side of labeled separator. See [method add_separator]. </theme_item> - <theme_item name="labeled_separator_right" type="StyleBox"> + <theme_item name="labeled_separator_right" data_type="style" 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"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the item text outline. </theme_item> - <theme_item name="panel" type="StyleBox"> + <theme_item name="panel" data_type="style" type="StyleBox"> Default [StyleBox] of the [PopupMenu] items. </theme_item> - <theme_item name="panel_disabled" type="StyleBox"> + <theme_item name="panel_disabled" data_type="style" type="StyleBox"> [StyleBox] used when the [PopupMenu] item is disabled. </theme_item> - <theme_item name="radio_checked" type="Texture2D"> + <theme_item name="radio_checked" data_type="icon" type="Texture2D"> [Texture2D] icon for the checked radio button items. </theme_item> - <theme_item name="radio_unchecked" type="Texture2D"> + <theme_item name="radio_unchecked" data_type="icon" type="Texture2D"> [Texture2D] icon for the unchecked radio button items. </theme_item> - <theme_item name="separator" type="StyleBox"> + <theme_item name="separator" data_type="style" type="StyleBox"> [StyleBox] used for the separators. See [method add_separator]. </theme_item> - <theme_item name="submenu" type="Texture2D"> + <theme_item name="submenu" data_type="icon" type="Texture2D"> [Texture2D] icon for the submenu arrow (for left-to-right layouts). </theme_item> - <theme_item name="submenu_mirrored" type="Texture2D"> + <theme_item name="submenu_mirrored" data_type="icon" type="Texture2D"> [Texture2D] icon for the submenu arrow (for right-to-left layouts). </theme_item> - <theme_item name="unchecked" type="Texture2D"> + <theme_item name="unchecked" data_type="icon" type="Texture2D"> [Texture2D] icon for the unchecked checkbox items. </theme_item> - <theme_item name="vseparation" type="int" default="4"> + <theme_item name="vseparation" data_type="constant" type="int" default="4"> The vertical space between each menu item. </theme_item> </theme_items> diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml index 72045c5559..56833f3f79 100644 --- a/doc/classes/PopupPanel.xml +++ b/doc/classes/PopupPanel.xml @@ -13,7 +13,7 @@ <constants> </constants> <theme_items> - <theme_item name="panel" type="StyleBox"> + <theme_item name="panel" data_type="style" type="StyleBox"> The background panel style of this [PopupPanel]. </theme_item> </theme_items> diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index c33f6f636d..8bd013c86c 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -20,28 +20,28 @@ <constants> </constants> <theme_items> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> The style of the background. </theme_item> - <theme_item name="fg" type="StyleBox"> + <theme_item name="fg" data_type="style" type="StyleBox"> The style of the progress (i.e. the part that fills the bar). </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> Font used to draw the fill percentage if [member percent_visible] is [code]true[/code]. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> The color of the text. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_shadow_color" data_type="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"> + <theme_item name="font_size" data_type="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"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> </theme_items> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 383049fb3e..0d1fa0e70f 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -423,6 +423,8 @@ <member name="debug/settings/stdout/print_fps" type="bool" setter="" getter="" default="false"> Print frames per second to standard output every second. </member> + <member name="debug/settings/stdout/print_gpu_profile" type="bool" setter="" getter="" default="false"> + </member> <member name="debug/settings/stdout/verbose_stdout" type="bool" setter="" getter="" default="false"> Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. </member> @@ -715,6 +717,12 @@ 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/buffering/agile_event_flushing" type="bool" setter="" getter="" default="false"> + If [code]true[/code], key/touch/joystick events will be flushed just before every idle and physics frame. + If [code]false[/code], such events will be flushed only once per process frame, between iterations of the engine. + Enabling this can greatly improve the responsiveness to input, specially in devices that need to run multiple physics frames per visible (process) frame, because they can't run at the target frame rate. + [b]Note:[/b] Currently implemented only on Android. + </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> @@ -741,15 +749,40 @@ <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/pseudolocalization/double_vowels" type="bool" setter="" getter="" default="false"> + Double vowels in strings during pseudolocalization to simulate the lengthening of text due to localization. + </member> + <member name="internationalization/pseudolocalization/expansion_ratio" type="float" setter="" getter="" default="0.0"> + The expansion ratio to use during pseudolocalization. A value of [code]0.3[/code] is sufficient for most practical purposes, and will increase the length of each string by 30%. + </member> + <member name="internationalization/pseudolocalization/fake_bidi" type="bool" setter="" getter="" default="false"> + If [code]true[/code], emulate bidirectional (right-to-left) text when pseudolocalization is enabled. This can be used to spot issues with RTL layout and UI mirroring that will crop up if the project is localized to RTL languages such as Arabic or Hebrew. + </member> + <member name="internationalization/pseudolocalization/override" type="bool" setter="" getter="" default="false"> + Replace all characters in the string with [code]*[/code]. Useful for finding non-localizable strings. + </member> + <member name="internationalization/pseudolocalization/prefix" type="String" setter="" getter="" default=""[""> + Prefix that will be prepended to the pseudolocalized string. + </member> + <member name="internationalization/pseudolocalization/replace_with_accents" type="bool" setter="" getter="" default="true"> + Replace all characters with their accented variants during pseudolocalization. + </member> + <member name="internationalization/pseudolocalization/skip_placeholders" type="bool" setter="" getter="" default="true"> + Skip placeholders for string formatting like [code]%s[/code] or [code]%f[/code] during pseudolocalization. Useful to identify strings which need additional control characters to display correctly. + </member> + <member name="internationalization/pseudolocalization/suffix" type="String" setter="" getter="" default=""]""> + Suffix that will be appended to the pseudolocalized string. + </member> + <member name="internationalization/pseudolocalization/use_pseudolocalization" type="bool" setter="" getter="" default="false"> + If [code]true[/code], enables pseudolocalization for the project. This can be used to spot untranslatable strings or layout issues that may occur once the project is localized to languages that have longer strings than the source language. + [b]Note:[/b] This property is only read when the project starts. To toggle pseudolocalization at run-time, use [member TranslationServer.pseudolocalization_enabled] instead. + </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_navigation/layer_0" type="String" setter="" getter="" default=""""> - Optional name for the 2D navigation layer 0. If left empty, the layer will display as "Layer 0". - </member> <member name="layer_names/2d_navigation/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -825,6 +858,9 @@ <member name="layer_names/2d_navigation/layer_31" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 31. If left empty, the layer will display as "Layer 31". </member> + <member name="layer_names/2d_navigation/layer_32" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 32. If left empty, the layer will display as "Layer 32". + </member> <member name="layer_names/2d_navigation/layer_4" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 4. If left empty, the layer will display as "Layer 4". </member> @@ -843,9 +879,6 @@ <member name="layer_names/2d_navigation/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 9. If left empty, the layer will display as "Layer 9". </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> <member name="layer_names/2d_physics/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -921,6 +954,9 @@ <member name="layer_names/2d_physics/layer_31" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 31. If left empty, the layer will display as "Layer 31". </member> + <member name="layer_names/2d_physics/layer_32" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 32. If left empty, the layer will display as "Layer 32". + </member> <member name="layer_names/2d_physics/layer_4" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 4. If left empty, the layer will display as "Layer 4". </member> @@ -939,9 +975,6 @@ <member name="layer_names/2d_physics/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 9. If left empty, the layer will display as "Layer 9". </member> - <member name="layer_names/2d_render/layer_0" type="String" setter="" getter="" default=""""> - Optional name for the 2D render layer 0. If left empty, the layer will display as "Layer 0". - </member> <member name="layer_names/2d_render/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 2D render layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -978,6 +1011,9 @@ <member name="layer_names/2d_render/layer_2" type="String" setter="" getter="" default=""""> Optional name for the 2D render layer 2. If left empty, the layer will display as "Layer 2". </member> + <member name="layer_names/2d_render/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 20. If left empty, the layer will display as "Layer 20". + </member> <member name="layer_names/2d_render/layer_3" type="String" setter="" getter="" default=""""> Optional name for the 2D render layer 3. If left empty, the layer will display as "Layer 3". </member> @@ -999,9 +1035,6 @@ <member name="layer_names/2d_render/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 2D render layer 9. If left empty, the layer will display as "Layer 9". </member> - <member name="layer_names/3d_navigation/layer_0" type="String" setter="" getter="" default=""""> - Optional name for the 3D navigation layer 0. If left empty, the layer will display as "Layer 0". - </member> <member name="layer_names/3d_navigation/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 3D navigation layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -1077,6 +1110,9 @@ <member name="layer_names/3d_navigation/layer_31" type="String" setter="" getter="" default=""""> Optional name for the 3D navigation layer 31. If left empty, the layer will display as "Layer 31". </member> + <member name="layer_names/3d_navigation/layer_32" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 32. If left empty, the layer will display as "Layer 32". + </member> <member name="layer_names/3d_navigation/layer_4" type="String" setter="" getter="" default=""""> Optional name for the 3D navigation layer 4. If left empty, the layer will display as "Layer 4". </member> @@ -1095,9 +1131,6 @@ <member name="layer_names/3d_navigation/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 3D navigation layer 9. If left empty, the layer will display as "Layer 9". </member> - <member name="layer_names/3d_physics/layer_0" type="String" setter="" getter="" default=""""> - Optional name for the 3D physics layer 0. If left empty, the layer will display as "Layer 0". - </member> <member name="layer_names/3d_physics/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 3D physics layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -1173,6 +1206,9 @@ <member name="layer_names/3d_physics/layer_31" type="String" setter="" getter="" default=""""> Optional name for the 3D physics layer 31. If left empty, the layer will display as "Layer 31". </member> + <member name="layer_names/3d_physics/layer_32" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 32. If left empty, the layer will display as "Layer 32". + </member> <member name="layer_names/3d_physics/layer_4" type="String" setter="" getter="" default=""""> Optional name for the 3D physics layer 4. If left empty, the layer will display as "Layer 4". </member> @@ -1191,9 +1227,6 @@ <member name="layer_names/3d_physics/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 3D physics layer 9. If left empty, the layer will display as "Layer 9". </member> - <member name="layer_names/3d_render/layer_0" type="String" setter="" getter="" default=""""> - Optional name for the 2D render layer 0. If left empty, the layer will display as "Layer 0". - </member> <member name="layer_names/3d_render/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 3D render layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -1230,6 +1263,9 @@ <member name="layer_names/3d_render/layer_2" type="String" setter="" getter="" default=""""> Optional name for the 3D render layer 2. If left empty, the layer will display as "Layer 2". </member> + <member name="layer_names/3d_render/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 20. If left empty, the layer will display as "Layer 20". + </member> <member name="layer_names/3d_render/layer_3" type="String" setter="" getter="" default=""""> Optional name for the 3D render layer 3. If left empty, the layer will display as "Layer 3". </member> @@ -1316,7 +1352,7 @@ </member> <member name="physics/2d/default_angular_damp" type="float" setter="" getter="" default="1.0"> The default angular damp in 2D. - [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. + [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_ticks_per_second], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/2d/default_gravity" type="float" setter="" getter="" default="980.0"> The default gravity strength in 2D (in pixels per second squared). @@ -1348,7 +1384,7 @@ </member> <member name="physics/2d/default_linear_damp" type="float" setter="" getter="" default="0.1"> The default linear damp in 2D. - [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. + [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_ticks_per_second], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/2d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> Sets which physics engine to use for 2D physics. @@ -1368,7 +1404,7 @@ </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. + [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_ticks_per_second], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/3d/default_gravity" type="float" setter="" getter="" default="9.8"> The default gravity strength in 3D (in meters per second squared). @@ -1400,7 +1436,7 @@ </member> <member name="physics/3d/default_linear_damp" type="float" setter="" getter="" default="0.1"> The default linear 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. + [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_ticks_per_second], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/3d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> Sets which physics engine to use for 3D physics. @@ -1418,15 +1454,15 @@ <member name="physics/common/enable_object_picking" type="bool" setter="" getter="" default="true"> Enables [member Viewport.physics_object_picking] on the root viewport. </member> - <member name="physics/common/physics_fps" type="int" setter="" getter="" default="60"> - The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. - [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.iterations_per_second] instead. - </member> <member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5"> Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. [b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics/common/physics_jitter_fix] to [code]0[/code]. [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="physics/common/physics_ticks_per_second" type="int" setter="" getter="" default="60"> + The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. + [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_ticks_per_second] instead. + </member> <member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1"> </member> <member name="rendering/2d/sdf/scale" type="int" setter="" getter="" default="1"> @@ -1452,7 +1488,7 @@ </member> <member name="rendering/anti_aliasing/screen_space_roughness_limiter/limit" type="float" setter="" getter="" default="0.18"> </member> - <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2"> + <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="1"> Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother. </member> <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_shape" type="int" setter="" getter="" default="1"> @@ -1683,9 +1719,11 @@ </member> <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. + [b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time. </member> <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. + [b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time. </member> <member name="rendering/textures/light_projectors/filter" type="int" setter="" getter="" default="3"> </member> diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index d8a5fc8508..1d32db8078 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -53,11 +53,11 @@ Returns the shape ID of the first object that the ray intersects, or [code]0[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> + <method name="get_collision_mask_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns an individual bit on the collision mask. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_collision_normal" qualifiers="const"> @@ -93,12 +93,12 @@ Removes a collision exception so the ray does report collisions with the specified [RID]. </description> </method> - <method name="set_collision_mask_bit"> + <method name="set_collision_mask_value"> <return type="void" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> - Sets or clears individual bits on the collision mask. This makes selecting the areas scanned easier. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> </methods> diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 4e8eb960db..8628ab7dac 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -55,12 +55,11 @@ Returns the shape ID of the first object that the ray intersects, or [code]0[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> + <method name="get_collision_mask_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns [code]true[/code] if the bit index passed is turned on. - [b]Note:[/b] Bit indices range from 0-19. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_collision_normal" qualifiers="const"> @@ -96,13 +95,12 @@ Removes a collision exception so the ray does report collisions with the specified [RID]. </description> </method> - <method name="set_collision_mask_bit"> + <method name="set_collision_mask_value"> <return type="void" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> - Sets the bit index passed to the [code]value[/code] passed. - [b]Note:[/b] Bit indexes range from 0-19. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> </methods> diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml deleted file mode 100644 index 432c650074..0000000000 --- a/doc/classes/RayShape2D.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="RayShape2D" inherits="Shape2D" version="4.0"> - <brief_description> - Ray shape for 2D collisions. - </brief_description> - <description> - Ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="length" type="float" setter="set_length" getter="get_length" default="20.0"> - The ray's length. - </member> - <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope" default="false"> - If [code]true[/code], allow the shape to return the correct normal. - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/RayShape3D.xml b/doc/classes/RayShape3D.xml deleted file mode 100644 index 9839044c30..0000000000 --- a/doc/classes/RayShape3D.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="RayShape3D" inherits="Shape3D" version="4.0"> - <brief_description> - Ray shape for 3D collisions. - </brief_description> - <description> - Ray shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="length" type="float" setter="set_length" getter="get_length" default="1.0"> - The ray's length. - </member> - <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope" default="false"> - If [code]true[/code], allow the shape to return the correct normal. - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index c017bcaa1a..c329821646 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -142,7 +142,7 @@ <argument index="5" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()" /> <argument index="6" name="clear_depth" type="float" default="1.0" /> <argument index="7" name="clear_stencil" type="int" default="0" /> - <argument index="8" name="region" type="Rect2" default="Rect2i(0, 0, 0, 0)" /> + <argument index="8" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" /> <argument index="9" name="storage_textures" type="Array" default="[]" /> <description> </description> @@ -165,7 +165,7 @@ <argument index="6" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()" /> <argument index="7" name="clear_depth" type="float" default="1.0" /> <argument index="8" name="clear_stencil" type="int" default="0" /> - <argument index="9" name="region" type="Rect2" default="Rect2i(0, 0, 0, 0)" /> + <argument index="9" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" /> <argument index="10" name="storage_textures" type="RID[]" default="[]" /> <description> </description> @@ -217,7 +217,7 @@ <method name="draw_list_enable_scissor"> <return type="void" /> <argument index="0" name="draw_list" type="int" /> - <argument index="1" name="rect" type="Rect2" default="Rect2i(0, 0, 0, 0)" /> + <argument index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" /> <description> </description> </method> @@ -1148,7 +1148,7 @@ </constant> <constant name="TEXTURE_USAGE_CAN_COPY_TO_BIT" value="256" enum="TextureUsageBits"> </constant> - <constant name="TEXTURE_USAGE_RESOLVE_ATTACHMENT_BIT" value="512" enum="TextureUsageBits"> + <constant name="TEXTURE_USAGE_INPUT_ATTACHMENT_BIT" value="512" enum="TextureUsageBits"> </constant> <constant name="TEXTURE_SWIZZLE_IDENTITY" value="0" enum="TextureSwizzle"> </constant> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 3a3ce189d5..81e825194b 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -34,6 +34,13 @@ Returns the list of recognized extensions for a resource type. </description> </method> + <method name="get_resource_uid"> + <return type="int" /> + <argument index="0" name="path" type="String" /> + <description> + Returns the ID associated with a given resource path, or [code]-1[/code] when no such ID exists. + </description> + </method> <method name="has_cached"> <return type="bool" /> <argument index="0" name="path" type="String" /> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index e1362917b0..7bbcc5e0b5 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -21,7 +21,7 @@ <argument index="1" name="width" type="int" default="0" /> <argument index="2" name="height" type="int" default="0" /> <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" /> - <argument index="4" name="inline_align" type="int" enum="VAlign" default="0" /> + <argument index="4" name="inline_align" type="int" enum="InlineAlign" default="5" /> <description> Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image and a [code]color[/code] to tint the image. If [code]width[/code] or [code]height[/code] is set to 0, the image size will be adjusted in order to keep the original aspect ratio. @@ -288,7 +288,7 @@ <method name="push_table"> <return type="void" /> <argument index="0" name="columns" type="int" /> - <argument index="1" name="inline_align" type="int" enum="VAlign" default="0" /> + <argument index="1" name="inline_align" type="int" enum="InlineAlign" default="0" /> <description> Adds a [code][table=columns,inline_align][/code] tag to the tag stack. </description> @@ -522,85 +522,85 @@ </constant> </constants> <theme_items> - <theme_item name="bold_font" type="Font"> + <theme_item name="bold_font" data_type="font" type="Font"> The font used for bold text. </theme_item> - <theme_item name="bold_font_size" type="int"> + <theme_item name="bold_font_size" data_type="font_size" type="int"> The font size used for bold text. </theme_item> - <theme_item name="bold_italics_font" type="Font"> + <theme_item name="bold_italics_font" data_type="font" type="Font"> The font used for bold italics text. </theme_item> - <theme_item name="bold_italics_font_size" type="int"> + <theme_item name="bold_italics_font_size" data_type="font_size" type="int"> The font size used for bold italics text. </theme_item> - <theme_item name="default_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="default_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The default text color. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> The background The background used when the [RichTextLabel] is focused. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The default tint of text outline. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> The color of selected text, used when [member selection_enabled] is [code]true[/code]. </theme_item> - <theme_item name="font_shadow_color" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="font_shadow_color" data_type="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"> + <theme_item name="italics_font" data_type="font" type="Font"> The font used for italics text. </theme_item> - <theme_item name="italics_font_size" type="int"> + <theme_item name="italics_font_size" data_type="font_size" type="int"> The font size used for italics text. </theme_item> - <theme_item name="line_separation" type="int" default="1"> + <theme_item name="line_separation" data_type="constant" type="int" default="1"> The vertical space between lines. </theme_item> - <theme_item name="mono_font" type="Font"> + <theme_item name="mono_font" data_type="font" type="Font"> The font used for monospace text. </theme_item> - <theme_item name="mono_font_size" type="int"> + <theme_item name="mono_font_size" data_type="font_size" type="int"> The font size used for monospace text. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> The normal background for the [RichTextLabel]. </theme_item> - <theme_item name="normal_font" type="Font"> + <theme_item name="normal_font" data_type="font" type="Font"> The default text font. </theme_item> - <theme_item name="normal_font_size" type="int"> + <theme_item name="normal_font_size" data_type="font_size" type="int"> The default text font size. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" 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)"> + <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.1, 0.1, 1, 0.8)"> The color of the selection box. </theme_item> - <theme_item name="shadow_as_outline" type="int" default="0"> + <theme_item name="shadow_as_outline" data_type="constant" type="int" default="0"> Boolean value. If 1 ([code]true[/code]), the shadow will be displayed around the whole text as an outline. </theme_item> - <theme_item name="shadow_offset_x" type="int" default="1"> + <theme_item name="shadow_offset_x" data_type="constant" type="int" default="1"> The horizontal offset of the font's shadow. </theme_item> - <theme_item name="shadow_offset_y" type="int" default="1"> + <theme_item name="shadow_offset_y" data_type="constant" type="int" default="1"> The vertical offset of the font's shadow. </theme_item> - <theme_item name="table_border" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="table_border" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> The default cell border color. </theme_item> - <theme_item name="table_even_row_bg" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="table_even_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> The default background color for even rows. </theme_item> - <theme_item name="table_hseparation" type="int" default="3"> + <theme_item name="table_hseparation" data_type="constant" type="int" default="3"> The horizontal separation of elements in a table. </theme_item> - <theme_item name="table_odd_row_bg" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="table_odd_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> The default background color for odd rows. </theme_item> - <theme_item name="table_vseparation" type="int" default="3"> + <theme_item name="table_vseparation" data_type="constant" type="int" default="3"> The vertical separation of elements in a table. </theme_item> </theme_items> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 600e2ee245..953ab24748 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -72,7 +72,7 @@ <constants> </constants> <theme_items> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> The background [StyleBox] of the [ScrollContainer]. </theme_item> </theme_items> diff --git a/doc/classes/Shortcut.xml b/doc/classes/Shortcut.xml index 04955103dc..d9f7f98888 100644 --- a/doc/classes/Shortcut.xml +++ b/doc/classes/Shortcut.xml @@ -5,7 +5,7 @@ </brief_description> <description> A shortcut for binding input. - Shortcuts are commonly used for interacting with a [Control] element from a [InputEvent]. + Shortcuts are commonly used for interacting with a [Control] element from an [InputEvent] (also known as hotkeys). </description> <tutorials> </tutorials> @@ -16,24 +16,24 @@ Returns the shortcut's [InputEvent] as a [String]. </description> </method> - <method name="is_shortcut" qualifiers="const"> + <method name="has_valid_event" qualifiers="const"> <return type="bool" /> - <argument index="0" name="event" type="InputEvent" /> <description> - Returns [code]true[/code] if the shortcut's [InputEvent] equals [code]event[/code]. + Returns whether the shortcut has a valid [member event] assigned to it. </description> </method> - <method name="is_valid" qualifiers="const"> + <method name="matches_event" qualifiers="const"> <return type="bool" /> + <argument index="0" name="event" type="InputEvent" /> <description> - If [code]true[/code], this shortcut is valid. + Returns whether the shortcut's [member event] matches [code]event[/code]. </description> </method> </methods> <members> - <member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut"> + <member name="event" type="InputEvent" setter="set_event" getter="get_event"> The shortcut's [InputEvent]. - Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent]. + Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent], including an [InputEventAction]. </member> </members> <constants> diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml index 53bd7e67bf..ddfc14ceac 100644 --- a/doc/classes/SoftBody3D.xml +++ b/doc/classes/SoftBody3D.xml @@ -23,18 +23,18 @@ Returns an array of nodes that were added as collision exceptions for this body. </description> </method> - <method name="get_collision_layer_bit" qualifiers="const"> + <method name="get_collision_layer_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns an individual bit on the collision mask. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> + <method name="get_collision_mask_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns an individual bit on the collision mask. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_physics_rid" qualifiers="const"> @@ -49,20 +49,20 @@ Removes a body from the list of bodies that this body can't collide with. </description> </method> - <method name="set_collision_layer_bit"> + <method name="set_collision_layer_value"> <return type="void" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> - Sets individual bits on the layer mask. Use this if you only need to change one layer's value. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="set_collision_mask_bit"> + <method name="set_collision_mask_value"> <return type="void" /> - <argument index="0" name="bit" type="int" /> + <argument index="0" name="layer_number" type="int" /> <argument index="1" name="value" type="bool" /> <description> - Sets individual bits on the collision mask. Use this if you only need to change one layer's value. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> </methods> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index 1c1e6e5a15..4303fa52f1 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -59,7 +59,7 @@ <constants> </constants> <theme_items> - <theme_item name="updown" type="Texture2D"> + <theme_item name="updown" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] for up and down arrows of the [SpinBox]. </theme_item> </theme_items> diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml index f868503bbd..fde40ba6de 100644 --- a/doc/classes/SpotLight3D.xml +++ b/doc/classes/SpotLight3D.xml @@ -13,8 +13,7 @@ <methods> </methods> <members> - <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.02" /> - <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" override="true" default="1.0" /> + <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.03" /> <member name="spot_angle" type="float" setter="set_param" getter="get_param" default="45.0"> The spotlight's angle in degrees. </member> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 027ae2000a..0376a3f96e 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -89,7 +89,7 @@ <return type="int" /> <argument index="0" name="to" type="String" /> <description> - Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order. + Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method naturalnocasecmp_to]. @@ -388,7 +388,7 @@ <return type="int" /> <argument index="0" name="to" type="String" /> <description> - Performs a case-insensitive [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. + Performs a case-insensitive [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. When used for sorting, natural order comparison will order suites of numbers as expected by most people. If you sort the numbers from 1 to 10 using natural order, you will get [code][1, 2, 3, ...][/code] instead of [code][1, 10, 2, 3, ...][/code]. [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. @@ -399,7 +399,7 @@ <return type="int" /> <argument index="0" name="to" type="String" /> <description> - Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. + Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to] and [method naturalnocasecmp_to]. diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 540b007341..59ab724f48 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -121,7 +121,7 @@ <member name="anti_aliasing" type="bool" setter="set_anti_aliased" getter="is_anti_aliased" default="true"> Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners. </member> - <member name="anti_aliasing_size" type="int" setter="set_aa_size" getter="get_aa_size" default="1"> + <member name="anti_aliasing_size" type="float" setter="set_aa_size" getter="get_aa_size" default="0.625"> This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. </member> <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color(0.6, 0.6, 0.6, 1)"> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 2abe4dc90f..fbda005865 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -161,61 +161,61 @@ </constant> </constants> <theme_items> - <theme_item name="decrement" type="Texture2D"> + <theme_item name="decrement" data_type="icon" type="Texture2D"> Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. </theme_item> - <theme_item name="decrement_highlight" type="Texture2D"> + <theme_item name="decrement_highlight" data_type="icon" type="Texture2D"> Icon for the left 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="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> The font used to draw tab names. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> Font color of disabled tabs. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_selected_color" data_type="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"> + <theme_item name="font_size" data_type="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)"> + <theme_item name="font_unselected_color" data_type="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"> + <theme_item name="icon_separation" data_type="constant" type="int" default="4"> Space between tab's name and its icon. </theme_item> - <theme_item name="increment" type="Texture2D"> + <theme_item name="increment" data_type="icon" type="Texture2D"> Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent. </theme_item> - <theme_item name="increment_highlight" type="Texture2D"> + <theme_item name="increment_highlight" data_type="icon" 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="menu" type="Texture2D"> + <theme_item name="menu" data_type="icon" type="Texture2D"> The icon for the menu button (see [method set_popup]). </theme_item> - <theme_item name="menu_highlight" type="Texture2D"> + <theme_item name="menu_highlight" data_type="icon" 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"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the tab text outline. </theme_item> - <theme_item name="panel" type="StyleBox"> + <theme_item name="panel" data_type="style" type="StyleBox"> The style for the background fill. </theme_item> - <theme_item name="side_margin" type="int" default="8"> + <theme_item name="side_margin" data_type="constant" type="int" default="8"> The space at the left and right edges of the tab bar. </theme_item> - <theme_item name="tab_disabled" type="StyleBox"> + <theme_item name="tab_disabled" data_type="style" type="StyleBox"> The style of disabled tabs. </theme_item> - <theme_item name="tab_selected" type="StyleBox"> + <theme_item name="tab_selected" data_type="style" type="StyleBox"> The style of the currently selected tab. </theme_item> - <theme_item name="tab_unselected" type="StyleBox"> + <theme_item name="tab_unselected" data_type="style" type="StyleBox"> The style of the other, unselected tabs. </theme_item> </theme_items> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index 537bb9c403..f4c89a8b16 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -282,58 +282,58 @@ </constant> </constants> <theme_items> - <theme_item name="button" type="StyleBox"> + <theme_item name="button" data_type="style" type="StyleBox"> Background of the close button when it's being hovered with the cursor. </theme_item> - <theme_item name="button_pressed" type="StyleBox"> + <theme_item name="button_pressed" data_type="style" type="StyleBox"> Background of the close button when it's being pressed. </theme_item> - <theme_item name="close" type="Texture2D"> + <theme_item name="close" data_type="icon" type="Texture2D"> The icon for the close button (see [member tab_close_display_policy]). </theme_item> - <theme_item name="decrement" type="Texture2D"> + <theme_item name="decrement" data_type="icon" type="Texture2D"> Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. </theme_item> - <theme_item name="decrement_highlight" type="Texture2D"> + <theme_item name="decrement_highlight" data_type="icon" type="Texture2D"> Icon for the left 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="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> The font used to draw tab names. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> Font color of disabled tabs. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_selected_color" data_type="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"> + <theme_item name="font_size" data_type="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)"> + <theme_item name="font_unselected_color" data_type="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"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The horizontal separation between the tabs. </theme_item> - <theme_item name="increment" type="Texture2D"> + <theme_item name="increment" data_type="icon" type="Texture2D"> Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent. </theme_item> - <theme_item name="increment_highlight" type="Texture2D"> + <theme_item name="increment_highlight" data_type="icon" 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="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the tab text outline. </theme_item> - <theme_item name="tab_disabled" type="StyleBox"> + <theme_item name="tab_disabled" data_type="style" type="StyleBox"> The style of disabled tabs. </theme_item> - <theme_item name="tab_selected" type="StyleBox"> + <theme_item name="tab_selected" data_type="style" type="StyleBox"> The style of the currently selected tab. </theme_item> - <theme_item name="tab_unselected" type="StyleBox"> + <theme_item name="tab_unselected" data_type="style" type="StyleBox"> The style of the other, unselected tabs. </theme_item> </theme_items> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 5d62050a94..68d20e41d0 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -13,93 +13,99 @@ <method name="_backspace" qualifiers="virtual"> <return type="void" /> <description> - A virtual method that is called whenever backspace is triggered. + Override this method to define what happens when the user presses the backspace key. + </description> + </method> + <method name="_copy" qualifiers="virtual"> + <return type="void" /> + <description> + Override this method to define what happens when the user performs a copy operation. + </description> + </method> + <method name="_cut" qualifiers="virtual"> + <return type="void" /> + <description> + Override this method to define what happens when the user performs a cut operation. </description> </method> <method name="_handle_unicode_input" qualifiers="virtual"> <return type="void" /> <argument index="0" name="unicode" type="int" /> <description> + Override this method to define what happens when the types in the provided key [code]unicode[/code]. </description> </method> - <method name="add_gutter"> + <method name="_paste" qualifiers="virtual"> <return type="void" /> - <argument index="0" name="at" type="int" default="-1" /> <description> + Override this method to define what happens when the user performs a paste operation. </description> </method> - <method name="backspace"> + <method name="add_gutter"> <return type="void" /> + <argument index="0" name="at" type="int" default="-1" /> <description> - Causes the [TextEdit] to perform a backspace. + Register a new gutter to this [TextEdit]. Use [code]at[/code] to have a specific gutter order. A value of [code]-1[/code] appends the gutter to the right. </description> </method> - <method name="center_viewport_to_cursor"> + <method name="adjust_viewport_to_caret"> <return type="void" /> <description> - Centers the viewport on the line the editing cursor is at. This also resets the [member scroll_horizontal] value to [code]0[/code]. + Adjust the viewport so the caret is visible. </description> </method> - <method name="clear_opentype_features"> + <method name="backspace"> <return type="void" /> <description> - Removes all OpenType features. + Called when the user presses the backspace key. Can be overridden with [method _backspace]. </description> </method> - <method name="clear_undo_history"> + <method name="begin_complex_operation"> <return type="void" /> <description> - Clears the undo history. + Starts a multipart edit. All edits will be treated as one action until [method end_complex_operation] is called. </description> </method> - <method name="copy"> + <method name="center_viewport_to_caret"> <return type="void" /> <description> - Copy's the current text selection. + Centers the viewport on the line the editing caret is at. This also resets the [member scroll_horizontal] value to [code]0[/code]. </description> </method> - <method name="cursor_get_column" qualifiers="const"> - <return type="int" /> + <method name="clear"> + <return type="void" /> <description> - Returns the column the editing cursor is at. + Performs a full reset of [TextEdit], including undo history. </description> </method> - <method name="cursor_get_line" qualifiers="const"> - <return type="int" /> + <method name="clear_opentype_features"> + <return type="void" /> <description> - Returns the line the editing cursor is at. + Removes all OpenType features. </description> </method> - <method name="cursor_set_column"> + <method name="clear_undo_history"> <return type="void" /> - <argument index="0" name="column" type="int" /> - <argument index="1" name="adjust_viewport" type="bool" default="true" /> <description> - Moves the cursor at the specified [code]column[/code] index. - If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs. + Clears the undo history. </description> </method> - <method name="cursor_set_line"> + <method name="copy"> <return type="void" /> - <argument index="0" name="line" type="int" /> - <argument index="1" name="adjust_viewport" type="bool" default="true" /> - <argument index="2" name="can_be_hidden" type="bool" default="true" /> - <argument index="3" name="wrap_index" type="int" default="0" /> <description> - Moves the cursor at the specified [code]line[/code] index. - If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs. - If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden. + Copies the current text selection. Can be overridden with [method _copy]. </description> </method> <method name="cut"> <return type="void" /> <description> - Cut's the current selection. + Cut's the current selection. Can be overridden with [method _cut]. </description> </method> <method name="delete_selection"> <return type="void" /> <description> + Deletes the selected text. </description> </method> <method name="deselect"> @@ -108,46 +114,99 @@ Deselects the current selection. </description> </method> + <method name="end_complex_operation"> + <return type="void" /> + <description> + Ends a multipart edit, started with [method begin_complex_operation]. If called outside a complex operation, the current operation is pushed onto the undo/redo stack. + </description> + </method> + <method name="get_caret_column" qualifiers="const"> + <return type="int" /> + <description> + Returns the column the editing caret is at. + </description> + </method> <method name="get_caret_draw_pos" qualifiers="const"> <return type="Vector2" /> <description> - Gets the caret pixel draw position. + Returns the caret pixel draw position. + </description> + </method> + <method name="get_caret_line" qualifiers="const"> + <return type="int" /> + <description> + Returns the line the editing caret is on. + </description> + </method> + <method name="get_caret_wrap_index" qualifiers="const"> + <return type="int" /> + <description> + Returns the wrap index the editing caret is on. </description> </method> <method name="get_first_non_whitespace_column" qualifiers="const"> <return type="int" /> <argument index="0" name="line" type="int" /> <description> + Returns the first column containing a non-whitespace character. + </description> + </method> + <method name="get_first_visible_line" qualifiers="const"> + <return type="int" /> + <description> + Returns the first visible line. </description> </method> <method name="get_gutter_count" qualifiers="const"> <return type="int" /> <description> + Returns the total amount of gutters registered. </description> </method> <method name="get_gutter_name" qualifiers="const"> <return type="String" /> <argument index="0" name="gutter" type="int" /> <description> + Returns the name of the gutter at the given index. </description> </method> <method name="get_gutter_type" qualifiers="const"> <return type="int" enum="TextEdit.GutterType" /> <argument index="0" name="gutter" type="int" /> <description> + Returns the type of the gutter at the given index. </description> </method> <method name="get_gutter_width" qualifiers="const"> <return type="int" /> <argument index="0" name="gutter" type="int" /> <description> + Returns the width of the gutter at the given index. </description> </method> <method name="get_indent_level" qualifiers="const"> <return type="int" /> <argument index="0" name="line" type="int" /> <description> - Returns the indent level of a specific line. + Returns the amount of spaces and [code]tab * tab_size[/code] before the first char. + </description> + </method> + <method name="get_last_full_visible_line" qualifiers="const"> + <return type="int" /> + <description> + Return the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index. + </description> + </method> + <method name="get_last_full_visible_line_wrap_index" qualifiers="const"> + <return type="int" /> + <description> + Returns the last visible wrap index of the last visible line. + </description> + </method> + <method name="get_last_unhidden_line" qualifiers="const"> + <return type="int" /> + <description> + Returns the last unhidden line in the entire [TextEdit]. </description> </method> <method name="get_line" qualifiers="const"> @@ -157,13 +216,20 @@ Returns the text of a specific line. </description> </method> - <method name="get_line_background_color"> + <method name="get_line_background_color" qualifiers="const"> <return type="Color" /> <argument index="0" name="line" type="int" /> <description> Returns the current background color of the line. [code]Color(0, 0, 0, 0)[/code] is returned if no color is set. </description> </method> + <method name="get_line_column_at_pos" qualifiers="const"> + <return type="Vector2i" /> + <argument index="0" name="position" type="Vector2i" /> + <description> + Returns the line and column at the given position. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. + </description> + </method> <method name="get_line_count" qualifiers="const"> <return type="int" /> <description> @@ -175,13 +241,15 @@ <argument index="0" name="line" type="int" /> <argument index="1" name="gutter" type="int" /> <description> + Returns the icon currently in [code]gutter[/code] at [code]line[/code]. </description> </method> - <method name="get_line_gutter_item_color"> + <method name="get_line_gutter_item_color" qualifiers="const"> <return type="Color" /> <argument index="0" name="line" type="int" /> <argument index="1" name="gutter" type="int" /> <description> + Returns the color currently in [code]gutter[/code] at [code]line[/code]. </description> </method> <method name="get_line_gutter_metadata" qualifiers="const"> @@ -189,6 +257,7 @@ <argument index="0" name="line" type="int" /> <argument index="1" name="gutter" type="int" /> <description> + Returns the metadata currently in [code]gutter[/code] at [code]line[/code]. </description> </method> <method name="get_line_gutter_text" qualifiers="const"> @@ -196,6 +265,49 @@ <argument index="0" name="line" type="int" /> <argument index="1" name="gutter" type="int" /> <description> + Returns the text currently in [code]gutter[/code] at [code]line[/code]. + </description> + </method> + <method name="get_line_height" qualifiers="const"> + <return type="int" /> + <description> + Returns the height of a largest line. + </description> + </method> + <method name="get_line_width" qualifiers="const"> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" default="-1" /> + <description> + Returns the width in pixels of the [code]wrap_index[/code] on [code]line[/code]. + </description> + </method> + <method name="get_line_wrap_count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <description> + Returns the number of times the given line is wrapped. + </description> + </method> + <method name="get_line_wrap_index_at_column" qualifiers="const"> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="column" type="int" /> + <description> + Returns the wrap index of the given line column. + </description> + </method> + <method name="get_line_wrapped_text" qualifiers="const"> + <return type="PackedStringArray" /> + <argument index="0" name="line" type="int" /> + <description> + Returns an array of [String]s representing each wrapped index. + </description> + </method> + <method name="get_local_mouse_pos" qualifiers="const"> + <return type="Vector2" /> + <description> + Returns the local mouse position adjusted for the text direction. </description> </method> <method name="get_menu" qualifiers="const"> @@ -204,6 +316,36 @@ Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit]. </description> </method> + <method name="get_minimap_line_at_pos" qualifiers="const"> + <return type="int" /> + <argument index="0" name="position" type="Vector2i" /> + <description> + Returns the equivalent minimap line at [code]position[/code] + </description> + </method> + <method name="get_minimap_visible_lines" qualifiers="const"> + <return type="int" /> + <description> + Returns the total amount of lines that can be draw on the minimap. + </description> + </method> + <method name="get_next_visible_line_index_offset_from" qualifiers="const"> + <return type="Vector2i" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" /> + <argument index="2" name="visible_amount" type="int" /> + <description> + Similar to [method get_next_visible_line_offset_from], but takes into account the line wrap indexes. In the returned vector, [code]x[/code] is the line, [code]y[/code] is the wrap index. + </description> + </method> + <method name="get_next_visible_line_offset_from" qualifiers="const"> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="visible_amount" type="int" /> + <description> + Returns the count to the next visible line from [code]line[/code] to [code]line + visible_amount[/code]. Can also count backwards. For example if a [TextEdit] has 5 lines with lines 2 and 3 hidden, calling this with [code]line = 1, visible_amount = 1[/code] would return 3. + </description> + </method> <method name="get_opentype_feature" qualifiers="const"> <return type="int" /> <argument index="0" name="tag" type="String" /> @@ -211,9 +353,30 @@ Returns OpenType feature [code]tag[/code]. </description> </method> + <method name="get_saved_version" qualifiers="const"> + <return type="int" /> + <description> + Returns the last tagged saved version from [method tag_saved_version] + </description> + </method> + <method name="get_scroll_pos_for_line" qualifiers="const"> + <return type="float" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" default="0" /> + <description> + Returns the scroll position for [code]wrap_index[/code] of [code]line[/code]. + </description> + </method> + <method name="get_selected_text" qualifiers="const"> + <return type="String" /> + <description> + Returns the text inside the selection. + </description> + </method> <method name="get_selection_column" qualifiers="const"> <return type="int" /> <description> + Returns the original start column of the selection. </description> </method> <method name="get_selection_from_column" qualifiers="const"> @@ -231,17 +394,13 @@ <method name="get_selection_line" qualifiers="const"> <return type="int" /> <description> + Returns the original start line of the selection. </description> </method> <method name="get_selection_mode" qualifiers="const"> <return type="int" enum="TextEdit.SelectionMode" /> <description> - </description> - </method> - <method name="get_selection_text" qualifiers="const"> - <return type="String" /> - <description> - Returns the text inside the selection. + Returns the current selection mode. </description> </method> <method name="get_selection_to_column" qualifiers="const"> @@ -265,6 +424,19 @@ <method name="get_total_gutter_width" qualifiers="const"> <return type="int" /> <description> + Returns the total width of all gutters and internal padding. + </description> + </method> + <method name="get_total_visible_line_count" qualifiers="const"> + <return type="int" /> + <description> + Returns the total amount of lines that could be draw. + </description> + </method> + <method name="get_version" qualifiers="const"> + <return type="int" /> + <description> + Returns the current version of the [TextEdit]. The version is a count of recorded operations by the undo/redo history. </description> </method> <method name="get_visible_line_count" qualifiers="const"> @@ -273,17 +445,44 @@ Returns the number of visible lines, including wrapped text. </description> </method> - <method name="get_word_under_cursor" qualifiers="const"> + <method name="get_word_at_pos" qualifiers="const"> <return type="String" /> + <argument index="0" name="position" type="Vector2" /> <description> - Returns a [String] text with the word under the caret (text cursor) location. + Returns the word at [code]position[/code]. </description> </method> - <method name="insert_text_at_cursor"> + <method name="get_word_under_caret" qualifiers="const"> + <return type="String" /> + <description> + Returns a [String] text with the word under the caret's location. + </description> + </method> + <method name="has_ime_text" qualifiers="const"> + <return type="bool" /> + <description> + Returns if the user has IME text. + </description> + </method> + <method name="has_selection" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the user has selected text. + </description> + </method> + <method name="insert_line_at"> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="text" type="String" /> + <description> + Inserts a new line with [code]text[/code] at [code]line[/code]. + </description> + </method> + <method name="insert_text_at_caret"> <return type="void" /> <argument index="0" name="text" type="String" /> <description> - Insert the specified text at the cursor position. + Insert the specified text at the caret position. </description> </method> <method name="is_caret_visible" qualifiers="const"> @@ -295,24 +494,28 @@ <method name="is_dragging_cursor" qualifiers="const"> <return type="bool" /> <description> + Returns [code]true[/code] if the user is dragging their mouse for scrolling or selecting. </description> </method> <method name="is_gutter_clickable" qualifiers="const"> <return type="bool" /> <argument index="0" name="gutter" type="int" /> <description> + Returns whether the gutter is clickable. </description> </method> <method name="is_gutter_drawn" qualifiers="const"> <return type="bool" /> <argument index="0" name="gutter" type="int" /> <description> + Returns whether the gutter is currently drawn. </description> </method> <method name="is_gutter_overwritable" qualifiers="const"> <return type="bool" /> <argument index="0" name="gutter" type="int" /> <description> + Returns whether the gutter is overwritable. </description> </method> <method name="is_line_gutter_clickable" qualifiers="const"> @@ -320,6 +523,14 @@ <argument index="0" name="line" type="int" /> <argument index="1" name="gutter" type="int" /> <description> + Returns whether the gutter on the given line is clickable. + </description> + </method> + <method name="is_line_wrapped" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="line" type="int" /> + <description> + Returns if the given line is wrapped. </description> </method> <method name="is_menu_visible" qualifiers="const"> @@ -328,10 +539,10 @@ Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided). </description> </method> - <method name="is_selection_active" qualifiers="const"> + <method name="is_overtype_mode_enabled" qualifiers="const"> <return type="bool" /> <description> - Returns [code]true[/code] if the selection is active. + Returns whether the user is in overtype mode. </description> </method> <method name="menu_option"> @@ -346,12 +557,13 @@ <argument index="0" name="from_line" type="int" /> <argument index="1" name="to_line" type="int" /> <description> + Merge the gutters from [code]from_line[/code] into [code]to_line[/code]. Only overwritable gutters will be copied. </description> </method> <method name="paste"> <return type="void" /> <description> - Paste the current selection. + Paste at the current location. Can be overridden with [method _paste]. </description> </method> <method name="redo"> @@ -364,32 +576,44 @@ <return type="void" /> <argument index="0" name="gutter" type="int" /> <description> + Removes the gutter from this [TextEdit]. + </description> + </method> + <method name="remove_text"> + <return type="void" /> + <argument index="0" name="from_line" type="int" /> + <argument index="1" name="from_column" type="int" /> + <argument index="2" name="to_line" type="int" /> + <argument index="3" name="to_column" type="int" /> + <description> + Removes text between the given positions. + [b]Note:[/b]This does not adjust the caret or selection, which as a result it can end up in an invalid position. </description> </method> <method name="search" qualifiers="const"> - <return type="Dictionary" /> - <argument index="0" name="key" type="String" /> + <return type="Vector2i" /> + <argument index="0" name="text" type="String" /> <argument index="1" name="flags" type="int" /> <argument index="2" name="from_line" type="int" /> - <argument index="3" name="from_column" type="int" /> + <argument index="3" name="from_colum" type="int" /> <description> Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum. - Returns an empty [code]Dictionary[/code] if no result was found. Otherwise, returns a [code]Dictionary[/code] containing [code]line[/code] and [code]column[/code] entries, e.g: + In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If no results are found, both are equal to [code]-1[/code]. [codeblocks] [gdscript] var result = search("print", SEARCH_WHOLE_WORDS, 0, 0) - if !result.empty(): + if result.x != -1: # Result found. - var line_number = result.line - var column_number = result.column + var line_number = result.y + var column_number = result.x [/gdscript] [csharp] - int[] result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0); + Vector2i result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0); if (result.Length > 0) { // Result found. - int lineNumber = result[(int)TextEdit.SearchResult.Line]; - int columnNumber = result[(int)TextEdit.SearchResult.Column]; + int lineNumber = result.y; + int columnNumber = result.x; } [/csharp] [/codeblocks] @@ -413,11 +637,39 @@ If [member selecting_enabled] is [code]false[/code], no selection will occur. </description> </method> + <method name="select_word_under_caret"> + <return type="void" /> + <description> + Selects the word under the caret. + </description> + </method> + <method name="set_caret_column"> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="adjust_viewport" type="bool" default="true" /> + <description> + Moves the caret to the specified [code]column[/code] index. + If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs. + </description> + </method> + <method name="set_caret_line"> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="adjust_viewport" type="bool" default="true" /> + <argument index="2" name="can_be_hidden" type="bool" default="true" /> + <argument index="3" name="wrap_index" type="int" default="0" /> + <description> + Moves the caret to the specified [code]line[/code] index. + If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs. + If [code]can_be_hidden[/code] is [code]true[/code], the specified [code]line[/code] can be hidden. + </description> + </method> <method name="set_gutter_clickable"> <return type="void" /> <argument index="0" name="gutter" type="int" /> <argument index="1" name="clickable" type="bool" /> <description> + Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter. </description> </method> <method name="set_gutter_custom_draw"> @@ -426,6 +678,7 @@ <argument index="1" name="object" type="Object" /> <argument index="2" name="callback" type="StringName" /> <description> + Set a custom draw method for the gutter. The callback method must take the following args: [code]line: int, gutter: int, Area: Rect2[/code]. </description> </method> <method name="set_gutter_draw"> @@ -433,6 +686,7 @@ <argument index="0" name="gutter" type="int" /> <argument index="1" name="draw" type="bool" /> <description> + Sets whether the gutter should be drawn. </description> </method> <method name="set_gutter_name"> @@ -440,6 +694,7 @@ <argument index="0" name="gutter" type="int" /> <argument index="1" name="name" type="String" /> <description> + Sets the name of the gutter. </description> </method> <method name="set_gutter_overwritable"> @@ -447,6 +702,7 @@ <argument index="0" name="gutter" type="int" /> <argument index="1" name="overwritable" type="bool" /> <description> + Sets the gutter to overwritable. See [method merge_gutters]. </description> </method> <method name="set_gutter_type"> @@ -454,6 +710,7 @@ <argument index="0" name="gutter" type="int" /> <argument index="1" name="type" type="int" enum="TextEdit.GutterType" /> <description> + Sets the type of gutter. </description> </method> <method name="set_gutter_width"> @@ -461,6 +718,7 @@ <argument index="0" name="gutter" type="int" /> <argument index="1" name="width" type="int" /> <description> + Set the width of the gutter. </description> </method> <method name="set_line"> @@ -471,6 +729,30 @@ Sets the text for a specific line. </description> </method> + <method name="set_line_as_center_visible"> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" default="0" /> + <description> + Positions the [code]wrap_index[/code] of [code]line[/code] at the center of the viewport. + </description> + </method> + <method name="set_line_as_first_visible"> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" default="0" /> + <description> + Positions the [code]wrap_index[/code] of [code]line[/code] at the top of the viewport. + </description> + </method> + <method name="set_line_as_last_visible"> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" default="0" /> + <description> + Positions the [code]wrap_index[/code] of [code]line[/code] at the bottom of the viewport. + </description> + </method> <method name="set_line_background_color"> <return type="void" /> <argument index="0" name="line" type="int" /> @@ -485,6 +767,7 @@ <argument index="1" name="gutter" type="int" /> <argument index="2" name="clickable" type="bool" /> <description> + Sets the [code]gutter[/code] on [code]line[/code] as clickable. </description> </method> <method name="set_line_gutter_icon"> @@ -493,6 +776,7 @@ <argument index="1" name="gutter" type="int" /> <argument index="2" name="icon" type="Texture2D" /> <description> + Sets the icon for [code]gutter[/code] on [code]line[/code]. </description> </method> <method name="set_line_gutter_item_color"> @@ -501,6 +785,7 @@ <argument index="1" name="gutter" type="int" /> <argument index="2" name="color" type="Color" /> <description> + Sets the color for [code]gutter[/code] on [code]line[/code]. </description> </method> <method name="set_line_gutter_metadata"> @@ -509,6 +794,7 @@ <argument index="1" name="gutter" type="int" /> <argument index="2" name="metadata" type="Variant" /> <description> + Sets the metadata for [code]gutter[/code] on [code]line[/code]. </description> </method> <method name="set_line_gutter_text"> @@ -517,6 +803,7 @@ <argument index="1" name="gutter" type="int" /> <argument index="2" name="text" type="String" /> <description> + Sets the text for [code]gutter[/code] on [code]line[/code]. </description> </method> <method name="set_opentype_feature"> @@ -527,12 +814,34 @@ Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. </description> </method> + <method name="set_overtype_mode_enabled"> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> + <description> + If [code]true[/code], sets the user into overtype mode. When the user types in this mode, it will override existing text. + </description> + </method> + <method name="set_search_flags"> + <return type="void" /> + <argument index="0" name="flags" type="int" /> + <description> + Sets the search flags. This is used with [method set_search_text] to highlight occurrences of the searched text. Search flags can be specified from the [enum SearchFlags] enum. + </description> + </method> + <method name="set_search_text"> + <return type="void" /> + <argument index="0" name="search_text" type="String" /> + <description> + Sets the search text. See [method set_search_flags]. + </description> + </method> <method name="set_selection_mode"> <return type="void" /> <argument index="0" name="mode" type="int" enum="TextEdit.SelectionMode" /> <argument index="1" name="line" type="int" default="-1" /> <argument index="2" name="column" type="int" default="-1" /> <description> + Sets the current selection mode. </description> </method> <method name="set_tab_size"> @@ -542,6 +851,29 @@ Sets the tab size for the [TextEdit] to use. </description> </method> + <method name="set_tooltip_request_func"> + <return type="void" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="callback" type="StringName" /> + <argument index="2" name="data" type="Variant" /> + <description> + Provide custom tooltip text. The callback method must take the following args: [code]hovered_word: String, data: Variant[/code] + </description> + </method> + <method name="swap_lines"> + <return type="void" /> + <argument index="0" name="from_line" type="int" /> + <argument index="1" name="to_line" type="int" /> + <description> + Swaps the two lines. + </description> + </method> + <method name="tag_saved_version"> + <return type="void" /> + <description> + Tag the current version as saved. + </description> + </method> <method name="undo"> <return type="void" /> <description> @@ -550,24 +882,23 @@ </method> </methods> <members> - <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false"> - If [code]true[/code], the caret (visual cursor) blinks. + <member name="caret_blink" type="bool" setter="set_caret_blink_enabled" getter="is_caret_blink_enabled" default="false"> + Sets if the caret should blink. </member> - <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed" default="0.65"> + <member name="caret_blink_speed" type="float" setter="set_caret_blink_speed" getter="get_caret_blink_speed" default="0.65"> Duration (in seconds) of a caret's blinking cycle. </member> - <member name="caret_block_mode" type="bool" setter="cursor_set_block_mode" getter="cursor_is_block_mode" default="false"> - If [code]true[/code], the caret displays as a rectangle. - If [code]false[/code], the caret displays as a bar. - </member> - <member name="caret_mid_grapheme" type="bool" setter="set_mid_grapheme_caret_enabled" getter="get_mid_grapheme_caret_enabled" default="false"> + <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false"> Allow moving caret, selecting and removing the individual composite character components. Note: [kbd]Backspace[/kbd] is always removing individual composite character components. </member> - <member name="caret_moving_by_right_click" type="bool" setter="set_right_click_moves_caret" getter="is_right_click_moving_caret" default="true"> - If [code]true[/code], a right-click moves the cursor at the mouse position before displaying the context menu. + <member name="caret_move_on_right_click" type="bool" setter="set_move_caret_on_right_click_enabled" getter="is_move_caret_on_right_click_enabled" default="true"> + If [code]true[/code], a right-click moves the caret at the mouse position before displaying the context menu. If [code]false[/code], the context menu disregards mouse location. </member> + <member name="caret_type" type="int" setter="set_caret_type" getter="get_caret_type" enum="TextEdit.CaretType" default="0"> + Set the type of caret to draw. + </member> <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true"> If [code]true[/code], a right-click displays the context menu. </member> @@ -580,6 +911,9 @@ <member name="draw_tabs" type="bool" setter="set_draw_tabs" getter="is_drawing_tabs" default="false"> If [code]true[/code], the "tab" character will have a visible representation. </member> + <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true"> + If [code]false[/code], existing text cannot be modified and new text cannot be added. + </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" /> <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" default="false"> If [code]true[/code], all occurrences of the selected text will be highlighted. @@ -600,12 +934,18 @@ <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text. </member> - <member name="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. - </member> <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0"> If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels. </member> + <member name="scroll_past_end_of_file" type="bool" setter="set_scroll_past_end_of_file_enabled" getter="is_scroll_past_end_of_file_enabled" default="false"> + Allow scrolling past the last line into "virtual" space. + </member> + <member name="scroll_smooth" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false"> + Scroll smoothly over the text rather then jumping to the next location. + </member> + <member name="scroll_v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" default="80.0"> + Sets the scroll speed with the minimap or when [member scroll_smooth] is enabled. + </member> <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0"> If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line. </member> @@ -616,9 +956,6 @@ <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true"> If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled. </member> - <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false"> - If [code]true[/code], sets the [code]step[/code] of the scrollbars to [code]0.25[/code] which results in smoother scrolling. - </member> <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0"> Set BiDi algorithm override for the structured text. </member> @@ -634,40 +971,42 @@ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0"> Base text writing direction. </member> - <member name="v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" default="80.0"> - Vertical scroll sensitivity. - </member> <member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true"> If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it. </member> - <member name="wrap_enabled" type="bool" setter="set_wrap_enabled" getter="is_wrap_enabled" default="false"> - If [code]true[/code], enables text wrapping when it goes beyond the edge of what is visible. + <member name="wrap_mode" type="int" setter="set_line_wrapping_mode" getter="get_line_wrapping_mode" enum="TextEdit.LineWrappingMode" default="0"> + Sets the line wrapping mode to use. </member> </members> <signals> - <signal name="cursor_changed"> + <signal name="caret_changed"> <description> - Emitted when the cursor changes. + Emitted when the caret changes position. </description> </signal> <signal name="gutter_added"> <description> + Emitted when a gutter is added. </description> </signal> <signal name="gutter_clicked"> <argument index="0" name="line" type="int" /> <argument index="1" name="gutter" type="int" /> <description> + Emitted when a gutter is clicked. </description> </signal> <signal name="gutter_removed"> <description> + Emitted when a gutter is removed. </description> </signal> <signal name="lines_edited_from"> <argument index="0" name="from_line" type="int" /> <argument index="1" name="to_line" type="int" /> <description> + Emitted immediately when the text changes. + When text is added [code]from_line[/code] will be less then [code]to_line[/code]. On a remove [code]to_line[/code] will be less then [code]from_line[/code]. </description> </signal> <signal name="text_changed"> @@ -675,33 +1014,13 @@ Emitted when the text changes. </description> </signal> + <signal name="text_set"> + <description> + Emitted when [method clear] is called or [member text] is set. + </description> + </signal> </signals> <constants> - <constant name="SEARCH_MATCH_CASE" value="1" enum="SearchFlags"> - Match case when searching. - </constant> - <constant name="SEARCH_WHOLE_WORDS" value="2" enum="SearchFlags"> - Match whole words when searching. - </constant> - <constant name="SEARCH_BACKWARDS" value="4" enum="SearchFlags"> - Search from end to beginning. - </constant> - <constant name="SELECTION_MODE_NONE" value="0" enum="SelectionMode"> - </constant> - <constant name="SELECTION_MODE_SHIFT" value="1" enum="SelectionMode"> - </constant> - <constant name="SELECTION_MODE_POINTER" value="2" enum="SelectionMode"> - </constant> - <constant name="SELECTION_MODE_WORD" value="3" enum="SelectionMode"> - </constant> - <constant name="SELECTION_MODE_LINE" value="4" enum="SelectionMode"> - </constant> - <constant name="GUTTER_TYPE_STRING" value="0" enum="GutterType"> - </constant> - <constant name="GUTTER_TYPE_ICON" value="1" enum="GutterType"> - </constant> - <constant name="GUTTER_TYPE_CUSTOM" value="2" enum="GutterType"> - </constant> <constant name="MENU_CUT" value="0" enum="MenuItems"> Cuts (copies and clears) the selected text. </constant> @@ -789,59 +1108,108 @@ <constant name="MENU_MAX" value="28" enum="MenuItems"> Represents the size of the [enum MenuItems] enum. </constant> + <constant name="SEARCH_MATCH_CASE" value="1" enum="SearchFlags"> + Match case when searching. + </constant> + <constant name="SEARCH_WHOLE_WORDS" value="2" enum="SearchFlags"> + Match whole words when searching. + </constant> + <constant name="SEARCH_BACKWARDS" value="4" enum="SearchFlags"> + Search from end to beginning. + </constant> + <constant name="CARET_TYPE_LINE" value="0" enum="CaretType"> + Vertical line caret. + </constant> + <constant name="CARET_TYPE_BLOCK" value="1" enum="CaretType"> + Block caret. + </constant> + <constant name="SELECTION_MODE_NONE" value="0" enum="SelectionMode"> + Not selecting. + </constant> + <constant name="SELECTION_MODE_SHIFT" value="1" enum="SelectionMode"> + Select as if [code]shift[/code] is pressed. + </constant> + <constant name="SELECTION_MODE_POINTER" value="2" enum="SelectionMode"> + Select single characters as if the user single clicked. + </constant> + <constant name="SELECTION_MODE_WORD" value="3" enum="SelectionMode"> + Select whole words as if the user double clicked. + </constant> + <constant name="SELECTION_MODE_LINE" value="4" enum="SelectionMode"> + Select whole lines as if the user tripped clicked. + </constant> + <constant name="LINE_WRAPPING_NONE" value="0" enum="LineWrappingMode"> + Line wrapping is disabled. + </constant> + <constant name="LINE_WRAPPING_BOUNDARY" value="1" enum="LineWrappingMode"> + Line wrapping occurs at the control boundary, beyond what would normally be visible. + </constant> + <constant name="GUTTER_TYPE_STRING" value="0" enum="GutterType"> + Draw a string. + </constant> + <constant name="GUTTER_TYPE_ICON" value="1" enum="GutterType"> + Draw an icon. + </constant> + <constant name="GUTTER_TYPE_CUSTOM" value="2" enum="GutterType"> + Custom draw. + </constant> </constants> <theme_items> - <theme_item name="background_color" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="background_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> Sets the background [Color] of this [TextEdit]. </theme_item> - <theme_item name="caret_background_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> + [Color] of the text behind the caret when using a block caret. </theme_item> - <theme_item name="caret_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + [Color] of the caret. </theme_item> - <theme_item name="current_line_color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)"> - Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled. + <theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)"> + Background [Color] of the line containing the caret. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> + Sets the [StyleBox] when in focus. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> Sets the default [Font]. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Sets the font [Color]. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [TextEdit]. </theme_item> - <theme_item name="font_readonly_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> + <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> + Sets the font [Color] when [member editable] is disabled. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Sets default font size. </theme_item> - <theme_item name="line_spacing" type="int" default="4"> + <theme_item name="line_spacing" data_type="constant" type="int" default="4"> Sets the spacing between the lines. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Sets the [StyleBox] of this [TextEdit]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" 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 name="read_only" data_type="style" type="StyleBox"> + Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled. </theme_item> - <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> + <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> Sets the highlight [Color] of text selections. </theme_item> - <theme_item name="space" type="Texture2D"> + <theme_item name="space" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] for space text characters. </theme_item> - <theme_item name="tab" type="Texture2D"> + <theme_item name="tab" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] for tab text characters. </theme_item> - <theme_item name="word_highlighted_color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)"> + <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)"> Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled. </theme_item> </theme_items> diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml index cc66f56d65..598d0fb859 100644 --- a/doc/classes/TextLine.xml +++ b/doc/classes/TextLine.xml @@ -13,7 +13,7 @@ <return type="bool" /> <argument index="0" name="key" type="Variant" /> <argument index="1" name="size" type="Vector2" /> - <argument index="2" name="inline_align" type="int" enum="VAlign" default="1" /> + <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" /> <argument index="3" name="length" type="int" default="1" /> <description> Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters. @@ -122,7 +122,7 @@ <return type="bool" /> <argument index="0" name="key" type="Variant" /> <argument index="1" name="size" type="Vector2" /> - <argument index="2" name="inline_align" type="int" enum="VAlign" default="1" /> + <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" /> <description> Sets new size and alignment of embedded object. </description> @@ -162,10 +162,28 @@ <member name="preserve_invalid" type="bool" setter="set_preserve_invalid" getter="get_preserve_invalid" default="true"> If set to [code]true[/code] text will display invalid characters. </member> + <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextLine.OverrunBehavior" default="3"> + Sets the clipping behavior when the text exceeds the text line's set width. See [enum OverrunBehavior] for a description of all modes. + </member> <member name="width" type="float" setter="set_width" getter="get_width" default="-1.0"> Text line width. </member> </members> <constants> + <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior"> + No text trimming is performed. + </constant> + <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior"> + Trims the text per character. + </constant> + <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior"> + Trims the text per word. + </constant> + <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior"> + Trims the text per character and adds an ellipsis to indicate that parts are hidden. + </constant> + <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior"> + Trims the text per word and adds an ellipsis to indicate that parts are hidden. + </constant> </constants> </class> diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml index 9050f9246a..fb94e14c8d 100644 --- a/doc/classes/TextParagraph.xml +++ b/doc/classes/TextParagraph.xml @@ -13,7 +13,7 @@ <return type="bool" /> <argument index="0" name="key" type="Variant" /> <argument index="1" name="size" type="Vector2" /> - <argument index="2" name="inline_align" type="int" enum="VAlign" default="1" /> + <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" /> <argument index="3" name="length" type="int" default="1" /> <description> Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters. @@ -240,7 +240,7 @@ <return type="bool" /> <argument index="0" name="key" type="Variant" /> <argument index="1" name="size" type="Vector2" /> - <argument index="2" name="inline_align" type="int" enum="VAlign" default="1" /> + <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" /> <description> Sets new size and alignment of embedded object. </description> @@ -284,6 +284,9 @@ <member name="flags" type="int" setter="set_flags" getter="get_flags" default="51"> Line breaking and alignment rules. For more info see [TextServer]. </member> + <member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" default="-1"> + Limits the lines of text shown. + </member> <member name="orientation" type="int" setter="set_orientation" getter="get_orientation" enum="TextServer.Orientation" default="0"> Text orientation. </member> @@ -293,10 +296,28 @@ <member name="preserve_invalid" type="bool" setter="set_preserve_invalid" getter="get_preserve_invalid" default="true"> If set to [code]true[/code] text will display invalid characters. </member> + <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextParagraph.OverrunBehavior" default="0"> + Sets the clipping behavior when the text exceeds the paragraph's set width. See [enum OverrunBehavior] for a description of all modes. + </member> <member name="width" type="float" setter="set_width" getter="get_width" default="-1.0"> Paragraph width. </member> </members> <constants> + <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior"> + No text trimming is performed. + </constant> + <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior"> + Trims the text per character. + </constant> + <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior"> + Trims the text per word. + </constant> + <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior"> + Trims the text per character and adds an ellipsis to indicate that parts are hidden. + </constant> + <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior"> + Trims the text per word and adds an ellipsis to indicate that parts are hidden. + </constant> </constants> </class> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index dbf7ae93aa..ac56be4392 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -541,7 +541,7 @@ <argument index="0" name="shaped" type="RID" /> <argument index="1" name="key" type="Variant" /> <argument index="2" name="size" type="Vector2" /> - <argument index="3" name="inline_align" type="int" enum="VAlign" default="1" /> + <argument index="3" name="inline_align" type="int" enum="InlineAlign" default="5" /> <argument index="4" name="length" type="int" default="1" /> <description> Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters. @@ -817,7 +817,7 @@ <argument index="0" name="shaped" type="RID" /> <argument index="1" name="key" type="Variant" /> <argument index="2" name="size" type="Vector2" /> - <argument index="3" name="inline_align" type="int" enum="VAlign" default="1" /> + <argument index="3" name="inline_align" type="int" enum="InlineAlign" default="5" /> <description> Sets new size and alignment of embedded object. </description> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index b9d3951b0a..948585aecb 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -107,7 +107,7 @@ </method> <method name="looking_at" qualifiers="const"> <return type="Transform2D" /> - <argument index="0" name="target" type="Vector2" default="Transform2D(1, 0, 0, 1, 0, 0)" /> + <argument index="0" name="target" type="Vector2" default="Vector2(0, 0)" /> <description> Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the [code]target[/code] position. Operations take place in global space. diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index 53cdfd53c9..1c906f6a51 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -79,9 +79,8 @@ <argument index="0" name="target" type="Vector3" /> <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> <description> - Returns a copy of the transform rotated such that its -Z axis points towards the [code]target[/code] position. - The transform will first be rotated around the given [code]up[/code] vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the [code]target[/code] and [code]up[/code] vectors. - Operations take place in global space. + Returns a copy of the transform rotated such that the forward axis (-Z) points towards the [code]target[/code] position. + The up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The [code]target[/code] and [code]up[/code] vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space. </description> </method> <method name="operator !=" qualifiers="operator"> diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 655c16b0cd..029848be33 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -51,6 +51,19 @@ It will return a [code]nullptr[/code] if there is no [Translation] instance that matches the [code]locale[/code]. </description> </method> + <method name="pseudolocalize" qualifiers="const"> + <return type="StringName" /> + <argument index="0" name="message" type="StringName" /> + <description> + Returns the pseudolocalized string based on the [code]p_message[/code] passed in. + </description> + </method> + <method name="reload_pseudolocalization"> + <return type="void" /> + <description> + Reparses the pseudolocalization options and reloads the translation. + </description> + </method> <method name="remove_translation"> <return type="void" /> <argument index="0" name="translation" type="Translation" /> @@ -85,6 +98,11 @@ </description> </method> </methods> + <members> + <member name="pseudolocalization_enabled" type="bool" setter="set_pseudolocalization_enabled" getter="is_pseudolocalization_enabled" default="false"> + If [code]true[/code], enables the use of pseudolocalization. See [member ProjectSettings.internationalization/pseudolocalization/use_pseudolocalization] for details. + </member> + </members> <constants> </constants> </class> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index c7c2c04256..50a573d30f 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -474,142 +474,142 @@ </constant> </constants> <theme_items> - <theme_item name="arrow" type="Texture2D"> + <theme_item name="arrow" data_type="icon" type="Texture2D"> The arrow icon used when a foldable item is not collapsed. </theme_item> - <theme_item name="arrow_collapsed" type="Texture2D"> + <theme_item name="arrow_collapsed" data_type="icon" type="Texture2D"> The arrow icon used when a foldable item is collapsed (for left-to-right layouts). </theme_item> - <theme_item name="arrow_collapsed_mirrored" type="Texture2D"> + <theme_item name="arrow_collapsed_mirrored" data_type="icon" type="Texture2D"> The arrow icon used when a foldable item is collapsed (for right-to-left layouts). </theme_item> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> Default [StyleBox] for the [Tree], i.e. used when the control is not being focused. </theme_item> - <theme_item name="bg_focus" type="StyleBox"> + <theme_item name="bg_focus" data_type="style" type="StyleBox"> [StyleBox] used when the [Tree] is being focused. </theme_item> - <theme_item name="button_margin" type="int" default="4"> + <theme_item name="button_margin" data_type="constant" type="int" default="4"> The horizontal space between each button in a cell. </theme_item> - <theme_item name="button_pressed" type="StyleBox"> + <theme_item name="button_pressed" data_type="style" type="StyleBox"> [StyleBox] used when a button in the tree is pressed. </theme_item> - <theme_item name="checked" type="Texture2D"> + <theme_item name="checked" data_type="icon" type="Texture2D"> The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked. </theme_item> - <theme_item name="children_hl_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> + <theme_item name="children_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> The [Color] of the relationship lines between the selected [TreeItem] and its children. </theme_item> - <theme_item name="children_hl_line_width" type="int" default="1"> + <theme_item name="children_hl_line_width" data_type="constant" type="int" default="1"> The width of the relationship lines between the selected [TreeItem] and its children. </theme_item> - <theme_item name="cursor" type="StyleBox"> + <theme_item name="cursor" data_type="style" type="StyleBox"> [StyleBox] used for the cursor, when the [Tree] is being focused. </theme_item> - <theme_item name="cursor_unfocused" type="StyleBox"> + <theme_item name="cursor_unfocused" data_type="style" type="StyleBox"> [StyleBox] used for the cursor, when the [Tree] is not being focused. </theme_item> - <theme_item name="custom_button" type="StyleBox"> + <theme_item name="custom_button" data_type="style" type="StyleBox"> Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell. </theme_item> - <theme_item name="custom_button_font_highlight" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. </theme_item> - <theme_item name="custom_button_hover" type="StyleBox"> + <theme_item name="custom_button_hover" data_type="style" type="StyleBox"> [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. </theme_item> - <theme_item name="custom_button_pressed" type="StyleBox"> + <theme_item name="custom_button_pressed" data_type="style" type="StyleBox"> [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed. </theme_item> - <theme_item name="draw_guides" type="int" default="1"> + <theme_item name="draw_guides" data_type="constant" type="int" default="1"> Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item. </theme_item> - <theme_item name="draw_relationship_lines" type="int" default="0"> + <theme_item name="draw_relationship_lines" data_type="constant" type="int" default="0"> Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy. </theme_item> - <theme_item name="drop_position_color" type="Color" default="Color(1, 0.3, 0.2, 1)"> + <theme_item name="drop_position_color" data_type="color" type="Color" default="Color(1, 0.3, 0.2, 1)"> [Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the item's text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.69, 0.69, 0.69, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)"> Default text [Color] of the item. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="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)"> + <theme_item name="font_selected_color" data_type="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"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the item's text. </theme_item> - <theme_item name="guide_color" type="Color" default="Color(0, 0, 0, 0.1)"> + <theme_item name="guide_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.1)"> [Color] of the guideline. </theme_item> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled. </theme_item> - <theme_item name="item_margin" type="int" default="12"> + <theme_item name="item_margin" data_type="constant" 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"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="parent_hl_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> + <theme_item name="parent_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> The [Color] of the relationship lines between the selected [TreeItem] and its parents. </theme_item> - <theme_item name="parent_hl_line_margin" type="int" default="0"> + <theme_item name="parent_hl_line_margin" data_type="constant" type="int" default="0"> The space between the parent relationship lines for the selected [TreeItem] and the relationship lines to its siblings that are not selected. </theme_item> - <theme_item name="parent_hl_line_width" type="int" default="1"> + <theme_item name="parent_hl_line_width" data_type="constant" type="int" default="1"> The width of the relationship lines between the selected [TreeItem] and its parents. </theme_item> - <theme_item name="relationship_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> + <theme_item name="relationship_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> The default [Color] of the relationship lines. </theme_item> - <theme_item name="relationship_line_width" type="int" default="1"> + <theme_item name="relationship_line_width" data_type="constant" type="int" default="1"> The default width of the relationship lines. </theme_item> - <theme_item name="scroll_border" type="int" default="4"> + <theme_item name="scroll_border" data_type="constant" type="int" default="4"> The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging. </theme_item> - <theme_item name="scroll_speed" type="int" default="12"> + <theme_item name="scroll_speed" data_type="constant" type="int" default="12"> The speed of border scrolling. </theme_item> - <theme_item name="select_arrow" type="Texture2D"> + <theme_item name="select_arrow" data_type="icon" type="Texture2D"> The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. </theme_item> - <theme_item name="selected" type="StyleBox"> + <theme_item name="selected" data_type="style" type="StyleBox"> [StyleBox] for the selected items, used when the [Tree] is not being focused. </theme_item> - <theme_item name="selected_focus" type="StyleBox"> + <theme_item name="selected_focus" data_type="style" type="StyleBox"> [StyleBox] for the selected items, used when the [Tree] is being focused. </theme_item> - <theme_item name="title_button_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="title_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the title button. </theme_item> - <theme_item name="title_button_font" type="Font"> + <theme_item name="title_button_font" data_type="font" type="Font"> [Font] of the title button's text. </theme_item> - <theme_item name="title_button_hover" type="StyleBox"> + <theme_item name="title_button_hover" data_type="style" type="StyleBox"> [StyleBox] used when the title button is being hovered. </theme_item> - <theme_item name="title_button_normal" type="StyleBox"> + <theme_item name="title_button_normal" data_type="style" type="StyleBox"> Default [StyleBox] for the title button. </theme_item> - <theme_item name="title_button_pressed" type="StyleBox"> + <theme_item name="title_button_pressed" data_type="style" type="StyleBox"> [StyleBox] used when the title button is being pressed. </theme_item> - <theme_item name="unchecked" type="Texture2D"> + <theme_item name="unchecked" data_type="icon" type="Texture2D"> The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked. </theme_item> - <theme_item name="updown" type="Texture2D"> + <theme_item name="updown" data_type="icon" type="Texture2D"> The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. </theme_item> - <theme_item name="vseparation" type="int" default="4"> + <theme_item name="vseparation" data_type="constant" type="int" default="4"> The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border. </theme_item> </theme_items> diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml index 213f8fd742..aa6c5fc8a4 100644 --- a/doc/classes/VBoxContainer.xml +++ b/doc/classes/VBoxContainer.xml @@ -14,7 +14,7 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int" default="4"> + <theme_item name="separation" data_type="constant" type="int" default="4"> The vertical space between the [VBoxContainer]'s elements. </theme_item> </theme_items> diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml index 727e32961c..98a0aea0c7 100644 --- a/doc/classes/VScrollBar.xml +++ b/doc/classes/VScrollBar.xml @@ -17,31 +17,31 @@ <constants> </constants> <theme_items> - <theme_item name="decrement" type="Texture2D"> + <theme_item name="decrement" data_type="icon" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] up. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="decrement_highlight" type="Texture2D"> + <theme_item name="decrement_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the decrement button. </theme_item> - <theme_item name="grabber" type="StyleBox"> + <theme_item name="grabber" data_type="style" type="StyleBox"> Used as texture for the grabber, the draggable element representing current scroll. </theme_item> - <theme_item name="grabber_highlight" type="StyleBox"> + <theme_item name="grabber_highlight" data_type="style" type="StyleBox"> Used when the mouse hovers over the grabber. </theme_item> - <theme_item name="grabber_pressed" type="StyleBox"> + <theme_item name="grabber_pressed" data_type="style" type="StyleBox"> Used when the grabber is being dragged. </theme_item> - <theme_item name="increment" type="Texture2D"> + <theme_item name="increment" data_type="icon" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] down. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="increment_highlight" type="Texture2D"> + <theme_item name="increment_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the increment button. </theme_item> - <theme_item name="scroll" type="StyleBox"> + <theme_item name="scroll" data_type="style" type="StyleBox"> Used as background of this [ScrollBar]. </theme_item> - <theme_item name="scroll_focus" type="StyleBox"> + <theme_item name="scroll_focus" data_type="style" type="StyleBox"> Used as background when the [ScrollBar] has the GUI focus. </theme_item> </theme_items> diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml index 52f31b1da7..d59c7229ac 100644 --- a/doc/classes/VSeparator.xml +++ b/doc/classes/VSeparator.xml @@ -13,10 +13,10 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int" default="4"> + <theme_item name="separation" data_type="constant" type="int" default="4"> The width of the area covered by the separator. Effectively works like a minimum width. </theme_item> - <theme_item name="separator" type="StyleBox"> + <theme_item name="separator" data_type="style" type="StyleBox"> The style for the separator line. Works best with [StyleBoxLine] (remember to enable [member StyleBoxLine.vertical]). </theme_item> </theme_items> diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index 5830c9eaf3..becf3d1052 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -18,24 +18,24 @@ <constants> </constants> <theme_items> - <theme_item name="grabber" type="Texture2D"> + <theme_item name="grabber" data_type="icon" type="Texture2D"> The texture for the grabber (the draggable element). </theme_item> - <theme_item name="grabber_area" type="StyleBox"> + <theme_item name="grabber_area" data_type="style" type="StyleBox"> The background of the area below the grabber. </theme_item> - <theme_item name="grabber_area_highlight" type="StyleBox"> + <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="grabber_disabled" type="Texture2D"> + <theme_item name="grabber_disabled" data_type="icon" type="Texture2D"> The texture for the grabber when it's disabled. </theme_item> - <theme_item name="grabber_highlight" type="Texture2D"> + <theme_item name="grabber_highlight" data_type="icon" type="Texture2D"> The texture for the grabber when it's focused. </theme_item> - <theme_item name="slider" type="StyleBox"> + <theme_item name="slider" data_type="style" type="StyleBox"> The background for the whole slider. Determines the width of the [code]grabber_area[/code]. </theme_item> - <theme_item name="tick" type="Texture2D"> + <theme_item name="tick" data_type="icon" type="Texture2D"> The texture for the ticks, visible when [member Slider.tick_count] is greater than 0. </theme_item> </theme_items> diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml index 18b515e7ce..143f5b6b0a 100644 --- a/doc/classes/VSplitContainer.xml +++ b/doc/classes/VSplitContainer.xml @@ -13,15 +13,15 @@ <constants> </constants> <theme_items> - <theme_item name="autohide" type="int" default="1"> + <theme_item name="autohide" data_type="constant" type="int" default="1"> Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible. </theme_item> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="grabber" type="Texture2D"> + <theme_item name="grabber" data_type="icon" type="Texture2D"> The icon used for the grabber drawn in the middle area. </theme_item> - <theme_item name="separation" type="int" default="12"> + <theme_item name="separation" data_type="constant" type="int" default="12"> The space between sides of the container. </theme_item> </theme_items> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index c2edab7e82..4a62d3ec7b 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -169,7 +169,7 @@ <member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d" default="false"> If [code]true[/code], the viewport will process 2D audio streams. </member> - <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener" getter="is_audio_listener" default="false"> + <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener_3d" getter="is_audio_listener_3d" default="false"> If [code]true[/code], the viewport will process 3D audio streams. </member> <member name="canvas_item_default_texture_filter" type="int" setter="set_default_canvas_item_texture_filter" getter="get_default_canvas_item_texture_filter" enum="Viewport.DefaultCanvasItemTextureFilter" default="1"> @@ -296,19 +296,19 @@ Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum. </constant> <constant name="MSAA_DISABLED" value="0" enum="MSAA"> - Multisample antialiasing mode disabled. This is the default value, and also the fastest setting. + Multisample antialiasing mode disabled. This is the default value, and is also the fastest setting. </constant> <constant name="MSAA_2X" value="1" enum="MSAA"> - Use 2x Multisample Antialiasing. + Use 2× Multisample Antialiasing. This has a moderate performance cost. It helps reduce aliasing noticeably, but 4× MSAA still looks substantially better. </constant> <constant name="MSAA_4X" value="2" enum="MSAA"> - Use 4x Multisample Antialiasing. + Use 4× Multisample Antialiasing. This has a significant performance cost, and is generally a good compromise between performance and quality. </constant> <constant name="MSAA_8X" value="3" enum="MSAA"> - Use 8x Multisample Antialiasing. Likely unsupported on low-end and older hardware. + Use 8× Multisample Antialiasing. This has a very high performance cost. The difference between 4× and 8× MSAA may not always be visible in real gameplay conditions. Likely unsupported on low-end and older hardware. </constant> <constant name="MSAA_16X" value="4" enum="MSAA"> - Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware. + Use 16× Multisample Antialiasing. This has a very high performance cost. The difference between 8× and 16× MSAA may not always be visible in real gameplay conditions. Likely unsupported on medium and low-end hardware. </constant> <constant name="MSAA_MAX" value="5" enum="MSAA"> Represents the size of the [enum MSAA] enum. diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 2d9c266f3c..f949fbe7c0 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -27,11 +27,11 @@ Returns the RID of this instance. This RID is the same as the RID returned by [method RenderingServer.instance_create]. This RID is needed if you want to call [RenderingServer] functions directly on this [VisualInstance3D]. </description> </method> - <method name="get_layer_mask_bit" qualifiers="const"> + <method name="get_layer_mask_value" qualifiers="const"> <return type="bool" /> - <argument index="0" name="layer" type="int" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns [code]true[/code] when the specified layer is enabled in [member layers] and [code]false[/code] otherwise. + Returns whether or not the specified layer of the [member layers] is enabled, given a [code]layer_number[/code] between 1 and 20. </description> </method> <method name="get_transformed_aabb" qualifiers="const"> @@ -48,12 +48,12 @@ Sets the resource that is instantiated by this [VisualInstance3D], which changes how the engine handles the [VisualInstance3D] under the hood. Equivalent to [method RenderingServer.instance_set_base]. </description> </method> - <method name="set_layer_mask_bit"> + <method name="set_layer_mask_value"> <return type="void" /> - <argument index="0" name="layer" type="int" /> - <argument index="1" name="enabled" type="bool" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - Enables a particular layer in [member layers]. + Based on [code]value[/code], enables or disables the specified layer in the [member layers], given a [code]layer_number[/code] between 1 and 20. </description> </method> </methods> diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml index b9abf85802..8d410104b8 100644 --- a/doc/classes/VisualShaderNodeColorFunc.xml +++ b/doc/classes/VisualShaderNodeColorFunc.xml @@ -36,5 +36,8 @@ return vec3(r, g, b); [/codeblock] </constant> + <constant name="FUNC_MAX" value="2" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeColorOp.xml b/doc/classes/VisualShaderNodeColorOp.xml index 629e84d47b..55b006b098 100644 --- a/doc/classes/VisualShaderNodeColorOp.xml +++ b/doc/classes/VisualShaderNodeColorOp.xml @@ -94,5 +94,8 @@ } [/codeblock] </constant> + <constant name="OP_MAX" value="9" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml index 9c2331edea..96bb3df494 100644 --- a/doc/classes/VisualShaderNodeCompare.xml +++ b/doc/classes/VisualShaderNodeCompare.xml @@ -37,6 +37,9 @@ <constant name="CTYPE_TRANSFORM" value="4" enum="ComparisonType"> A transform ([code]mat4[/code]) type. </constant> + <constant name="CTYPE_MAX" value="5" enum="ComparisonType"> + Represents the size of the [enum ComparisonType] enum. + </constant> <constant name="FUNC_EQUAL" value="0" enum="Function"> Comparison for equality ([code]a == b[/code]). </constant> @@ -55,11 +58,17 @@ <constant name="FUNC_LESS_THAN_EQUAL" value="5" enum="Function"> Comparison for less than or equal ([code]a <= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. </constant> + <constant name="FUNC_MAX" value="6" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> <constant name="COND_ALL" value="0" enum="Condition"> The result will be true if all of component in vector satisfy the comparison condition. </constant> <constant name="COND_ANY" value="1" enum="Condition"> The result will be true if any of component in vector satisfy the comparison condition. </constant> + <constant name="COND_MAX" value="2" enum="Condition"> + Represents the size of the [enum Condition] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeCubemap.xml b/doc/classes/VisualShaderNodeCubemap.xml index 13b367e8f2..4a5f58261d 100644 --- a/doc/classes/VisualShaderNodeCubemap.xml +++ b/doc/classes/VisualShaderNodeCubemap.xml @@ -28,6 +28,9 @@ <constant name="SOURCE_PORT" value="1" enum="Source"> Use the [Cubemap] sampler reference passed via the [code]samplerCube[/code] port. If this is set to [member source], the [member cube_map] texture is ignored. </constant> + <constant name="SOURCE_MAX" value="2" enum="Source"> + Represents the size of the [enum Source] enum. + </constant> <constant name="TYPE_DATA" value="0" enum="TextureType"> No hints are added to the uniform declaration. </constant> @@ -37,5 +40,8 @@ <constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType"> Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. </constant> + <constant name="TYPE_MAX" value="3" enum="TextureType"> + Represents the size of the [enum TextureType] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml index bb7486e8cf..ff499d25a6 100644 --- a/doc/classes/VisualShaderNodeFloatFunc.xml +++ b/doc/classes/VisualShaderNodeFloatFunc.xml @@ -112,5 +112,8 @@ <constant name="FUNC_ONEMINUS" value="31" enum="Function"> Subtracts scalar [code]x[/code] from 1 (i.e. [code]1 - x[/code]). </constant> + <constant name="FUNC_MAX" value="32" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeFloatOp.xml b/doc/classes/VisualShaderNodeFloatOp.xml index 2c9ebabb89..ba000f258b 100644 --- a/doc/classes/VisualShaderNodeFloatOp.xml +++ b/doc/classes/VisualShaderNodeFloatOp.xml @@ -46,5 +46,8 @@ <constant name="OP_STEP" value="9" enum="Operator"> Generates a step function by comparing [code]b[/code](x) to [code]a[/code](edge). Returns 0.0 if [code]x[/code] is smaller than [code]edge[/code] and otherwise 1.0. Translates to [code]step(a, b)[/code] in the Godot Shader Language. </constant> + <constant name="OP_ENUM_SIZE" value="10" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeFloatUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml index 705d5e8796..fcfd78dbea 100644 --- a/doc/classes/VisualShaderNodeFloatUniform.xml +++ b/doc/classes/VisualShaderNodeFloatUniform.xml @@ -40,5 +40,8 @@ <constant name="HINT_RANGE_STEP" value="2" enum="Hint"> A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code. </constant> + <constant name="HINT_MAX" value="3" enum="Hint"> + Represents the size of the [enum Hint] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml index a9f4144a01..358a3f3512 100644 --- a/doc/classes/VisualShaderNodeIntFunc.xml +++ b/doc/classes/VisualShaderNodeIntFunc.xml @@ -25,5 +25,8 @@ <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> + <constant name="FUNC_MAX" value="3" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml index fc9a0a9a0a..2d55cdaf78 100644 --- a/doc/classes/VisualShaderNodeIntOp.xml +++ b/doc/classes/VisualShaderNodeIntOp.xml @@ -37,5 +37,8 @@ <constant name="OP_MIN" value="6" enum="Operator"> Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. </constant> + <constant name="OP_ENUM_SIZE" value="7" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml index e39eba865b..4070553884 100644 --- a/doc/classes/VisualShaderNodeIntUniform.xml +++ b/doc/classes/VisualShaderNodeIntUniform.xml @@ -40,5 +40,8 @@ <constant name="HINT_RANGE_STEP" value="2" enum="Hint"> A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code. </constant> + <constant name="HINT_MAX" value="3" enum="Hint"> + Represents the size of the [enum Hint] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeIs.xml b/doc/classes/VisualShaderNodeIs.xml index b767a9638e..f46267677e 100644 --- a/doc/classes/VisualShaderNodeIs.xml +++ b/doc/classes/VisualShaderNodeIs.xml @@ -22,5 +22,8 @@ <constant name="FUNC_IS_NAN" value="1" enum="Function"> Comparison with [code]NaN[/code] (Not a Number; denotes invalid numeric results, e.g. division by zero). </constant> + <constant name="FUNC_MAX" value="2" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleAccelerator.xml b/doc/classes/VisualShaderNodeParticleAccelerator.xml index 82aae1df63..b7a519944d 100644 --- a/doc/classes/VisualShaderNodeParticleAccelerator.xml +++ b/doc/classes/VisualShaderNodeParticleAccelerator.xml @@ -20,6 +20,7 @@ <constant name="MODE_TANGENTIAL" value="2" enum="Mode"> </constant> <constant name="MODE_MAX" value="3" enum="Mode"> + Represents the size of the [enum Mode] enum. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleRandomness.xml b/doc/classes/VisualShaderNodeParticleRandomness.xml index f19723a663..75736992ee 100644 --- a/doc/classes/VisualShaderNodeParticleRandomness.xml +++ b/doc/classes/VisualShaderNodeParticleRandomness.xml @@ -18,6 +18,7 @@ <constant name="OP_TYPE_VECTOR" value="1" enum="OpType"> </constant> <constant name="OP_TYPE_MAX" value="2" enum="OpType"> + Represents the size of the [enum OpType] enum. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeSample3D.xml b/doc/classes/VisualShaderNodeSample3D.xml index cf6933ab55..82bcac5f69 100644 --- a/doc/classes/VisualShaderNodeSample3D.xml +++ b/doc/classes/VisualShaderNodeSample3D.xml @@ -22,5 +22,8 @@ <constant name="SOURCE_PORT" value="1" enum="Source"> Use the uniform texture from sampler port. </constant> + <constant name="SOURCE_MAX" value="2" enum="Source"> + Represents the size of the [enum Source] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml index 33777c1e49..305586ac49 100644 --- a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml @@ -25,5 +25,8 @@ <constant name="FUNC_Y" value="2" enum="Function"> Derivative in [code]y[/code] using local differencing. </constant> + <constant name="FUNC_MAX" value="3" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml index 8fa71b490d..17c079f385 100644 --- a/doc/classes/VisualShaderNodeTexture.xml +++ b/doc/classes/VisualShaderNodeTexture.xml @@ -40,6 +40,9 @@ <constant name="SOURCE_PORT" value="5" enum="Source"> Use the texture provided in the input port for this function. </constant> + <constant name="SOURCE_MAX" value="6" enum="Source"> + Represents the size of the [enum Source] enum. + </constant> <constant name="TYPE_DATA" value="0" enum="TextureType"> No hints are added to the uniform declaration. </constant> @@ -49,5 +52,8 @@ <constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType"> Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. </constant> + <constant name="TYPE_MAX" value="3" enum="TextureType"> + Represents the size of the [enum TextureType] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml index 5a7474cca1..492c6010df 100644 --- a/doc/classes/VisualShaderNodeTextureUniform.xml +++ b/doc/classes/VisualShaderNodeTextureUniform.xml @@ -31,11 +31,17 @@ <constant name="TYPE_ANISO" value="3" enum="TextureType"> Adds [code]hint_aniso[/code] as hint to the uniform declaration to use for a flowmap. </constant> + <constant name="TYPE_MAX" value="4" enum="TextureType"> + Represents the size of the [enum TextureType] enum. + </constant> <constant name="COLOR_DEFAULT_WHITE" value="0" enum="ColorDefault"> Defaults to white color. </constant> <constant name="COLOR_DEFAULT_BLACK" value="1" enum="ColorDefault"> Defaults to black color. </constant> + <constant name="COLOR_DEFAULT_MAX" value="2" enum="ColorDefault"> + Represents the size of the [enum ColorDefault] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml index 41a58e1458..51b1100e22 100644 --- a/doc/classes/VisualShaderNodeTransformFunc.xml +++ b/doc/classes/VisualShaderNodeTransformFunc.xml @@ -22,5 +22,8 @@ <constant name="FUNC_TRANSPOSE" value="1" enum="Function"> Perform the transpose operation on the [Transform3D] matrix. </constant> + <constant name="FUNC_MAX" value="2" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformMult.xml b/doc/classes/VisualShaderNodeTransformMult.xml deleted file mode 100644 index f26f60a1f3..0000000000 --- a/doc/classes/VisualShaderNodeTransformMult.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTransformMult" inherits="VisualShaderNode" version="4.0"> - <brief_description> - Multiplies [Transform3D] by [Transform3D] within the visual shader graph. - </brief_description> - <description> - A multiplication operation on two transforms (4x4 matrices), with support for different multiplication operators. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformMult.Operator" default="0"> - The multiplication type to be performed on the transforms. See [enum Operator] for options. - </member> - </members> - <constants> - <constant name="OP_AxB" value="0" enum="Operator"> - Multiplies transform [code]a[/code] by the transform [code]b[/code]. - </constant> - <constant name="OP_BxA" value="1" enum="Operator"> - Multiplies transform [code]b[/code] by the transform [code]a[/code]. - </constant> - <constant name="OP_AxB_COMP" value="2" enum="Operator"> - Performs a component-wise multiplication of transform [code]a[/code] by the transform [code]b[/code]. - </constant> - <constant name="OP_BxA_COMP" value="3" enum="Operator"> - Performs a component-wise multiplication of transform [code]b[/code] by the transform [code]a[/code]. - </constant> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeTransformOp.xml b/doc/classes/VisualShaderNodeTransformOp.xml new file mode 100644 index 0000000000..02debd890f --- /dev/null +++ b/doc/classes/VisualShaderNodeTransformOp.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeTransformOp" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A [Transform3D] operator to be used within the visual shader graph. + </brief_description> + <description> + Applies [member operator] to two transform (4x4 matrices) inputs. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformOp.Operator" default="0"> + The type of the operation to be performed on the transforms. See [enum Operator] for options. + </member> + </members> + <constants> + <constant name="OP_AxB" value="0" enum="Operator"> + Multiplies transform [code]a[/code] by the transform [code]b[/code]. + </constant> + <constant name="OP_BxA" value="1" enum="Operator"> + Multiplies transform [code]b[/code] by the transform [code]a[/code]. + </constant> + <constant name="OP_AxB_COMP" value="2" enum="Operator"> + Performs a component-wise multiplication of transform [code]a[/code] by the transform [code]b[/code]. + </constant> + <constant name="OP_BxA_COMP" value="3" enum="Operator"> + Performs a component-wise multiplication of transform [code]b[/code] by the transform [code]a[/code]. + </constant> + <constant name="OP_ADD" value="4" enum="Operator"> + Adds two transforms. + </constant> + <constant name="OP_A_MINUS_B" value="5" enum="Operator"> + Subtracts the transform [code]a[/code] from the transform [code]b[/code]. + </constant> + <constant name="OP_B_MINUS_A" value="6" enum="Operator"> + Subtracts the transform [code]b[/code] from the transform [code]a[/code]. + </constant> + <constant name="OP_A_DIV_B" value="7" enum="Operator"> + Divides the transform [code]a[/code] by the transform [code]b[/code]. + </constant> + <constant name="OP_B_DIV_A" value="8" enum="Operator"> + Divides the transform [code]b[/code] by the transform [code]a[/code]. + </constant> + <constant name="OP_MAX" value="9" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml index 2c9c115d9c..d8f7ebbd55 100644 --- a/doc/classes/VisualShaderNodeTransformVecMult.xml +++ b/doc/classes/VisualShaderNodeTransformVecMult.xml @@ -28,5 +28,8 @@ <constant name="OP_3x3_BxA" value="3" enum="Operator"> Multiplies vector [code]b[/code] by the transform [code]a[/code], skipping the last row and column of the transform. </constant> + <constant name="OP_MAX" value="4" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml index 83261344bd..561d87af45 100644 --- a/doc/classes/VisualShaderNodeUniform.xml +++ b/doc/classes/VisualShaderNodeUniform.xml @@ -24,5 +24,8 @@ </constant> <constant name="QUAL_INSTANCE" value="2" enum="Qualifier"> </constant> + <constant name="QUAL_MAX" value="3" enum="Qualifier"> + Represents the size of the [enum Qualifier] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml index 859c47bc33..9fd8ba2806 100644 --- a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml @@ -25,5 +25,8 @@ <constant name="FUNC_Y" value="2" enum="Function"> Derivative in [code]y[/code] using local differencing. </constant> + <constant name="FUNC_MAX" value="3" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml index cbda3dfb46..79bf3f6a07 100644 --- a/doc/classes/VisualShaderNodeVectorFunc.xml +++ b/doc/classes/VisualShaderNodeVectorFunc.xml @@ -121,5 +121,8 @@ <constant name="FUNC_ONEMINUS" value="34" enum="Function"> Returns [code]1.0 - vector[/code]. </constant> + <constant name="FUNC_MAX" value="35" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorOp.xml b/doc/classes/VisualShaderNodeVectorOp.xml index d56c012f8f..263485d38e 100644 --- a/doc/classes/VisualShaderNodeVectorOp.xml +++ b/doc/classes/VisualShaderNodeVectorOp.xml @@ -52,5 +52,8 @@ <constant name="OP_STEP" value="11" enum="Operator"> Vector step operator. Returns [code]0.0[/code] if [code]a[/code] is smaller than [code]b[/code] and [code]1.0[/code] otherwise. </constant> + <constant name="OP_ENUM_SIZE" value="12" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> </constants> </class> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index bc76118a56..d7b156cc57 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -391,33 +391,33 @@ </constant> </constants> <theme_items> - <theme_item name="close" type="Texture2D"> + <theme_item name="close" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="close_h_ofs" type="int" default="18"> + <theme_item name="close_h_ofs" data_type="constant" type="int" default="18"> </theme_item> - <theme_item name="close_pressed" type="Texture2D"> + <theme_item name="close_pressed" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="close_v_ofs" type="int" default="18"> + <theme_item name="close_v_ofs" data_type="constant" type="int" default="18"> </theme_item> - <theme_item name="embedded_border" type="StyleBox"> + <theme_item name="embedded_border" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="resize_margin" type="int" default="4"> + <theme_item name="resize_margin" data_type="constant" type="int" default="4"> </theme_item> - <theme_item name="scaleborder_size" type="int" default="4"> + <theme_item name="scaleborder_size" data_type="constant" type="int" default="4"> </theme_item> - <theme_item name="title_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> </theme_item> - <theme_item name="title_font" type="Font"> + <theme_item name="title_font" data_type="font" type="Font"> </theme_item> - <theme_item name="title_font_size" type="int"> + <theme_item name="title_font_size" data_type="font_size" type="int"> The size of the title font. </theme_item> - <theme_item name="title_height" type="int" default="20"> + <theme_item name="title_height" data_type="constant" type="int" default="20"> </theme_item> - <theme_item name="title_outline_modulate" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="title_outline_modulate" data_type="color" 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"> + <theme_item name="title_outline_size" data_type="constant" type="int" default="0"> The size of the title outline. </theme_item> </theme_items> diff --git a/doc/classes/LineShape2D.xml b/doc/classes/WorldMarginShape2D.xml index 434e6fba8e..1839ab16ad 100644 --- a/doc/classes/LineShape2D.xml +++ b/doc/classes/WorldMarginShape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="LineShape2D" inherits="Shape2D" version="4.0"> +<class name="WorldMarginShape2D" inherits="Shape2D" version="4.0"> <brief_description> Line shape for 2D collisions. </brief_description> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 438b64ebbf..6f9a07af1f 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -90,9 +90,13 @@ class EnumDef: class ThemeItemDef: - def __init__(self, name, type_name, default_value): # type: (str, TypeName, Optional[str]) -> None + def __init__( + self, name, type_name, data_name, text, default_value + ): # type: (str, TypeName, str, Optional[str], Optional[str]) -> None self.name = name self.type_name = type_name + self.data_name = data_name + self.text = text self.default_value = default_value @@ -104,10 +108,10 @@ class ClassDef: self.properties = OrderedDict() # type: OrderedDict[str, PropertyDef] self.methods = OrderedDict() # type: OrderedDict[str, List[MethodDef]] self.signals = OrderedDict() # type: OrderedDict[str, SignalDef] + self.theme_items = OrderedDict() # type: OrderedDict[str, ThemeItemDef] self.inherits = None # type: Optional[str] self.brief_description = None # type: Optional[str] self.description = None # type: Optional[str] - self.theme_items = None # type: Optional[OrderedDict[str, List[ThemeItemDef]]] self.tutorials = [] # type: List[Tuple[str, str]] # Used to match the class with XML source for output filtering purposes. @@ -240,16 +244,33 @@ class State: theme_items = class_root.find("theme_items") if theme_items is not None: - class_def.theme_items = OrderedDict() for theme_item in theme_items: assert theme_item.tag == "theme_item" theme_item_name = theme_item.attrib["name"] + theme_item_data_name = theme_item.attrib["data_type"] + theme_item_id = "{}_{}".format(theme_item_data_name, theme_item_name) + if theme_item_id in class_def.theme_items: + print_error( + "Duplicate theme property '{}' of type '{}', file: {}".format( + theme_item_name, theme_item_data_name, class_name + ), + self, + ) + continue + default_value = theme_item.get("default") or None - theme_item_def = ThemeItemDef(theme_item_name, TypeName.from_element(theme_item), default_value) - if theme_item_name not in class_def.theme_items: - class_def.theme_items[theme_item_name] = [] - class_def.theme_items[theme_item_name].append(theme_item_def) + if default_value is not None: + default_value = "``{}``".format(default_value) + + theme_item_def = ThemeItemDef( + theme_item_name, + TypeName.from_element(theme_item), + theme_item_data_name, + theme_item.text, + default_value, + ) + class_def.theme_items[theme_item_id] = theme_item_def tutorials = class_root.find("tutorials") if tutorials is not None: @@ -458,12 +479,14 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S format_table(f, ml) # Theme properties - if class_def.theme_items is not None and len(class_def.theme_items) > 0: + if len(class_def.theme_items) > 0: f.write(make_heading("Theme Properties", "-")) pl = [] - for theme_item_list in class_def.theme_items.values(): - for theme_item in theme_item_list: - pl.append((theme_item.type_name.to_rst(state), theme_item.name, theme_item.default_value)) + for theme_item_def in class_def.theme_items.values(): + ref = ":ref:`{0}<class_{2}_theme_{1}_{0}>`".format( + theme_item_def.name, theme_item_def.data_name, class_name + ) + pl.append((theme_item_def.type_name.to_rst(state), ref, theme_item_def.default_value)) format_table(f, pl, True) # Signals @@ -578,6 +601,30 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S index += 1 + # Theme property descriptions + if len(class_def.theme_items) > 0: + f.write(make_heading("Theme Property Descriptions", "-")) + index = 0 + + for theme_item_def in class_def.theme_items.values(): + if index != 0: + f.write("----\n\n") + + f.write(".. _class_{}_theme_{}_{}:\n\n".format(class_name, theme_item_def.data_name, theme_item_def.name)) + f.write("- {} **{}**\n\n".format(theme_item_def.type_name.to_rst(state), theme_item_def.name)) + + info = [] + if theme_item_def.default_value is not None: + info.append(("*Default*", theme_item_def.default_value)) + + if len(info) > 0: + format_table(f, info) + + if theme_item_def.text is not None and theme_item_def.text.strip() != "": + f.write(rstize_text(theme_item_def.text.strip(), state) + "\n\n") + + index += 1 + f.write(make_footer()) |