diff options
Diffstat (limited to 'doc/classes')
69 files changed, 873 insertions, 463 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 6b0dccd7fc..41836650cd 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -2319,31 +2319,31 @@ <constant name="KEY_YDIAERESIS" value="255" enum="Key"> ΓΏ key. </constant> - <constant name="KEY_CODE_MASK" value="8388607" enum="KeyModifierMask"> + <constant name="KEY_CODE_MASK" value="8388607" enum="KeyModifierMask" is_bitfield="true"> Key Code mask. </constant> - <constant name="KEY_MODIFIER_MASK" value="532676608" enum="KeyModifierMask"> + <constant name="KEY_MODIFIER_MASK" value="532676608" enum="KeyModifierMask" is_bitfield="true"> Modifier key mask. </constant> - <constant name="KEY_MASK_CMD_OR_CTRL" value="16777216" enum="KeyModifierMask"> + <constant name="KEY_MASK_CMD_OR_CTRL" value="16777216" enum="KeyModifierMask" is_bitfield="true"> Automatically remapped to [constant KEY_META] on macOS and [constant KEY_CTRL] on other platforms, this mask is never set in the actual events, and should be used for key mapping only. </constant> - <constant name="KEY_MASK_SHIFT" value="33554432" enum="KeyModifierMask"> + <constant name="KEY_MASK_SHIFT" value="33554432" enum="KeyModifierMask" is_bitfield="true"> Shift key mask. </constant> - <constant name="KEY_MASK_ALT" value="67108864" enum="KeyModifierMask"> + <constant name="KEY_MASK_ALT" value="67108864" enum="KeyModifierMask" is_bitfield="true"> Alt or Option (on macOS) key mask. </constant> - <constant name="KEY_MASK_META" value="134217728" enum="KeyModifierMask"> + <constant name="KEY_MASK_META" value="134217728" enum="KeyModifierMask" is_bitfield="true"> Command (on macOS) or Meta/Windows key mask. </constant> - <constant name="KEY_MASK_CTRL" value="268435456" enum="KeyModifierMask"> + <constant name="KEY_MASK_CTRL" value="268435456" enum="KeyModifierMask" is_bitfield="true"> Ctrl key mask. </constant> - <constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask"> + <constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask" is_bitfield="true"> Keypad key mask. </constant> - <constant name="KEY_MASK_GROUP_SWITCH" value="1073741824" enum="KeyModifierMask"> + <constant name="KEY_MASK_GROUP_SWITCH" value="1073741824" enum="KeyModifierMask" is_bitfield="true"> Group Switch key mask. </constant> <constant name="MOUSE_BUTTON_NONE" value="0" enum="MouseButton"> @@ -2376,19 +2376,19 @@ <constant name="MOUSE_BUTTON_XBUTTON2" value="9" enum="MouseButton"> Extra mouse button 2. This is sometimes present, usually to the sides of the mouse. </constant> - <constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButton"> + <constant name="MOUSE_BUTTON_MASK_LEFT" value="1" enum="MouseButtonMask" is_bitfield="true"> Primary mouse button mask, usually for the left button. </constant> - <constant name="MOUSE_BUTTON_MASK_RIGHT" value="2" enum="MouseButton"> + <constant name="MOUSE_BUTTON_MASK_RIGHT" value="2" enum="MouseButtonMask" is_bitfield="true"> Secondary mouse button mask, usually for the right button. </constant> - <constant name="MOUSE_BUTTON_MASK_MIDDLE" value="4" enum="MouseButton"> + <constant name="MOUSE_BUTTON_MASK_MIDDLE" value="4" enum="MouseButtonMask" is_bitfield="true"> Middle mouse button mask. </constant> - <constant name="MOUSE_BUTTON_MASK_XBUTTON1" value="128" enum="MouseButton"> + <constant name="MOUSE_BUTTON_MASK_MB_XBUTTON1" value="128" enum="MouseButtonMask" is_bitfield="true"> Extra mouse button 1 mask. </constant> - <constant name="MOUSE_BUTTON_MASK_XBUTTON2" value="256" enum="MouseButton"> + <constant name="MOUSE_BUTTON_MASK_MB_XBUTTON2" value="256" enum="MouseButtonMask" is_bitfield="true"> Extra mouse button 2 mask. </constant> <constant name="JOY_BUTTON_INVALID" value="-1" enum="JoyButton"> @@ -2794,157 +2794,135 @@ </constant> <constant name="PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" value="24" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_VARIANT_TYPE" value="25" enum="PropertyHint"> + <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="25" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_BASE_TYPE" value="26" enum="PropertyHint"> + <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="26" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_INSTANCE" value="27" enum="PropertyHint"> + <constant name="PROPERTY_HINT_SAVE_FILE" value="27" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_METHOD_OF_SCRIPT" value="28" enum="PropertyHint"> + <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="28" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE" value="29" enum="PropertyHint"> + <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="29" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_BASE_TYPE" value="30" enum="PropertyHint"> + <constant name="PROPERTY_HINT_INT_IS_POINTER" value="30" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_INSTANCE" value="31" enum="PropertyHint"> + <constant name="PROPERTY_HINT_ARRAY_TYPE" value="31" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_PROPERTY_OF_SCRIPT" value="32" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="33" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="34" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_SAVE_FILE" value="35" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_GLOBAL_SAVE_FILE" value="36" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="37" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_INT_IS_POINTER" value="38" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint"> - </constant> - <constant name="PROPERTY_HINT_LOCALE_ID" value="40" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LOCALE_ID" value="32" enum="PropertyHint"> Hints that a string property is a locale code. Editing it will show a locale dialog for picking language and country. </constant> - <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="41" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LOCALIZABLE_STRING" value="33" enum="PropertyHint"> Hints that a dictionary property is string translation map. Dictionary keys are locale codes and, values are translated strings. </constant> - <constant name="PROPERTY_HINT_NODE_TYPE" value="42" enum="PropertyHint"> + <constant name="PROPERTY_HINT_NODE_TYPE" value="34" enum="PropertyHint"> </constant> - <constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="43" enum="PropertyHint"> + <constant name="PROPERTY_HINT_HIDE_QUATERNION_EDIT" value="35" enum="PropertyHint"> Hints that a quaternion property should disable the temporary euler editor. </constant> - <constant name="PROPERTY_HINT_PASSWORD" value="44" enum="PropertyHint"> + <constant name="PROPERTY_HINT_PASSWORD" value="36" enum="PropertyHint"> Hints that a string property is a password, and every character is replaced with the secret character. </constant> - <constant name="PROPERTY_HINT_MAX" value="45" enum="PropertyHint"> + <constant name="PROPERTY_HINT_MAX" value="37" enum="PropertyHint"> </constant> - <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags" is_bitfield="true"> The property is not stored, and does not display in the editor. This is the default for non-exported properties. </constant> - <constant name="PROPERTY_USAGE_STORAGE" value="2" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_STORAGE" value="2" enum="PropertyUsageFlags" is_bitfield="true"> The property is serialized and saved in the scene file (default). </constant> - <constant name="PROPERTY_USAGE_EDITOR" value="4" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_EDITOR" value="4" enum="PropertyUsageFlags" is_bitfield="true"> The property is shown in the [EditorInspector] (default). </constant> - <constant name="PROPERTY_USAGE_CHECKABLE" value="8" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_INTERNAL" value="8" enum="PropertyUsageFlags" is_bitfield="true"> + </constant> + <constant name="PROPERTY_USAGE_CHECKABLE" value="16" enum="PropertyUsageFlags" is_bitfield="true"> The property can be checked in the [EditorInspector]. </constant> - <constant name="PROPERTY_USAGE_CHECKED" value="16" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_CHECKED" value="32" enum="PropertyUsageFlags" is_bitfield="true"> The property is checked in the [EditorInspector]. </constant> - <constant name="PROPERTY_USAGE_INTERNATIONALIZED" value="32" enum="PropertyUsageFlags"> - The property is a translatable string. - </constant> - <constant name="PROPERTY_USAGE_GROUP" value="64" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_GROUP" value="64" enum="PropertyUsageFlags" is_bitfield="true"> Used to group properties together in the editor. See [EditorInspector]. </constant> - <constant name="PROPERTY_USAGE_CATEGORY" value="128" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_CATEGORY" value="128" enum="PropertyUsageFlags" is_bitfield="true"> Used to categorize properties together in the editor. </constant> - <constant name="PROPERTY_USAGE_SUBGROUP" value="256" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_SUBGROUP" value="256" enum="PropertyUsageFlags" is_bitfield="true"> Used to group properties together in the editor in a subgroup (under a group). See [EditorInspector]. </constant> - <constant name="PROPERTY_USAGE_CLASS_IS_BITFIELD" value="512" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_CLASS_IS_BITFIELD" value="512" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="1024" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_NO_INSTANCE_STATE" value="1024" enum="PropertyUsageFlags" is_bitfield="true"> The property does not save its state in [PackedScene]. </constant> - <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="2048" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_RESTART_IF_CHANGED" value="2048" enum="PropertyUsageFlags" is_bitfield="true"> Editing the property prompts the user for restarting the editor. </constant> - <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="4096" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="4096" enum="PropertyUsageFlags" is_bitfield="true"> 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="8192" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_STORE_IF_NULL" value="8192" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="16384" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="16384" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="32768" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="32768" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="65536" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="65536" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="131072" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="131072" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_INTERNAL" value="262144" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_ARRAY" value="262144" enum="PropertyUsageFlags" is_bitfield="true"> + The property is an array. </constant> - <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="524288" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="524288" enum="PropertyUsageFlags" is_bitfield="true"> If the property is a [Resource], a new copy of it is always created when calling [method Node.duplicate] or [method Resource.duplicate]. </constant> - <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="1048576" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="1048576" enum="PropertyUsageFlags" is_bitfield="true"> The property is only shown in the editor if modern renderers are supported (GLES3 is excluded). </constant> - <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="2097152" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="2097152" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="4194304" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="4194304" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="8388608" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="8388608" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="16777216" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="16777216" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="33554432" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="33554432" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="67108864" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="67108864" enum="PropertyUsageFlags" is_bitfield="true"> </constant> - <constant name="PROPERTY_USAGE_READ_ONLY" value="134217728" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_READ_ONLY" value="134217728" enum="PropertyUsageFlags" is_bitfield="true"> The property is read-only in the [EditorInspector]. </constant> - <constant name="PROPERTY_USAGE_ARRAY" value="268435456" enum="PropertyUsageFlags"> - The property is an array. - </constant> - <constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_DEFAULT" value="6" enum="PropertyUsageFlags" is_bitfield="true"> Default usage (storage, editor and network). </constant> - <constant name="PROPERTY_USAGE_DEFAULT_INTL" value="38" enum="PropertyUsageFlags"> - Default usage for translatable strings (storage, editor, network and internationalized). - </constant> - <constant name="PROPERTY_USAGE_NO_EDITOR" value="2" enum="PropertyUsageFlags"> + <constant name="PROPERTY_USAGE_NO_EDITOR" value="2" enum="PropertyUsageFlags" is_bitfield="true"> Default usage but without showing the property in the editor (storage, network). </constant> - <constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags"> + <constant name="METHOD_FLAG_NORMAL" value="1" enum="MethodFlags" is_bitfield="true"> Flag for a normal method. </constant> - <constant name="METHOD_FLAG_EDITOR" value="2" enum="MethodFlags"> + <constant name="METHOD_FLAG_EDITOR" value="2" enum="MethodFlags" is_bitfield="true"> Flag for an editor method. </constant> - <constant name="METHOD_FLAG_CONST" value="4" enum="MethodFlags"> + <constant name="METHOD_FLAG_CONST" value="4" enum="MethodFlags" is_bitfield="true"> Flag for a constant method. </constant> - <constant name="METHOD_FLAG_VIRTUAL" value="8" enum="MethodFlags"> + <constant name="METHOD_FLAG_VIRTUAL" value="8" enum="MethodFlags" is_bitfield="true"> Flag for a virtual method. </constant> - <constant name="METHOD_FLAG_VARARG" value="16" enum="MethodFlags"> + <constant name="METHOD_FLAG_VARARG" value="16" enum="MethodFlags" is_bitfield="true"> Flag for a method with a variable number of arguments. </constant> - <constant name="METHOD_FLAG_STATIC" value="32" enum="MethodFlags"> + <constant name="METHOD_FLAG_STATIC" value="32" enum="MethodFlags" is_bitfield="true"> Flag for a static method. </constant> - <constant name="METHOD_FLAG_OBJECT_CORE" value="64" enum="MethodFlags"> + <constant name="METHOD_FLAG_OBJECT_CORE" value="64" enum="MethodFlags" is_bitfield="true"> Used internally. Allows to not dump core virtual methods (such as [method Object._notification]) to the JSON API. </constant> - <constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags"> + <constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags" is_bitfield="true"> Default method flags (normal). </constant> <constant name="TYPE_NIL" value="0" enum="Variant.Type"> diff --git a/doc/classes/AStarGrid2D.xml b/doc/classes/AStarGrid2D.xml index 916946775b..32599d7f7d 100644 --- a/doc/classes/AStarGrid2D.xml +++ b/doc/classes/AStarGrid2D.xml @@ -69,6 +69,13 @@ [b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector3Array] and will print an error message. </description> </method> + <method name="get_point_position" qualifiers="const"> + <return type="Vector2" /> + <param index="0" name="id" type="Vector2i" /> + <description> + Returns the position of the point associated with the given [param id]. + </description> + </method> <method name="get_point_weight_scale" qualifiers="const"> <return type="float" /> <param index="0" name="id" type="Vector2i" /> @@ -133,8 +140,11 @@ <member name="cell_size" type="Vector2" setter="set_cell_size" getter="get_cell_size" default="Vector2(1, 1)"> The size of the point cell which will be applied to calculate the resulting point position returned by [method get_point_path]. If changed, [method update] needs to be called before finding the next path. </member> - <member name="default_heuristic" type="int" setter="set_default_heuristic" getter="get_default_heuristic" enum="AStarGrid2D.Heuristic" default="0"> - The default [enum Heuristic] which will be used to calculate the path if [method _compute_cost] and/or [method _estimate_cost] were not overridden. + <member name="default_compute_heuristic" type="int" setter="set_default_compute_heuristic" getter="get_default_compute_heuristic" enum="AStarGrid2D.Heuristic" default="0"> + The default [enum Heuristic] which will be used to calculate the cost between two points if [method _compute_cost] was not overridden. + </member> + <member name="default_estimate_heuristic" type="int" setter="set_default_estimate_heuristic" getter="get_default_estimate_heuristic" enum="AStarGrid2D.Heuristic" default="0"> + The default [enum Heuristic] which will be used to calculate the cost between the point and the end point if [method _estimate_cost] was not overridden. </member> <member name="diagonal_mode" type="int" setter="set_diagonal_mode" getter="get_diagonal_mode" enum="AStarGrid2D.DiagonalMode" default="0"> A specific [enum DiagonalMode] mode which will force the path to avoid or accept the specified diagonals. diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index afbe34816a..e20fb71c7e 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -6,7 +6,7 @@ <description> [AnimatedSprite2D] is similar to the [Sprite2D] node, except it carries multiple textures as animation frames. Animations are created using a [SpriteFrames] resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The [SpriteFrames] resource can be configured in the editor via the SpriteFrames bottom panel. After setting up [member frames], [method play] may be called. It's also possible to select an [member animation] and toggle [member playing], even within the editor. - To pause the current animation, call [method stop] or set [member playing] to [code]false[/code]. Alternatively, setting [member speed_scale] to [code]0[/code] also preserves the current frame's elapsed time. + To pause the current animation, set [member playing] to [code]false[/code]. Alternatively, setting [member speed_scale] to [code]0[/code] also preserves the current frame's elapsed time. [b]Note:[/b] You can associate a set of normal or specular maps by creating additional [SpriteFrames] resources with a [code]_normal[/code] or [code]_specular[/code] suffix. For example, having 3 [SpriteFrames] resources [code]run[/code], [code]run_normal[/code], and [code]run_specular[/code] will make it so the [code]run[/code] animation uses normal and specular maps. </description> <tutorials> @@ -20,13 +20,14 @@ <param index="1" name="backwards" type="bool" default="false" /> <description> Plays the animation named [param anim]. If no [param anim] is provided, the current animation is played. If [param backwards] is [code]true[/code], the animation is played in reverse. + [b]Note:[/b] If [member speed_scale] is negative, the animation direction specified by [param backwards] will be inverted. </description> </method> <method name="stop"> <return type="void" /> <description> Stops the current [member animation] at the current [member frame]. - [b]Note:[/b] This method resets the current frame's elapsed time. If this behavior is undesired, consider setting [member speed_scale] to [code]0[/code], instead. + [b]Note:[/b] This method resets the current frame's elapsed time and removes the [code]backwards[/code] flag from the current [member animation] (if it was previously set by [method play]). If this behavior is undesired, set [member playing] to [code]false[/code] instead. </description> </method> </methods> @@ -53,7 +54,9 @@ The texture's drawing offset. </member> <member name="playing" type="bool" setter="set_playing" getter="is_playing" default="false"> - If [code]true[/code], the [member animation] is currently playing. Setting this property to [code]false[/code] is the equivalent of calling [method stop]. + If [code]true[/code], the [member animation] is currently playing. Setting this property to [code]false[/code] pauses the current animation. Use [method stop] to stop the animation at the current frame instead. + [b]Note:[/b] Unlike [method stop], changing this property to [code]false[/code] preserves the current frame's elapsed time and the [code]backwards[/code] flag of the current [member animation] (if it was previously set by [method play]). + [b]Note:[/b] After a non-looping animation finishes, the property still remains [code]true[/code]. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse. If set to [code]0[/code], the animation is paused, preserving the current frame's elapsed time. @@ -62,7 +65,7 @@ <signals> <signal name="animation_finished"> <description> - Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn. + Emitted when the animation reaches the end, or the start if it is played in reverse. If the animation is looping, this signal is emitted at the end of each loop. </description> </signal> <signal name="frame_changed"> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 09baf882fb..4837ae715f 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -6,7 +6,7 @@ <description> [AnimatedSprite3D] is similar to the [Sprite3D] node, except it carries multiple textures as animation [member frames]. Animations are created using a [SpriteFrames] resource, which allows you to import image files (or a folder containing said files) to provide the animation frames for the sprite. The [SpriteFrames] resource can be configured in the editor via the SpriteFrames bottom panel. After setting up [member frames], [method play] may be called. It's also possible to select an [member animation] and toggle [member playing], even within the editor. - To pause the current animation, call [method stop] or set [member playing] to [code]false[/code]. Alternatively, setting [member speed_scale] to [code]0[/code] also preserves the current frame's elapsed time. + To pause the current animation, set [member playing] to [code]false[/code]. Alternatively, setting [member speed_scale] to [code]0[/code] also preserves the current frame's elapsed time. </description> <tutorials> <link title="2D Sprite animation (also applies to 3D)">$DOCS_URL/tutorials/2d/2d_sprite_animation.html</link> @@ -18,13 +18,14 @@ <param index="1" name="backwards" type="bool" default="false" /> <description> Plays the animation named [param anim]. If no [param anim] is provided, the current animation is played. If [param backwards] is [code]true[/code], the animation is played in reverse. + [b]Note:[/b] If [member speed_scale] is negative, the animation direction specified by [param backwards] will be inverted. </description> </method> <method name="stop"> <return type="void" /> <description> Stops the current [member animation] at the current [member frame]. - [b]Note:[/b] This method resets the current frame's elapsed time. If this behavior is undesired, consider setting [member speed_scale] to [code]0[/code], instead. + [b]Note:[/b] This method resets the current frame's elapsed time and removes the [code]backwards[/code] flag from the current [member animation] (if it was previously set by [method play]). If this behavior is undesired, set [member playing] to [code]false[/code] instead. </description> </method> </methods> @@ -39,7 +40,9 @@ The [SpriteFrames] resource containing the animation(s). </member> <member name="playing" type="bool" setter="set_playing" getter="is_playing" default="false"> - If [code]true[/code], the [member animation] is currently playing. Setting this property to [code]false[/code] is the equivalent of calling [method stop]. + If [code]true[/code], the [member animation] is currently playing. Setting this property to [code]false[/code] pauses the current animation. Use [method stop] to stop the animation at the current frame instead. + [b]Note:[/b] Unlike [method stop], changing this property to [code]false[/code] preserves the current frame's elapsed time and the [code]backwards[/code] flag of the current [member animation] (if it was previously set by [method play]). + [b]Note:[/b] After a non-looping animation finishes, the property still remains [code]true[/code]. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> The animation speed is multiplied by this value. If set to a negative value, the animation is played in reverse. If set to [code]0[/code], the animation is paused, preserving the current frame's elapsed time. @@ -48,7 +51,7 @@ <signals> <signal name="animation_finished"> <description> - Emitted when the animation is finished (when it plays the last frame). If the animation is looping, this signal is emitted every time the last frame is drawn. + Emitted when the animation reaches the end, or the start if it is played in reverse. If the animation is looping, this signal is emitted at the end of each loop. </description> </signal> <signal name="frame_changed"> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index d9a1f896f1..c0626dcfe4 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -305,9 +305,9 @@ <return type="int" /> <param index="0" name="track_idx" type="int" /> <param index="1" name="time" type="float" /> - <param index="2" name="exact" type="bool" default="false" /> + <param index="2" name="find_mode" type="int" enum="Animation.FindMode" default="0" /> <description> - Finds the key index by time in a given track. Optionally, only find it if the exact time is given. + Finds the key index by time in a given track. Optionally, only find it if the approx/exact time is given. </description> </method> <method name="track_get_interpolation_loop_wrap" qualifiers="const"> @@ -622,5 +622,14 @@ <constant name="LOOPED_FLAG_START" value="2" enum="LoopedFlag"> This flag indicates that the animation has reached the start of the animation and just after loop processed. </constant> + <constant name="FIND_MODE_NEAREST" value="0" enum="FindMode"> + Finds the nearest time key. + </constant> + <constant name="FIND_MODE_APPROX" value="1" enum="FindMode"> + Finds only the key with approximating the time. + </constant> + <constant name="FIND_MODE_EXACT" value="2" enum="FindMode"> + Finds only the key with matching the time. + </constant> </constants> </class> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index 79deb008d2..a33ec2f6dc 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -165,11 +165,6 @@ </member> </members> <signals> - <signal name="removed_from_graph"> - <description> - Emitted when the node was removed from the graph. - </description> - </signal> <signal name="tree_changed"> <description> Emitted by nodes that inherit from this class and that have an internal tree when one of their nodes changes. The nodes that emit this signal are [AnimationNodeBlendSpace1D], [AnimationNodeBlendSpace2D], [AnimationNodeStateMachine], and [AnimationNodeBlendTree]. diff --git a/doc/classes/AnimationNodeStateMachineTransition.xml b/doc/classes/AnimationNodeStateMachineTransition.xml index 4c2a30030b..814b2d0052 100644 --- a/doc/classes/AnimationNodeStateMachineTransition.xml +++ b/doc/classes/AnimationNodeStateMachineTransition.xml @@ -22,14 +22,11 @@ <member name="advance_expression" type="String" setter="set_advance_expression" getter="get_advance_expression" default=""""> Use an expression as a condition for state machine transitions. It is possible to create complex animation advance conditions for switching between states and gives much greater flexibility for creating complex state machines by directly interfacing with the script code. </member> - <member name="auto_advance" type="bool" setter="set_auto_advance" getter="has_auto_advance" default="false"> - Turn on the transition automatically when this state is reached. This works best with [constant SWITCH_MODE_AT_END]. - </member> - <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> - Don't use this transition during [method AnimationNodeStateMachinePlayback.travel] or [member auto_advance]. + <member name="advance_mode" type="int" setter="set_advance_mode" getter="get_advance_mode" enum="AnimationNodeStateMachineTransition.AdvanceMode" default="1"> + Determines whether the transition should disabled, enabled when using [method AnimationNodeStateMachinePlayback.travel], or traversed automatically if the [member advance_condition] and [member advance_expression] checks are true (if assigned). </member> <member name="priority" type="int" setter="set_priority" getter="get_priority" default="1"> - Lower priority transitions are preferred when travelling through the tree via [method AnimationNodeStateMachinePlayback.travel] or [member auto_advance]. + Lower priority transitions are preferred when travelling through the tree via [method AnimationNodeStateMachinePlayback.travel] or [member advance_mode] is set to [constant ADVANCE_MODE_AUTO]. </member> <member name="switch_mode" type="int" setter="set_switch_mode" getter="get_switch_mode" enum="AnimationNodeStateMachineTransition.SwitchMode" default="0"> The transition type. @@ -58,5 +55,14 @@ <constant name="SWITCH_MODE_AT_END" value="2" enum="SwitchMode"> Wait for the current state playback to end, then switch to the beginning of the next state animation. </constant> + <constant name="ADVANCE_MODE_DISABLED" value="0" enum="AdvanceMode"> + Don't use this transition. + </constant> + <constant name="ADVANCE_MODE_ENABLED" value="1" enum="AdvanceMode"> + Only use this transition during [method AnimationNodeStateMachinePlayback.travel]. + </constant> + <constant name="ADVANCE_MODE_AUTO" value="2" enum="AdvanceMode"> + Automatically use this transition if the [member advance_condition] and [member advance_expression] checks are true (if assigned). + </constant> </constants> </class> diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index 21f4b37741..a17a727d7e 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -111,11 +111,25 @@ </member> </members> <signals> + <signal name="animation_finished"> + <param index="0" name="anim_name" type="StringName" /> + <description> + Notifies when an animation finished playing. + [b]Note:[/b] This signal is not emitted if an animation is looping or aborted. Also be aware of the possibility of unseen playback by sync and xfade. + </description> + </signal> <signal name="animation_player_changed"> <description> Emitted when the [member anim_player] is changed. </description> </signal> + <signal name="animation_started"> + <param index="0" name="anim_name" type="StringName" /> + <description> + Notifies when an animation starts playing. + [b]Note:[/b] This signal is not emitted if an animation is looping or playbacked from the middle. Also be aware of the possibility of unseen playback by sync and xfade. + </description> + </signal> </signals> <constants> <constant name="ANIMATION_PROCESS_PHYSICS" value="0" enum="AnimationProcessCallback"> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 29592f133d..3f76cc16ec 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -114,15 +114,13 @@ <signal name="area_entered"> <param index="0" name="area" type="Area2D" /> <description> - Emitted when another Area2D enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. - [param area] the other Area2D. + Emitted when the received [param area] enters this area. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="area_exited"> <param index="0" name="area" type="Area2D" /> <description> - Emitted when another Area2D exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. - [param area] the other Area2D. + Emitted when the received [param area] exits this area. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="area_shape_entered"> @@ -131,11 +129,18 @@ <param index="2" name="area_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. - [param area_rid] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. - [param area] the other Area2D. - [param area_shape_index] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape2D] of the received [param area] enters a shape of this area. Requires [member monitoring] to be set to [code]true[/code]. + [param local_shape_index] and [param area_shape_index] contain indices of the interacting shapes from this area and the other area, respectively. [param area_rid] contains the [RID] of the other area. These values can be used with the [PhysicsServer2D]. + [b]Example of getting the[/b] [CollisionShape2D] [b]node from the shape index:[/b] + [codeblocks] + [gdscript] + var other_shape_owner = area.shape_find_owner(area_shape_index) + var other_shape_node = area.shape_owner_get_owner(other_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) + [/gdscript] + [/codeblocks] </description> </signal> <signal name="area_shape_exited"> @@ -144,25 +149,20 @@ <param index="2" name="area_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. - [param area_rid] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. - [param area] the other Area2D. - [param area_shape_index] the index of the [Shape2D] of the other Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape2D] of the received [param area] exits a shape of this area. Requires [member monitoring] to be set to [code]true[/code]. + See also [signal area_shape_entered]. </description> </signal> <signal name="body_entered"> <param index="0" name="body" type="Node2D" /> <description> - Emitted when a [PhysicsBody2D] or [TileMap] enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + Emitted when the received [param body] enters this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="body_exited"> <param index="0" name="body" type="Node2D" /> <description> - Emitted when a [PhysicsBody2D] or [TileMap] exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [param body] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. + Emitted when the received [param body] exits this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="body_shape_entered"> @@ -171,11 +171,18 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [param body_rid] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. - [param body] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap]. - [param body_shape_index] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape2D] of the received [param body] enters a shape of this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. + [param local_shape_index] and [param body_shape_index] contain indices of the interacting shapes from this area and the interacting body, respectively. [param body_rid] contains the [RID] of the body. These values can be used with the [PhysicsServer2D]. + [b]Example of getting the[/b] [CollisionShape2D] [b]node from the shape index:[/b] + [codeblocks] + [gdscript] + var body_shape_owner = body.shape_find_owner(body_shape_index) + var body_shape_node = body.shape_owner_get_owner(body_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) + [/gdscript] + [/codeblocks] </description> </signal> <signal name="body_shape_exited"> @@ -184,11 +191,8 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. - [param body_rid] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. - [param body] the [Node], if it exists in the tree, of the [PhysicsBody2D] or [TileMap]. - [param body_shape_index] the index of the [Shape2D] of the [PhysicsBody2D] or [TileMap] used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [param local_shape_index] the index of the [Shape2D] of this Area2D used by the [PhysicsServer2D]. Get the [CollisionShape2D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape2D] of the received [param body] exits a shape of this area. [param body] can be a [PhysicsBody2D] or a [TileMap]. [TileMap]s are detected if their [TileSet] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. + See also [signal body_shape_entered]. </description> </signal> </signals> diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index ea8cab324d..8923ac8aae 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -133,15 +133,13 @@ <signal name="area_entered"> <param index="0" name="area" type="Area3D" /> <description> - Emitted when another Area3D enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. - [param area] the other Area3D. + Emitted when the received [param area] enters this area. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="area_exited"> <param index="0" name="area" type="Area3D" /> <description> - Emitted when another Area3D exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. - [param area] the other Area3D. + Emitted when the received [param area] exits this area. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="area_shape_entered"> @@ -150,11 +148,18 @@ <param index="2" name="area_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. - [param area_rid] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. - [param area] the other Area3D. - [param area_shape_index] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape3D] of the received [param area] enters a shape of this area. Requires [member monitoring] to be set to [code]true[/code]. + [param local_shape_index] and [param area_shape_index] contain indices of the interacting shapes from this area and the other area, respectively. [param area_rid] contains the [RID] of the other area. These values can be used with the [PhysicsServer3D]. + [b]Example of getting the[/b] [CollisionShape3D] [b]node from the shape index:[/b] + [codeblocks] + [gdscript] + var other_shape_owner = area.shape_find_owner(area_shape_index) + var other_shape_node = area.shape_owner_get_owner(other_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) + [/gdscript] + [/codeblocks] </description> </signal> <signal name="area_shape_exited"> @@ -163,25 +168,20 @@ <param index="2" name="area_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of another Area3D's [Shape3D]s exits one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. - [param area_rid] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. - [param area] the other Area3D. - [param area_shape_index] the index of the [Shape3D] of the other Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]area.shape_owner_get_owner(area.shape_find_owner(area_shape_index))[/code]. - [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape3D] of the received [param area] exits a shape of this area. Requires [member monitoring] to be set to [code]true[/code]. + See also [signal area_shape_entered]. </description> </signal> <signal name="body_entered"> <param index="0" name="body" type="Node3D" /> <description> - Emitted when a [PhysicsBody3D] or [GridMap] enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + Emitted when the received [param body] enters this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="body_exited"> <param index="0" name="body" type="Node3D" /> <description> - Emitted when a [PhysicsBody3D] or [GridMap] exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [param body] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. + Emitted when the received [param body] exits this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. </description> </signal> <signal name="body_shape_entered"> @@ -190,11 +190,18 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [param body_rid] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. - [param body] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap]. - [param body_shape_index] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape3D] of the received [param body] enters a shape of this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. + [param local_shape_index] and [param body_shape_index] contain indices of the interacting shapes from this area and the interacting body, respectively. [param body_rid] contains the [RID] of the body. These values can be used with the [PhysicsServer3D]. + [b]Example of getting the[/b] [CollisionShape3D] [b]node from the shape index:[/b] + [codeblocks] + [gdscript] + var body_shape_owner = body.shape_find_owner(body_shape_index) + var body_shape_node = body.shape_owner_get_owner(body_shape_owner) + + var local_shape_owner = shape_find_owner(local_shape_index) + var local_shape_node = shape_owner_get_owner(local_shape_owner) + [/gdscript] + [/codeblocks] </description> </signal> <signal name="body_shape_exited"> @@ -203,11 +210,8 @@ <param index="2" name="body_shape_index" type="int" /> <param index="3" name="local_shape_index" type="int" /> <description> - Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. - [param body_rid] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. - [param body] the [Node], if it exists in the tree, of the [PhysicsBody3D] or [GridMap]. - [param body_shape_index] the index of the [Shape3D] of the [PhysicsBody3D] or [GridMap] used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]body.shape_owner_get_owner(body.shape_find_owner(body_shape_index))[/code]. - [param local_shape_index] the index of the [Shape3D] of this Area3D used by the [PhysicsServer3D]. Get the [CollisionShape3D] node with [code]self.shape_owner_get_owner(self.shape_find_owner(local_shape_index))[/code]. + Emitted when a [Shape3D] of the received [param body] exits a shape of this area. [param body] can be a [PhysicsBody3D] or a [GridMap]. [GridMap]s are detected if their [MeshLibrary] has collision shapes configured. Requires [member monitoring] to be set to [code]true[/code]. + See also [signal body_shape_entered]. </description> </signal> </signals> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 603974d619..ee21493434 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -40,6 +40,7 @@ [/codeblocks] [b]Note:[/b] Concatenating with the [code]+=[/code] operator will create a new array, which has a cost. If you want to append another array to an existing array, [method append_array] is more efficient. [b]Note:[/b] Arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. + [b]Note:[/b] Erasing elements while iterating over arrays is [b]not[/b] supported and will result in unpredictable behavior. [b]Note:[/b] When declaring an array with [code]const[/code], the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized. </description> <tutorials> @@ -253,6 +254,7 @@ Removes the first occurrence of a value from the array. If the value does not exist in the array, nothing happens. To remove an element by index, use [method remove_at] instead. [b]Note:[/b] This method acts in-place and doesn't return a value. [b]Note:[/b] On large arrays, this method will be slower if the removed element is close to the beginning of the array (index 0). This is because all elements placed after the removed element have to be reindexed. + [b]Note:[/b] Do not erase entries while iterating over the array. </description> </method> <method name="fill"> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index b9c8ab0f6c..f7764d5e32 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -65,7 +65,7 @@ <param index="1" name="arrays" type="Array" /> <param index="2" name="blend_shapes" type="Array[]" default="[]" /> <param index="3" name="lods" type="Dictionary" default="{}" /> - <param index="4" name="compress_flags" type="int" default="0" /> + <param index="4" name="compress_flags" type="int" enum="Mesh.ArrayFormat" default="0" /> <description> Creates a new surface. Surfaces are created to be rendered using a [param primitive], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. @@ -102,13 +102,13 @@ <param index="0" name="transform" type="Transform3D" /> <param index="1" name="texel_size" type="float" /> <description> - Will perform a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping. + Performs a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping. </description> </method> <method name="regen_normal_maps"> <return type="void" /> <description> - Will regenerate normal maps for the [ArrayMesh]. + Regenerates tangents for each of the [ArrayMesh]'s surfaces. </description> </method> <method name="set_blend_shape_name"> @@ -141,7 +141,7 @@ </description> </method> <method name="surface_get_format" qualifiers="const"> - <return type="int" /> + <return type="int" enum="Mesh.ArrayFormat" /> <param index="0" name="surf_idx" type="int" /> <description> Returns the format mask of the requested surface (see [method add_surface_from_arrays]). diff --git a/doc/classes/AudioStreamRandomizer.xml b/doc/classes/AudioStreamRandomizer.xml index 9b58d78af5..d93f853c89 100644 --- a/doc/classes/AudioStreamRandomizer.xml +++ b/doc/classes/AudioStreamRandomizer.xml @@ -12,8 +12,10 @@ <method name="add_stream"> <return type="void" /> <param index="0" name="index" type="int" /> + <param index="1" name="stream" type="AudioStream" /> + <param index="2" name="weight" type="float" default="1.0" /> <description> - Insert a stream at the specified index. + Insert a stream at the specified index. If the index is less than zero, the insertion occurs at the end of the underlying pool. </description> </method> <method name="get_stream" qualifiers="const"> diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index c92e39e08a..aedb8f4420 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -50,7 +50,7 @@ <member name="button_group" type="ButtonGroup" setter="set_button_group" getter="get_button_group"> The [ButtonGroup] associated with the button. Not to be confused with node groups. </member> - <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="1"> + <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButtonMask" default="1"> Binary mask to choose which mouse buttons this button will respond to. To allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT[/code]. </member> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 8a5048de6b..60225275f3 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -529,13 +529,13 @@ The material will use the texture's alpha values for transparency. </constant> <constant name="TRANSPARENCY_ALPHA_SCISSOR" value="2" enum="Transparency"> - The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendering in the depth prepass. + The material will cut off all values below a threshold, the rest will remain opaque. The opaque portions will be rendered in the depth prepass. </constant> <constant name="TRANSPARENCY_ALPHA_HASH" value="3" enum="Transparency"> The material will cut off all values below a spatially-deterministic threshold, the rest will remain opaque. </constant> <constant name="TRANSPARENCY_ALPHA_DEPTH_PRE_PASS" value="4" enum="Transparency"> - The material will use the texture's alpha value for transparency, but will still be rendered in the depth prepass. + The material will use the texture's alpha value for transparency, but will discard fragments with an alpha of less than 0.99 during the depth prepass and fragments with an alpha less than 0.1 during the shadow pass. </constant> <constant name="TRANSPARENCY_MAX" value="5" enum="Transparency"> Represents the size of the [enum Transparency] enum. diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml index 277bda2836..8195669b10 100644 --- a/doc/classes/ButtonGroup.xml +++ b/doc/classes/ButtonGroup.xml @@ -4,8 +4,8 @@ Group of Buttons. </brief_description> <description> - Group of [Button]. All direct and indirect children buttons become radios. Only one allows being pressed. - [member BaseButton.toggle_mode] should be [code]true[/code]. + Group of [BaseButton]. The members of this group are treated like radio buttons in the sense that only one button can be pressed at the same time. + Every member of the ButtonGroup should have [member BaseButton.toggle_mode] set to [code]true[/code]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index 1fb4f91920..a6fffae8b5 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -77,6 +77,13 @@ Returns a copy of this [Callable] with one or more arguments bound. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. </description> </method> + <method name="bindv"> + <return type="Callable" /> + <param index="0" name="arguments" type="Array" /> + <description> + Returns a copy of this [Callable] with one or more arguments bound, reading them from an array. When called, the bound arguments are passed [i]after[/i] the arguments supplied by [method call]. + </description> + </method> <method name="call" qualifiers="vararg const"> <return type="Variant" /> <description> @@ -100,6 +107,12 @@ Calls the method represented by this [Callable]. Unlike [method call], this method expects all arguments to be contained inside the [param arguments] [Array]. </description> </method> + <method name="get_bound_arguments_count" qualifiers="const"> + <return type="int" /> + <description> + Returns the total amount of arguments bound (or unbound) via successive [method bind] or [method unbind] calls. If the amount of arguments unbound is greater than the ones bound, this function returns a value less than zero. + </description> + </method> <method name="get_method" qualifiers="const"> <return type="StringName" /> <description> diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index 309e2231a4..821117122c 100644 --- a/doc/classes/CharacterBody3D.xml +++ b/doc/classes/CharacterBody3D.xml @@ -41,10 +41,16 @@ Returns a [KinematicCollision3D], which contains information about the latest collision that occurred during the last call to [method move_and_slide]. </description> </method> + <method name="get_platform_angular_velocity" qualifiers="const"> + <return type="Vector3" /> + <description> + Returns the angular velocity of the platform at the last collision point. Only valid after calling [method move_and_slide]. + </description> + </method> <method name="get_platform_velocity" qualifiers="const"> <return type="Vector3" /> <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_position_delta" qualifiers="const"> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index c313e6c875..3ceb8967a0 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -448,7 +448,7 @@ <member name="code_completion_enabled" type="bool" setter="set_code_completion_enabled" getter="is_code_completion_enabled" default="false"> Sets whether code completion is allowed. </member> - <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_comletion_prefixes" default="[]"> + <member name="code_completion_prefixes" type="String[]" setter="set_code_completion_prefixes" getter="get_code_completion_prefixes" default="[]"> Sets prefixes that will trigger code completion. </member> <member name="delimiter_comments" type="String[]" setter="set_comment_delimiters" getter="get_comment_delimiters" default="[]"> diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 2b287d7546..823433c2df 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="ColorPicker" inherits="BoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> +<class name="ColorPicker" inherits="VBoxContainer" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> <brief_description> Color picker control. </brief_description> @@ -88,7 +88,6 @@ <member name="sliders_visible" type="bool" setter="set_sliders_visible" getter="are_sliders_visible" default="true"> If [code]true[/code], the color sliders are visible. </member> - <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" overrides="BoxContainer" default="true" /> </members> <signals> <signal name="color_changed"> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index b0351559ee..b9f3275dfe 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -1064,13 +1064,13 @@ <member name="size" type="Vector2" setter="_set_size" getter="get_size" default="Vector2(0, 0)"> The size of the node's bounding rectangle, in pixels. [Container] nodes update this property automatically. </member> - <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" default="1"> + <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" enum="Control.SizeFlags" default="1"> Tells the parent [Container] nodes how they should resize and place the node on the X axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does. </member> <member name="size_flags_stretch_ratio" type="float" setter="set_stretch_ratio" getter="get_stretch_ratio" default="1.0"> If the node and at least one of its neighbors uses the [constant SIZE_EXPAND] size flag, the parent [Container] will let it take more or less space depending on this property. If this node has a stretch ratio of 2 and its neighbor a ratio of 1, this node will take two thirds of the available space. </member> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" default="1"> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" enum="Control.SizeFlags" default="1"> Tells the parent [Container] nodes how they should resize and place the node on the Y axis. Use one of the [enum SizeFlags] constants to change the flags. See the constants to learn what each does. </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> @@ -1315,23 +1315,23 @@ <constant name="PRESET_MODE_KEEP_SIZE" value="3" enum="LayoutPresetMode"> The control's size will not change. </constant> - <constant name="SIZE_SHRINK_BEGIN" value="0" enum="SizeFlags"> + <constant name="SIZE_SHRINK_BEGIN" value="0" enum="SizeFlags" is_bitfield="true"> Tells the parent [Container] to align the node with its start, either the top or the left edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. [b]Note:[/b] Setting this flag is equal to not having any size flags. </constant> - <constant name="SIZE_FILL" value="1" enum="SizeFlags"> + <constant name="SIZE_FILL" value="1" enum="SizeFlags" is_bitfield="true"> Tells the parent [Container] to expand the bounds of this node to fill all the available space without pushing any other node. It is mutually exclusive with shrink size flags. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> - <constant name="SIZE_EXPAND" value="2" enum="SizeFlags"> + <constant name="SIZE_EXPAND" value="2" enum="SizeFlags" is_bitfield="true"> Tells the parent [Container] to let this node take all the available space on the axis you flag. If multiple neighboring nodes are set to expand, they'll share the space based on their stretch ratio. See [member size_flags_stretch_ratio]. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> - <constant name="SIZE_EXPAND_FILL" value="3" enum="SizeFlags"> + <constant name="SIZE_EXPAND_FILL" value="3" enum="SizeFlags" is_bitfield="true"> Sets the node's size flags to both fill and expand. See [constant SIZE_FILL] and [constant SIZE_EXPAND] for more information. </constant> - <constant name="SIZE_SHRINK_CENTER" value="4" enum="SizeFlags"> + <constant name="SIZE_SHRINK_CENTER" value="4" enum="SizeFlags" is_bitfield="true"> Tells the parent [Container] to center the node in the available space. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> - <constant name="SIZE_SHRINK_END" value="8" enum="SizeFlags"> + <constant name="SIZE_SHRINK_END" value="8" enum="SizeFlags" is_bitfield="true"> Tells the parent [Container] to align the node with its end, either the bottom or the right edge. It is mutually exclusive with [constant SIZE_FILL] and other shrink size flags, but can be used with [constant SIZE_EXPAND] in some containers. Use with [member size_flags_horizontal] and [member size_flags_vertical]. </constant> <constant name="MOUSE_FILTER_STOP" value="0" enum="MouseFilter"> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 29135376c5..779c15c713 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -130,12 +130,25 @@ The names of built-in display servers are [code]Windows[/code], [code]macOS[/code], [code]X11[/code] (Linux), [code]Android[/code], [code]iOS[/code], [code]web[/code] (HTML5) and [code]headless[/code] (when started with the [code]--headless[/code] [url=$DOCS_URL/tutorials/editor/command_line_tutorial.html]command line argument[/url]). </description> </method> + <method name="get_primary_screen" qualifiers="const"> + <return type="int" /> + <description> + Returns index of the primary screen. + </description> + </method> <method name="get_screen_count" qualifiers="const"> <return type="int" /> <description> Returns the number of displays available. </description> </method> + <method name="get_screen_from_rect" qualifiers="const"> + <return type="int" /> + <param index="0" name="rect" type="Rect2" /> + <description> + Returns index of the screen which contains specified rectangle. + </description> + </method> <method name="get_swap_cancel_ok"> <return type="bool" /> <description> @@ -772,7 +785,7 @@ </description> </method> <method name="mouse_get_button_state" qualifiers="const"> - <return type="int" enum="MouseButton" /> + <return type="int" enum="MouseButtonMask" /> <description> Returns the current state of mouse buttons (whether each button is pressed) as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method Input.get_mouse_button_mask]. </description> @@ -1521,6 +1534,9 @@ <constant name="MOUSE_MODE_CONFINED_HIDDEN" value="4" enum="MouseMode"> Confines the mouse cursor to the game window, and make it hidden. </constant> + <constant name="SCREEN_PRIMARY" value="-2"> + Represents the primary screen. + </constant> <constant name="SCREEN_OF_MAIN_WINDOW" value="-1"> Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. </constant> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index adcc87d062..b44c1d7ffa 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -664,7 +664,7 @@ <return type="void" /> <param index="0" name="callable" type="Callable" /> <description> - Removes a callback previsously added by [method add_undo_redo_inspector_hook_callback]. + Removes a callback previously added by [method add_undo_redo_inspector_hook_callback]. </description> </method> <method name="set_force_draw_over_forwarding_enabled"> diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml index de105b32e1..1aef79f6e5 100644 --- a/doc/classes/EditorSpinSlider.xml +++ b/doc/classes/EditorSpinSlider.xml @@ -22,10 +22,32 @@ <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false"> If [code]true[/code], the slider can't be interacted with. </member> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="1" /> <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" /> <member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default=""""> The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed. </member> </members> + <signals> + <signal name="grabbed"> + <description> + Emitted when the spinner/slider is grabbed. + </description> + </signal> + <signal name="ungrabbed"> + <description> + Emitted when the spinner/slider is ungrabbed. + </description> + </signal> + <signal name="value_focus_entered"> + <description> + Emitted when the value form gains focus. + </description> + </signal> + <signal name="value_focus_exited"> + <description> + Emitted when the value form loses focus. + </description> + </signal> + </signals> </class> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index be8c8ff83f..a2948697fb 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -155,7 +155,7 @@ </description> </method> <method name="get_mouse_button_mask" qualifiers="const"> - <return type="int" enum="MouseButton" /> + <return type="int" enum="MouseButtonMask" /> <description> Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. Equivalent to [method DisplayServer.mouse_get_button_state]. </description> diff --git a/doc/classes/InputEventMouse.xml b/doc/classes/InputEventMouse.xml index 889329d97e..0a1f3d2c1a 100644 --- a/doc/classes/InputEventMouse.xml +++ b/doc/classes/InputEventMouse.xml @@ -10,7 +10,7 @@ <link title="InputEvent">$DOCS_URL/tutorials/inputs/inputevent.html</link> </tutorials> <members> - <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButton" default="0"> + <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButtonMask" default="0"> The mouse button mask identifier, one of or a bitwise combination of the [enum MouseButton] button masks. </member> <member name="global_position" type="Vector2" setter="set_global_position" getter="get_global_position" default="Vector2(0, 0)"> diff --git a/doc/classes/InputEventScreenDrag.xml b/doc/classes/InputEventScreenDrag.xml index e5cc522b21..c1d126ca4a 100644 --- a/doc/classes/InputEventScreenDrag.xml +++ b/doc/classes/InputEventScreenDrag.xml @@ -13,12 +13,21 @@ <member name="index" type="int" setter="set_index" getter="get_index" default="0"> The drag event index in the case of a multi-drag event. </member> + <member name="pen_inverted" type="bool" setter="set_pen_inverted" getter="get_pen_inverted" default="false"> + Returns [code]true[/code] when using the eraser end of a stylus pen. + </member> <member name="position" type="Vector2" setter="set_position" getter="get_position" default="Vector2(0, 0)"> The drag position. </member> + <member name="pressure" type="float" setter="set_pressure" getter="get_pressure" default="0.0"> + Represents the pressure the user puts on the pen. Ranges from [code]0.0[/code] to [code]1.0[/code]. + </member> <member name="relative" type="Vector2" setter="set_relative" getter="get_relative" default="Vector2(0, 0)"> The drag position relative to the previous position (position at the last frame). </member> + <member name="tilt" type="Vector2" setter="set_tilt" getter="get_tilt" default="Vector2(0, 0)"> + Represents the angles of tilt of the pen. Positive X-coordinate value indicates a tilt to the right. Positive Y-coordinate value indicates a tilt toward the user. Ranges from [code]-1.0[/code] to [code]1.0[/code] for both axes. + </member> <member name="velocity" type="Vector2" setter="set_velocity" getter="get_velocity" default="Vector2(0, 0)"> The drag velocity. </member> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 1a8cbf0584..a14856b9b2 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -62,7 +62,7 @@ Limits the lines of text the node shows on screen. </member> <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" overrides="Control" enum="Control.MouseFilter" default="2" /> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="4" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="4" /> <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="TextServer.StructuredTextParser" default="0"> Set BiDi algorithm override for the structured text. </member> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index 4d3fb7ed5c..94e80ffb2b 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -266,79 +266,79 @@ <constant name="ARRAY_CUSTOM_MAX" value="8" enum="ArrayCustomFormat"> Represents the size of the [enum ArrayCustomFormat] enum. </constant> - <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat" is_bitfield="true"> Mesh array contains vertices. All meshes require a vertex array so this should always be present. </constant> - <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat" is_bitfield="true"> Mesh array contains normals. </constant> - <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat" is_bitfield="true"> Mesh array contains tangents. </constant> - <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat" is_bitfield="true"> Mesh array contains colors. </constant> - <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat" is_bitfield="true"> Mesh array contains UVs. </constant> - <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat" is_bitfield="true"> Mesh array contains second UV. </constant> - <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat" is_bitfield="true"> Mesh array contains custom channel index 0. </constant> - <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat" is_bitfield="true"> Mesh array contains custom channel index 1. </constant> - <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat" is_bitfield="true"> Mesh array contains custom channel index 2. </constant> - <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat" is_bitfield="true"> Mesh array contains custom channel index 3. </constant> - <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat" is_bitfield="true"> Mesh array contains bones. </constant> - <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat" is_bitfield="true"> Mesh array contains bone weights. </constant> - <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat" is_bitfield="true"> Mesh array uses indices. </constant> - <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat" is_bitfield="true"> Mask of mesh channels permitted in blend shapes. </constant> - <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat" is_bitfield="true"> Shift of first custom channel. </constant> - <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat" is_bitfield="true"> Number of format bits per custom channel. See [enum ArrayCustomFormat]. </constant> - <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat" is_bitfield="true"> Amount to shift [enum ArrayCustomFormat] for custom channel index 0. </constant> - <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat" is_bitfield="true"> Amount to shift [enum ArrayCustomFormat] for custom channel index 1. </constant> - <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat" is_bitfield="true"> Amount to shift [enum ArrayCustomFormat] for custom channel index 2. </constant> - <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat" is_bitfield="true"> Amount to shift [enum ArrayCustomFormat] for custom channel index 3. </constant> - <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat" is_bitfield="true"> Mask of custom format bits per custom channel. Must be shifted by one of the SHIFT constants. See [enum ArrayCustomFormat]. </constant> - <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat"> + <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat" is_bitfield="true"> Shift of first compress flag. Compress flags should be passed to [method ArrayMesh.add_surface_from_arrays] and [method SurfaceTool.commit]. </constant> - <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat" is_bitfield="true"> Flag used to mark that the array contains 2D vertices. </constant> - <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat" is_bitfield="true"> Flag indices that the mesh data will use [code]GL_DYNAMIC_DRAW[/code] on GLES. Unused on Vulkan. </constant> - <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat" is_bitfield="true"> Flag used to mark that the mesh contains up to 8 bone influences per vertex. This flag indicates that [constant ARRAY_BONES] and [constant ARRAY_WEIGHTS] elements will have double length. </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index ab217abb23..7c93ba5dce 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -59,6 +59,13 @@ Returns the item's name. </description> </method> + <method name="get_item_navigation_layers" qualifiers="const"> + <return type="int" /> + <param index="0" name="id" type="int" /> + <description> + Returns the item's navigation layers bitmask. + </description> + </method> <method name="get_item_navigation_mesh" qualifiers="const"> <return type="NavigationMesh" /> <param index="0" name="id" type="int" /> @@ -126,6 +133,14 @@ This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name]. </description> </method> + <method name="set_item_navigation_layers"> + <return type="void" /> + <param index="0" name="id" type="int" /> + <param index="1" name="navigation_layers" type="int" /> + <description> + Sets the item's navigation layers bitmask. + </description> + </method> <method name="set_item_navigation_mesh"> <return type="void" /> <param index="0" name="id" type="int" /> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index 770a5dc5b0..31d347d76c 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -28,6 +28,12 @@ Returns which index the agent is currently on in the navigation path's [PackedVector2Array]. </description> </method> + <method name="get_current_navigation_result" qualifiers="const"> + <return type="NavigationPathQueryResult2D" /> + <description> + Returns the path query result for the path the agent is currently following. + </description> + </method> <method name="get_final_location"> <return type="Vector2" /> <description> @@ -122,6 +128,9 @@ <member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0"> The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. </member> + <member name="path_metadata_flags" type="int" setter="set_path_metadata_flags" getter="get_path_metadata_flags" enum="NavigationPathQueryParameters2D.PathMetadataFlags" default="7"> + Additional information to return with the navigation path. + </member> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0"> The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_distance]). Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size. @@ -137,6 +146,17 @@ </member> </members> <signals> + <signal name="link_reached"> + <param index="0" name="details" type="Dictionary" /> + <description> + Notifies when a navigation link has been reached. + The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + - [code]location[/code]: The start location of the link that was reached. + - [code]type[/code]: Always [constant NavigationPathQueryResult2D.PATH_SEGMENT_TYPE_LINK]. + - [code]rid[/code]: The [RID] of the link. + - [code]owner[/code]: The object which manages the link (usually [NavigationLink2D]). + </description> + </signal> <signal name="navigation_finished"> <description> Notifies when the final location is reached. @@ -158,5 +178,16 @@ Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. Only emitted when [member avoidance_enabled] is true. </description> </signal> + <signal name="waypoint_reached"> + <param index="0" name="details" type="Dictionary" /> + <description> + Notifies when a waypoint along the path has been reached. + The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + - [code]location[/code]: The location of the waypoint that was reached. + - [code]type[/code]: The type of navigation primitive (region or link) that contains this waypoint. + - [code]rid[/code]: The [RID] of the containing navigation primitive (region or link). + - [code]owner[/code]: The object which manages the containing navigation primitive (region or link). + </description> + </signal> </signals> </class> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index d9a1235bdd..c3f4809b5e 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -28,6 +28,12 @@ Returns which index the agent is currently on in the navigation path's [PackedVector3Array]. </description> </method> + <method name="get_current_navigation_result" qualifiers="const"> + <return type="NavigationPathQueryResult3D" /> + <description> + Returns the path query result for the path the agent is currently following. + </description> + </method> <method name="get_final_location"> <return type="Vector3" /> <description> @@ -128,6 +134,9 @@ <member name="path_max_distance" type="float" setter="set_path_max_distance" getter="get_path_max_distance" default="3.0"> The maximum distance the agent is allowed away from the ideal path to the final location. This can happen due to trying to avoid collisions. When the maximum distance is exceeded, it recalculates the ideal path. </member> + <member name="path_metadata_flags" type="int" setter="set_path_metadata_flags" getter="get_path_metadata_flags" enum="NavigationPathQueryParameters3D.PathMetadataFlags" default="7"> + Additional information to return with the navigation path. + </member> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> The radius of the avoidance agent. This is the "body" of the avoidance agent and not the avoidance maneuver starting radius (which is controlled by [member neighbor_distance]). Does not affect normal pathfinding. To change an actor's pathfinding radius bake [NavigationMesh] resources with a different [member NavigationMesh.agent_radius] property and use different navigation maps for each actor size. @@ -143,6 +152,17 @@ </member> </members> <signals> + <signal name="link_reached"> + <param index="0" name="details" type="Dictionary" /> + <description> + Notifies when a navigation link has been reached. + The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + - [code]location[/code]: The start location of the link that was reached. + - [code]type[/code]: Always [constant NavigationPathQueryResult3D.PATH_SEGMENT_TYPE_LINK]. + - [code]rid[/code]: The [RID] of the link. + - [code]owner[/code]: The object which manages the link (usually [NavigationLink3D]). + </description> + </signal> <signal name="navigation_finished"> <description> Notifies when the final location is reached. @@ -164,5 +184,16 @@ Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. Only emitted when [member avoidance_enabled] is true. </description> </signal> + <signal name="waypoint_reached"> + <param index="0" name="details" type="Dictionary" /> + <description> + Notifies when a waypoint along the path has been reached. + The details dictionary may contain the following keys depending on the value of [member path_metadata_flags]: + - [code]location[/code]: The location of the waypoint that was reached. + - [code]type[/code]: The type of navigation primitive (region or link) that contains this waypoint. + - [code]rid[/code]: The [RID] of the containing navigation primitive (region or link). + - [code]owner[/code]: The object which manages the containing navigation primitive (region or link). + </description> + </signal> </signals> </class> diff --git a/doc/classes/NavigationPathQueryParameters2D.xml b/doc/classes/NavigationPathQueryParameters2D.xml index dff58fc1bd..511b2e7a8c 100644 --- a/doc/classes/NavigationPathQueryParameters2D.xml +++ b/doc/classes/NavigationPathQueryParameters2D.xml @@ -12,6 +12,9 @@ <member name="map" type="RID" setter="set_map" getter="get_map"> The navigation [code]map[/code] [RID] used in the path query. </member> + <member name="metadata_flags" type="int" setter="set_metadata_flags" getter="get_metadata_flags" enum="NavigationPathQueryParameters2D.PathMetadataFlags" default="7"> + Additional information to include with the navigation path. + </member> <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1"> The navigation layers the query will use (as a bitmask). </member> @@ -38,5 +41,20 @@ <constant name="PATH_POSTPROCESSING_EDGECENTERED" value="1" enum="PathPostProcessing"> Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. </constant> + <constant name="PATH_METADATA_INCLUDE_NONE" value="0" enum="PathMetadataFlags" is_bitfield="true"> + Don't include any additional metadata about the returned path. + </constant> + <constant name="PATH_METADATA_INCLUDE_TYPES" value="1" enum="PathMetadataFlags" is_bitfield="true"> + Include the type of navigation primitive (region or link) that each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_RIDS" value="2" enum="PathMetadataFlags" is_bitfield="true"> + Include the [RID]s of the regions and links that each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_OWNERS" value="4" enum="PathMetadataFlags" is_bitfield="true"> + Include the [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_ALL" value="7" enum="PathMetadataFlags" is_bitfield="true"> + Include all available metadata about the returned path. + </constant> </constants> </class> diff --git a/doc/classes/NavigationPathQueryParameters3D.xml b/doc/classes/NavigationPathQueryParameters3D.xml index 46a35b1071..b5031f60f2 100644 --- a/doc/classes/NavigationPathQueryParameters3D.xml +++ b/doc/classes/NavigationPathQueryParameters3D.xml @@ -12,6 +12,9 @@ <member name="map" type="RID" setter="set_map" getter="get_map"> The navigation [code]map[/code] [RID] used in the path query. </member> + <member name="metadata_flags" type="int" setter="set_metadata_flags" getter="get_metadata_flags" enum="NavigationPathQueryParameters3D.PathMetadataFlags" default="7"> + Additional information to include with the navigation path. + </member> <member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1"> The navigation layers the query will use (as a bitmask). </member> @@ -38,5 +41,20 @@ <constant name="PATH_POSTPROCESSING_EDGECENTERED" value="1" enum="PathPostProcessing"> Centers every path position in the middle of the traveled navigation mesh polygon edge. This creates better paths for tile- or gridbased layouts that restrict the movement to the cells center. </constant> + <constant name="PATH_METADATA_INCLUDE_NONE" value="0" enum="PathMetadataFlags" is_bitfield="true"> + Don't include any additional metadata about the returned path. + </constant> + <constant name="PATH_METADATA_INCLUDE_TYPES" value="1" enum="PathMetadataFlags" is_bitfield="true"> + Include the type of navigation primitive (region or link) that each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_RIDS" value="2" enum="PathMetadataFlags" is_bitfield="true"> + Include the [RID]s of the regions and links that each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_OWNERS" value="4" enum="PathMetadataFlags" is_bitfield="true"> + Include the [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through. + </constant> + <constant name="PATH_METADATA_INCLUDE_ALL" value="7" enum="PathMetadataFlags" is_bitfield="true"> + Include all available metadata about the returned path. + </constant> </constants> </class> diff --git a/doc/classes/NavigationPathQueryResult2D.xml b/doc/classes/NavigationPathQueryResult2D.xml index 77b19b07b6..75f7cc47aa 100644 --- a/doc/classes/NavigationPathQueryResult2D.xml +++ b/doc/classes/NavigationPathQueryResult2D.xml @@ -20,5 +20,22 @@ <member name="path" type="PackedVector2Array" setter="set_path" getter="get_path" default="PackedVector2Array()"> The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by [method NavigationServer2D.map_get_path]. </member> + <member name="path_owner_ids" type="PackedInt64Array" setter="set_path_owner_ids" getter="get_path_owner_ids" default="PackedInt64Array()"> + The [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through. + </member> + <member name="path_rids" type="RID[]" setter="set_path_rids" getter="get_path_rids" default="[]"> + The [RID]s of the regions and links that each point of the path goes through. + </member> + <member name="path_types" type="PackedInt32Array" setter="set_path_types" getter="get_path_types" default="PackedInt32Array()"> + The type of navigation primitive (region or link) that each point of the path goes through. + </member> </members> + <constants> + <constant name="PATH_SEGMENT_TYPE_REGION" value="0" enum="PathSegmentType"> + This segment of the path goes through a region. + </constant> + <constant name="PATH_SEGMENT_TYPE_LINK" value="1" enum="PathSegmentType"> + This segment of the path goes through a link. + </constant> + </constants> </class> diff --git a/doc/classes/NavigationPathQueryResult3D.xml b/doc/classes/NavigationPathQueryResult3D.xml index 6c553bf36b..03d41cb230 100644 --- a/doc/classes/NavigationPathQueryResult3D.xml +++ b/doc/classes/NavigationPathQueryResult3D.xml @@ -20,5 +20,22 @@ <member name="path" type="PackedVector3Array" setter="set_path" getter="get_path" default="PackedVector3Array()"> The resulting path array from the navigation query. All path array positions are in global coordinates. Without customized query parameters this is the same path as returned by [method NavigationServer3D.map_get_path]. </member> + <member name="path_owner_ids" type="PackedInt64Array" setter="set_path_owner_ids" getter="get_path_owner_ids" default="PackedInt64Array()"> + The [code]ObjectID[/code]s of the [Object]s which manage the regions and links each point of the path goes through. + </member> + <member name="path_rids" type="RID[]" setter="set_path_rids" getter="get_path_rids" default="[]"> + The [RID]s of the regions and links that each point of the path goes through. + </member> + <member name="path_types" type="PackedInt32Array" setter="set_path_types" getter="get_path_types" default="PackedInt32Array()"> + The type of navigation primitive (region or link) that each point of the path goes through. + </member> </members> + <constants> + <constant name="PATH_SEGMENT_TYPE_REGION" value="0" enum="PathSegmentType"> + This segment of the path goes through a region. + </constant> + <constant name="PATH_SEGMENT_TYPE_LINK" value="1" enum="PathSegmentType"> + This segment of the path goes through a link. + </constant> + </constants> </class> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index 32e48cde54..b704f39c92 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -17,7 +17,7 @@ <link title="2D Navigation Demo">https://godotengine.org/asset-library/asset/117</link> </tutorials> <methods> - <method name="agent_create" qualifiers="const"> + <method name="agent_create"> <return type="RID" /> <description> Creates the agent. @@ -37,7 +37,7 @@ Returns true if the map got changed the previous frame. </description> </method> - <method name="agent_set_callback" qualifiers="const"> + <method name="agent_set_callback"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="object_id" type="int" /> @@ -48,7 +48,7 @@ [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]0[/code] ObjectID as the [param object_id]. </description> </method> - <method name="agent_set_map" qualifiers="const"> + <method name="agent_set_map"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="map" type="RID" /> @@ -56,7 +56,7 @@ Puts the agent in the map. </description> </method> - <method name="agent_set_max_neighbors" qualifiers="const"> + <method name="agent_set_max_neighbors"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="count" type="int" /> @@ -64,7 +64,7 @@ Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> - <method name="agent_set_max_speed" qualifiers="const"> + <method name="agent_set_max_speed"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="max_speed" type="float" /> @@ -72,7 +72,7 @@ Sets the maximum speed of the agent. Must be positive. </description> </method> - <method name="agent_set_neighbor_distance" qualifiers="const"> + <method name="agent_set_neighbor_distance"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="distance" type="float" /> @@ -80,7 +80,7 @@ Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> - <method name="agent_set_position" qualifiers="const"> + <method name="agent_set_position"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="position" type="Vector2" /> @@ -88,7 +88,7 @@ Sets the position of the agent in world space. </description> </method> - <method name="agent_set_radius" qualifiers="const"> + <method name="agent_set_radius"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="radius" type="float" /> @@ -96,7 +96,7 @@ Sets the radius of the agent. </description> </method> - <method name="agent_set_target_velocity" qualifiers="const"> + <method name="agent_set_target_velocity"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="target_velocity" type="Vector2" /> @@ -104,7 +104,7 @@ Sets the new target velocity. </description> </method> - <method name="agent_set_time_horizon" qualifiers="const"> + <method name="agent_set_time_horizon"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="time" type="float" /> @@ -112,7 +112,7 @@ The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. </description> </method> - <method name="agent_set_velocity" qualifiers="const"> + <method name="agent_set_velocity"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="velocity" type="Vector2" /> @@ -120,7 +120,7 @@ Sets the current velocity of the agent. </description> </method> - <method name="free_rid" qualifiers="const"> + <method name="free_rid"> <return type="void" /> <param index="0" name="rid" type="RID" /> <description> @@ -133,7 +133,7 @@ Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. </description> </method> - <method name="link_create" qualifiers="const"> + <method name="link_create"> <return type="RID" /> <description> Create a new link between two locations on a map. @@ -195,7 +195,7 @@ Returns whether this [code]link[/code] can be travelled in both directions. </description> </method> - <method name="link_set_bidirectional" qualifiers="const"> + <method name="link_set_bidirectional"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="bidirectional" type="bool" /> @@ -203,7 +203,7 @@ Sets whether this [code]link[/code] can be travelled in both directions. </description> </method> - <method name="link_set_end_location" qualifiers="const"> + <method name="link_set_end_location"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="location" type="Vector2" /> @@ -211,7 +211,7 @@ Sets the exit location for the [code]link[/code]. </description> </method> - <method name="link_set_enter_cost" qualifiers="const"> + <method name="link_set_enter_cost"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="enter_cost" type="float" /> @@ -219,7 +219,7 @@ Sets the [code]enter_cost[/code] for this [code]link[/code]. </description> </method> - <method name="link_set_map" qualifiers="const"> + <method name="link_set_map"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="map" type="RID" /> @@ -227,7 +227,7 @@ Sets the navigation map [RID] for the link. </description> </method> - <method name="link_set_navigation_layers" qualifiers="const"> + <method name="link_set_navigation_layers"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="navigation_layers" type="int" /> @@ -235,7 +235,7 @@ Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer2D.map_get_path]). </description> </method> - <method name="link_set_owner_id" qualifiers="const"> + <method name="link_set_owner_id"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="owner_id" type="int" /> @@ -243,7 +243,7 @@ Set the [code]ObjectID[/code] of the object which manages this link. </description> </method> - <method name="link_set_start_location" qualifiers="const"> + <method name="link_set_start_location"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="location" type="Vector2" /> @@ -251,7 +251,7 @@ Sets the entry location for this [code]link[/code]. </description> </method> - <method name="link_set_travel_cost" qualifiers="const"> + <method name="link_set_travel_cost"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="travel_cost" type="float" /> @@ -259,7 +259,7 @@ Sets the [code]travel_cost[/code] for this [code]link[/code]. </description> </method> - <method name="map_create" qualifiers="const"> + <method name="map_create"> <return type="RID" /> <description> Create a new map. @@ -351,7 +351,7 @@ Returns true if the map is active. </description> </method> - <method name="map_set_active" qualifiers="const"> + <method name="map_set_active"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="active" type="bool" /> @@ -359,7 +359,7 @@ Sets the map active. </description> </method> - <method name="map_set_cell_size" qualifiers="const"> + <method name="map_set_cell_size"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="cell_size" type="float" /> @@ -367,7 +367,7 @@ Set the map cell size used to weld the navigation mesh polygons. </description> </method> - <method name="map_set_edge_connection_margin" qualifiers="const"> + <method name="map_set_edge_connection_margin"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="margin" type="float" /> @@ -375,7 +375,7 @@ Set the map edge connection margin used to weld the compatible region edges. </description> </method> - <method name="map_set_link_connection_radius" qualifiers="const"> + <method name="map_set_link_connection_radius"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="radius" type="float" /> @@ -391,7 +391,7 @@ Queries a path in a given navigation map. Start and target position and other parameters are defined through [NavigationPathQueryParameters2D]. Updates the provided [NavigationPathQueryResult2D] result object with the path among other results requested by the query. </description> </method> - <method name="region_create" qualifiers="const"> + <method name="region_create"> <return type="RID" /> <description> Creates a new region. @@ -465,7 +465,7 @@ [b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. </description> </method> - <method name="region_set_enter_cost" qualifiers="const"> + <method name="region_set_enter_cost"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="enter_cost" type="float" /> @@ -473,7 +473,7 @@ Sets the [param enter_cost] for this [param region]. </description> </method> - <method name="region_set_map" qualifiers="const"> + <method name="region_set_map"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="map" type="RID" /> @@ -481,7 +481,7 @@ Sets the map for the region. </description> </method> - <method name="region_set_navigation_layers" qualifiers="const"> + <method name="region_set_navigation_layers"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="navigation_layers" type="int" /> @@ -489,7 +489,7 @@ Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]). </description> </method> - <method name="region_set_navigation_polygon" qualifiers="const"> + <method name="region_set_navigation_polygon"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="navigation_polygon" type="NavigationPolygon" /> @@ -497,7 +497,7 @@ Sets the [param navigation_polygon] for the region. </description> </method> - <method name="region_set_owner_id" qualifiers="const"> + <method name="region_set_owner_id"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="owner_id" type="int" /> @@ -505,7 +505,7 @@ Set the [code]ObjectID[/code] of the object which manages this region. </description> </method> - <method name="region_set_transform" qualifiers="const"> + <method name="region_set_transform"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="transform" type="Transform2D" /> @@ -513,7 +513,7 @@ Sets the global transformation for the region. </description> </method> - <method name="region_set_travel_cost" qualifiers="const"> + <method name="region_set_travel_cost"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="travel_cost" type="float" /> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index c156dfac16..c38f6e0c04 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -17,7 +17,7 @@ <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link> </tutorials> <methods> - <method name="agent_create" qualifiers="const"> + <method name="agent_create"> <return type="RID" /> <description> Creates the agent. @@ -37,7 +37,7 @@ Returns true if the map got changed the previous frame. </description> </method> - <method name="agent_set_callback" qualifiers="const"> + <method name="agent_set_callback"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="object_id" type="int" /> @@ -48,7 +48,7 @@ [b]Note:[/b] Created callbacks are always processed independently of the SceneTree state as long as the agent is on a navigation map and not freed. To disable the dispatch of a callback from an agent use [method agent_set_callback] again with a [code]0[/code] ObjectID as the [param object_id]. </description> </method> - <method name="agent_set_map" qualifiers="const"> + <method name="agent_set_map"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="map" type="RID" /> @@ -56,7 +56,7 @@ Puts the agent in the map. </description> </method> - <method name="agent_set_max_neighbors" qualifiers="const"> + <method name="agent_set_max_neighbors"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="count" type="int" /> @@ -64,7 +64,7 @@ Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> - <method name="agent_set_max_speed" qualifiers="const"> + <method name="agent_set_max_speed"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="max_speed" type="float" /> @@ -72,7 +72,7 @@ Sets the maximum speed of the agent. Must be positive. </description> </method> - <method name="agent_set_neighbor_distance" qualifiers="const"> + <method name="agent_set_neighbor_distance"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="distance" type="float" /> @@ -80,7 +80,7 @@ Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> - <method name="agent_set_position" qualifiers="const"> + <method name="agent_set_position"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="position" type="Vector3" /> @@ -88,7 +88,7 @@ Sets the position of the agent in world space. </description> </method> - <method name="agent_set_radius" qualifiers="const"> + <method name="agent_set_radius"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="radius" type="float" /> @@ -96,7 +96,7 @@ Sets the radius of the agent. </description> </method> - <method name="agent_set_target_velocity" qualifiers="const"> + <method name="agent_set_target_velocity"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="target_velocity" type="Vector3" /> @@ -104,7 +104,7 @@ Sets the new target velocity. </description> </method> - <method name="agent_set_time_horizon" qualifiers="const"> + <method name="agent_set_time_horizon"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="time" type="float" /> @@ -112,7 +112,7 @@ The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. </description> </method> - <method name="agent_set_velocity" qualifiers="const"> + <method name="agent_set_velocity"> <return type="void" /> <param index="0" name="agent" type="RID" /> <param index="1" name="velocity" type="Vector3" /> @@ -120,7 +120,7 @@ Sets the current velocity of the agent. </description> </method> - <method name="free_rid" qualifiers="const"> + <method name="free_rid"> <return type="void" /> <param index="0" name="rid" type="RID" /> <description> @@ -133,7 +133,7 @@ Returns all created navigation map [RID]s on the NavigationServer. This returns both 2D and 3D created navigation maps as there is technically no distinction between them. </description> </method> - <method name="link_create" qualifiers="const"> + <method name="link_create"> <return type="RID" /> <description> Create a new link between two locations on a map. @@ -195,7 +195,7 @@ Returns whether this [code]link[/code] can be travelled in both directions. </description> </method> - <method name="link_set_bidirectional" qualifiers="const"> + <method name="link_set_bidirectional"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="bidirectional" type="bool" /> @@ -203,7 +203,7 @@ Sets whether this [code]link[/code] can be travelled in both directions. </description> </method> - <method name="link_set_end_location" qualifiers="const"> + <method name="link_set_end_location"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="location" type="Vector3" /> @@ -211,7 +211,7 @@ Sets the exit location for the [code]link[/code]. </description> </method> - <method name="link_set_enter_cost" qualifiers="const"> + <method name="link_set_enter_cost"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="enter_cost" type="float" /> @@ -219,7 +219,7 @@ Sets the [code]enter_cost[/code] for this [code]link[/code]. </description> </method> - <method name="link_set_map" qualifiers="const"> + <method name="link_set_map"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="map" type="RID" /> @@ -227,7 +227,7 @@ Sets the navigation map [RID] for the link. </description> </method> - <method name="link_set_navigation_layers" qualifiers="const"> + <method name="link_set_navigation_layers"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="navigation_layers" type="int" /> @@ -235,7 +235,7 @@ Set the links's navigation layers. This allows selecting links from a path request (when using [method NavigationServer3D.map_get_path]). </description> </method> - <method name="link_set_owner_id" qualifiers="const"> + <method name="link_set_owner_id"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="owner_id" type="int" /> @@ -243,7 +243,7 @@ Set the [code]ObjectID[/code] of the object which manages this link. </description> </method> - <method name="link_set_start_location" qualifiers="const"> + <method name="link_set_start_location"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="location" type="Vector3" /> @@ -251,7 +251,7 @@ Sets the entry location for this [code]link[/code]. </description> </method> - <method name="link_set_travel_cost" qualifiers="const"> + <method name="link_set_travel_cost"> <return type="void" /> <param index="0" name="link" type="RID" /> <param index="1" name="travel_cost" type="float" /> @@ -259,7 +259,7 @@ Sets the [code]travel_cost[/code] for this [code]link[/code]. </description> </method> - <method name="map_create" qualifiers="const"> + <method name="map_create"> <return type="RID" /> <description> Create a new map. @@ -376,7 +376,7 @@ Returns true if the map is active. </description> </method> - <method name="map_set_active" qualifiers="const"> + <method name="map_set_active"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="active" type="bool" /> @@ -384,7 +384,7 @@ Sets the map active. </description> </method> - <method name="map_set_cell_size" qualifiers="const"> + <method name="map_set_cell_size"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="cell_size" type="float" /> @@ -392,7 +392,7 @@ Set the map cell size used to weld the navigation mesh polygons. </description> </method> - <method name="map_set_edge_connection_margin" qualifiers="const"> + <method name="map_set_edge_connection_margin"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="margin" type="float" /> @@ -400,7 +400,7 @@ Set the map edge connection margin used to weld the compatible region edges. </description> </method> - <method name="map_set_link_connection_radius" qualifiers="const"> + <method name="map_set_link_connection_radius"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="radius" type="float" /> @@ -408,7 +408,7 @@ Set the map's link connection radius used to connect links to navigation polygons. </description> </method> - <method name="map_set_up" qualifiers="const"> + <method name="map_set_up"> <return type="void" /> <param index="0" name="map" type="RID" /> <param index="1" name="up" type="Vector3" /> @@ -433,7 +433,7 @@ Queries a path in a given navigation map. Start and target position and other parameters are defined through [NavigationPathQueryParameters3D]. Updates the provided [NavigationPathQueryResult3D] result object with the path among other results requested by the query. </description> </method> - <method name="region_bake_navigation_mesh" qualifiers="const"> + <method name="region_bake_navigation_mesh"> <return type="void" /> <param index="0" name="navigation_mesh" type="NavigationMesh" /> <param index="1" name="root_node" type="Node" /> @@ -441,7 +441,7 @@ Bakes the [param navigation_mesh] with bake source geometry collected starting from the [param root_node]. </description> </method> - <method name="region_create" qualifiers="const"> + <method name="region_create"> <return type="RID" /> <description> Creates a new region. @@ -515,7 +515,7 @@ [b]Note:[/b] If navigation meshes from different navigation regions overlap (which should be avoided in general) the result might not be what is expected. </description> </method> - <method name="region_set_enter_cost" qualifiers="const"> + <method name="region_set_enter_cost"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="enter_cost" type="float" /> @@ -523,7 +523,7 @@ Sets the [param enter_cost] for this [param region]. </description> </method> - <method name="region_set_map" qualifiers="const"> + <method name="region_set_map"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="map" type="RID" /> @@ -531,7 +531,7 @@ Sets the map for the region. </description> </method> - <method name="region_set_navigation_layers" qualifiers="const"> + <method name="region_set_navigation_layers"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="navigation_layers" type="int" /> @@ -539,7 +539,7 @@ Set the region's navigation layers. This allows selecting regions from a path request (when using [method NavigationServer3D.map_get_path]). </description> </method> - <method name="region_set_navigation_mesh" qualifiers="const"> + <method name="region_set_navigation_mesh"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="navigation_mesh" type="NavigationMesh" /> @@ -547,7 +547,7 @@ Sets the navigation mesh for the region. </description> </method> - <method name="region_set_owner_id" qualifiers="const"> + <method name="region_set_owner_id"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="owner_id" type="int" /> @@ -555,7 +555,7 @@ Set the [code]ObjectID[/code] of the object which manages this region. </description> </method> - <method name="region_set_transform" qualifiers="const"> + <method name="region_set_transform"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="transform" type="Transform3D" /> @@ -563,7 +563,7 @@ Sets the global transformation for the region. </description> </method> - <method name="region_set_travel_cost" qualifiers="const"> + <method name="region_set_travel_cost"> <return type="void" /> <param index="0" name="region" type="RID" /> <param index="1" name="travel_cost" type="float" /> @@ -571,7 +571,7 @@ Sets the [param travel_cost] for this [param region]. </description> </method> - <method name="set_active" qualifiers="const"> + <method name="set_active"> <return type="void" /> <param index="0" name="active" type="bool" /> <description> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 24df5977f9..0ccc4155b4 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -612,6 +612,15 @@ Removes a node from the [param group]. Does nothing if the node is not in the [param group]. See notes in the description, and the group methods in [SceneTree]. </description> </method> + <method name="reparent"> + <return type="void" /> + <param index="0" name="new_parent" type="Node" /> + <param index="1" name="keep_global_transform" type="bool" default="true" /> + <description> + Changes the parent of this [Node] to the [param new_parent]. The node needs to already have a parent. + If [param keep_global_transform] is [code]true[/code], the node's global transform will be preserved if supported. [Node2D], [Node3D] and [Control] support this argument (but [Control] keeps only position). + </description> + </method> <method name="replace_by"> <return type="void" /> <param index="0" name="node" type="Node" /> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 0efc6ab399..ff4982e2fb 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -654,63 +654,6 @@ <constant name="RENDERING_DRIVER_OPENGL3" value="1" enum="RenderingDriver"> The OpenGL 3 rendering driver. It uses OpenGL 3.3 Core Profile on desktop platforms, OpenGL ES 3.0 on mobile devices, and WebGL 2.0 on Web. </constant> - <constant name="DAY_SUNDAY" value="0" enum="Weekday"> - Sunday. - </constant> - <constant name="DAY_MONDAY" value="1" enum="Weekday"> - Monday. - </constant> - <constant name="DAY_TUESDAY" value="2" enum="Weekday"> - Tuesday. - </constant> - <constant name="DAY_WEDNESDAY" value="3" enum="Weekday"> - Wednesday. - </constant> - <constant name="DAY_THURSDAY" value="4" enum="Weekday"> - Thursday. - </constant> - <constant name="DAY_FRIDAY" value="5" enum="Weekday"> - Friday. - </constant> - <constant name="DAY_SATURDAY" value="6" enum="Weekday"> - Saturday. - </constant> - <constant name="MONTH_JANUARY" value="1" enum="Month"> - January. - </constant> - <constant name="MONTH_FEBRUARY" value="2" enum="Month"> - February. - </constant> - <constant name="MONTH_MARCH" value="3" enum="Month"> - March. - </constant> - <constant name="MONTH_APRIL" value="4" enum="Month"> - April. - </constant> - <constant name="MONTH_MAY" value="5" enum="Month"> - May. - </constant> - <constant name="MONTH_JUNE" value="6" enum="Month"> - June. - </constant> - <constant name="MONTH_JULY" value="7" enum="Month"> - July. - </constant> - <constant name="MONTH_AUGUST" value="8" enum="Month"> - August. - </constant> - <constant name="MONTH_SEPTEMBER" value="9" enum="Month"> - September. - </constant> - <constant name="MONTH_OCTOBER" value="10" enum="Month"> - October. - </constant> - <constant name="MONTH_NOVEMBER" value="11" enum="Month"> - November. - </constant> - <constant name="MONTH_DECEMBER" value="12" enum="Month"> - December. - </constant> <constant name="SYSTEM_DIR_DESKTOP" value="0" enum="SystemDir"> Desktop directory path. </constant> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index a58a6249ae..fdf0fff0fb 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -94,6 +94,8 @@ <return type="int" /> <param index="0" name="from_last" type="bool" default="false" /> <description> + Returns the index of the first item which is not disabled, or marked as a separator. If [param from_last] is [code]true[/code], the items will be searched in reverse order. + Returns [code]-1[/code] if no item is found. </description> </method> <method name="get_selected_id" qualifiers="const"> @@ -111,6 +113,7 @@ <method name="has_selectable_items" qualifiers="const"> <return type="bool" /> <description> + Returns [code]true[/code] if this button contains at least one item which is not disabled, or marked as a separator. </description> </method> <method name="is_item_disabled" qualifiers="const"> @@ -124,6 +127,7 @@ <return type="bool" /> <param index="0" name="idx" type="int" /> <description> + Returns [code]true[/code] if the item at index [param idx] is marked as a separator. </description> </method> <method name="remove_item"> diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml index a809384642..edd219e66e 100644 --- a/doc/classes/PhysicsDirectBodyState3D.xml +++ b/doc/classes/PhysicsDirectBodyState3D.xml @@ -152,10 +152,10 @@ </description> </method> <method name="get_contact_impulse" qualifiers="const"> - <return type="float" /> + <return type="Vector3" /> <param index="0" name="contact_idx" type="int" /> <description> - Impulse created by the contact. Only implemented for Bullet physics. + Impulse created by the contact. </description> </method> <method name="get_contact_local_normal" qualifiers="const"> diff --git a/doc/classes/PhysicsDirectBodyState3DExtension.xml b/doc/classes/PhysicsDirectBodyState3DExtension.xml index 4432f89b9d..35cf4d4dd5 100644 --- a/doc/classes/PhysicsDirectBodyState3DExtension.xml +++ b/doc/classes/PhysicsDirectBodyState3DExtension.xml @@ -131,7 +131,7 @@ </description> </method> <method name="_get_contact_impulse" qualifiers="virtual const"> - <return type="float" /> + <return type="Vector3" /> <param index="0" name="contact_idx" type="int" /> <description> </description> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index 18ac8a11df..f1316fa991 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -736,6 +736,14 @@ <description> </description> </method> + <method name="joint_disable_collisions_between_bodies"> + <return type="void" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="disable" type="bool" /> + <description> + Sets whether the bodies attached to the [Joint2D] will collide with each other. + </description> + </method> <method name="joint_get_param" qualifiers="const"> <return type="float" /> <param index="0" name="joint" type="RID" /> @@ -751,6 +759,13 @@ Returns a joint's type (see [enum JointType]). </description> </method> + <method name="joint_is_disabled_collisions_between_bodies" qualifiers="const"> + <return type="bool" /> + <param index="0" name="joint" type="RID" /> + <description> + Returns whether the bodies attached to the [Joint2D] will collide with each other. + </description> + </method> <method name="joint_make_damped_spring"> <return type="void" /> <param index="0" name="joint" type="RID" /> @@ -790,6 +805,23 @@ Sets a joint parameter. See [enum JointParam] for a list of available parameters. </description> </method> + <method name="pin_joint_get_param" qualifiers="const"> + <return type="float" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="param" type="int" enum="PhysicsServer2D.PinJointParam" /> + <description> + Returns the value of a pin joint parameter. See [enum PinJointParam] for a list of available parameters. + </description> + </method> + <method name="pin_joint_set_param"> + <return type="void" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="param" type="int" enum="PhysicsServer2D.PinJointParam" /> + <param index="2" name="value" type="float" /> + <description> + Sets a pin joint parameter. See [enum PinJointParam] for a list of available parameters. + </description> + </method> <method name="rectangle_shape_create"> <return type="RID" /> <description> diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 95f7fb69a2..e62bda0dd3 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -815,6 +815,14 @@ <description> </description> </method> + <method name="joint_disable_collisions_between_bodies"> + <return type="void" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="disable" type="bool" /> + <description> + Sets whether the bodies attached to the [Joint3D] will collide with each other. + </description> + </method> <method name="joint_get_solver_priority" qualifiers="const"> <return type="int" /> <param index="0" name="joint" type="RID" /> @@ -829,6 +837,13 @@ Returns the type of the Joint3D. </description> </method> + <method name="joint_is_disabled_collisions_between_bodies" qualifiers="const"> + <return type="bool" /> + <param index="0" name="joint" type="RID" /> + <description> + Returns whether the bodies attached to the [Joint3D] will collide with each other. + </description> + </method> <method name="joint_make_cone_twist"> <return type="void" /> <param index="0" name="joint" type="RID" /> diff --git a/doc/classes/PhysicsServer3DExtension.xml b/doc/classes/PhysicsServer3DExtension.xml index 1e9df54de5..d45cb17510 100644 --- a/doc/classes/PhysicsServer3DExtension.xml +++ b/doc/classes/PhysicsServer3DExtension.xml @@ -772,6 +772,13 @@ <description> </description> </method> + <method name="_joint_disable_collisions_between_bodies" qualifiers="virtual"> + <return type="void" /> + <param index="0" name="joint" type="RID" /> + <param index="1" name="disable" type="bool" /> + <description> + </description> + </method> <method name="_joint_get_solver_priority" qualifiers="virtual const"> <return type="int" /> <param index="0" name="joint" type="RID" /> @@ -784,6 +791,12 @@ <description> </description> </method> + <method name="_joint_is_disabled_collisions_between_bodies" qualifiers="virtual const"> + <return type="bool" /> + <param index="0" name="joint" type="RID" /> + <description> + </description> + </method> <method name="_joint_make_cone_twist" qualifiers="virtual"> <return type="void" /> <param index="0" name="joint" type="RID" /> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index b80d6b2216..cfcfca9880 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -70,15 +70,18 @@ <method name="get_setting" qualifiers="const"> <return type="Variant" /> <param index="0" name="name" type="String" /> + <param index="1" name="default_value" type="Variant" default="null" /> <description> - Returns the value of a setting. + Returns the value of the setting identified by [param name]. If the setting doesn't exist and [param default_value] is specified, the value of [param default_value] is returned. Otherwise, [code]null[/code] is returned. [b]Example:[/b] [codeblocks] [gdscript] print(ProjectSettings.get_setting("application/config/name")) + print(ProjectSettings.get_setting("application/config/custom_description", "No description specified.")) [/gdscript] [csharp] GD.Print(ProjectSettings.GetSetting("application/config/name")); + GD.Print(ProjectSettings.GetSetting("application/config/custom_description", "No description specified.")); [/csharp] [/codeblocks] </description> @@ -461,9 +464,6 @@ <member name="debug/gdscript/warnings/unused_variable" type="int" setter="" getter="" default="1"> When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when a local variable is unused. </member> - <member name="debug/gdscript/warnings/void_assignment" type="int" setter="" getter="" default="1"> - When set to [code]warn[/code] or [code]error[/code], produces a warning or an error respectively when assigning the result of a function that returns [code]void[/code] to a variable. - </member> <member name="debug/settings/crash_handler/message" type="String" setter="" getter="" default=""Please include this when reporting the bug to the project developer.""> Message to be displayed before the backtrace when the engine crashes. By default, this message is only used in exported projects due to the editor-only override applied to this setting. </member> @@ -596,6 +596,9 @@ Main window content is expanded to the full size of the window. Unlike a borderless window, the frame is left intact and can be used to resize the window, and the title bar is transparent, but has minimize/maximize/close buttons. [b]Note:[/b] This setting is implemented only on macOS. </member> + <member name="display/window/size/initial_screen" type="int" setter="" getter="" default="-2"> + Main window initial screen. + </member> <member name="display/window/size/mode" type="int" setter="" getter="" default="0"> Main window mode. See [enum DisplayServer.WindowMode] for possible values and how each mode behaves. </member> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index 2dcfc90955..4803ea9bfb 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -62,7 +62,7 @@ <member name="rounded" type="bool" setter="set_use_rounded_values" getter="is_using_rounded_values" default="false"> If [code]true[/code], [code]value[/code] will always be rounded to the nearest integer. </member> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="0" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="0" /> <member name="step" type="float" setter="set_step" getter="get_step" default="0.01"> If greater than 0, [code]value[/code] will always be rounded to a multiple of [code]step[/code]. If [code]rounded[/code] is also [code]true[/code], [code]value[/code] will first be rounded to a multiple of [code]step[/code] then rounded to the nearest integer. </member> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 1cc52e6837..937d36d422 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -1586,6 +1586,15 @@ Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance3D.layers]. </description> </method> + <method name="instance_set_pivot_data"> + <return type="void" /> + <param index="0" name="instance" type="RID" /> + <param index="1" name="sorting_offset" type="float" /> + <param index="2" name="use_aabb_center" type="bool" /> + <description> + Sets the sorting offset and switches between using the bounding box or instance origin for depth sorting. + </description> + </method> <method name="instance_set_scenario"> <return type="void" /> <param index="0" name="instance" type="RID" /> @@ -1921,7 +1930,7 @@ <param index="2" name="arrays" type="Array" /> <param index="3" name="blend_shapes" type="Array" default="[]" /> <param index="4" name="lods" type="Dictionary" default="{}" /> - <param index="5" name="compress_format" type="int" default="0" /> + <param index="5" name="compress_format" type="int" enum="RenderingServer.ArrayFormat" default="0" /> <description> </description> </method> @@ -2023,14 +2032,14 @@ </method> <method name="mesh_surface_get_format_attribute_stride" qualifiers="const"> <return type="int" /> - <param index="0" name="format" type="int" /> + <param index="0" name="format" type="int" enum="RenderingServer.ArrayFormat" /> <param index="1" name="vertex_count" type="int" /> <description> </description> </method> <method name="mesh_surface_get_format_offset" qualifiers="const"> <return type="int" /> - <param index="0" name="format" type="int" /> + <param index="0" name="format" type="int" enum="RenderingServer.ArrayFormat" /> <param index="1" name="vertex_count" type="int" /> <param index="2" name="array_index" type="int" /> <description> @@ -2038,14 +2047,14 @@ </method> <method name="mesh_surface_get_format_skin_stride" qualifiers="const"> <return type="int" /> - <param index="0" name="format" type="int" /> + <param index="0" name="format" type="int" enum="RenderingServer.ArrayFormat" /> <param index="1" name="vertex_count" type="int" /> <description> </description> </method> <method name="mesh_surface_get_format_vertex_stride" qualifiers="const"> <return type="int" /> - <param index="0" name="format" type="int" /> + <param index="0" name="format" type="int" enum="RenderingServer.ArrayFormat" /> <param index="1" name="vertex_count" type="int" /> <description> </description> @@ -3736,65 +3745,65 @@ </constant> <constant name="ARRAY_CUSTOM_MAX" value="8" enum="ArrayCustomFormat"> </constant> - <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a vertex array. </constant> - <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_NORMAL" value="2" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a normal array. </constant> - <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TANGENT" value="4" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a tangent array. </constant> - <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_COLOR" value="8" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a color array. </constant> - <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TEX_UV" value="16" enum="ArrayFormat" is_bitfield="true"> Flag used to mark an UV coordinates array. </constant> - <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_TEX_UV2" value="32" enum="ArrayFormat" is_bitfield="true"> Flag used to mark an UV coordinates array for the second UV coordinates. </constant> - <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM0" value="64" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM1" value="128" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM2" value="256" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM3" value="512" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_BONES" value="1024" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a bone information array. </constant> - <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_WEIGHTS" value="2048" enum="ArrayFormat" is_bitfield="true"> Flag used to mark a weights array. </constant> - <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_INDEX" value="4096" enum="ArrayFormat" is_bitfield="true"> Flag used to mark an index array. </constant> - <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_BLEND_SHAPE_MASK" value="7" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM2_SHIFT" value="19" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM3_SHIFT" value="22" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat"> + <constant name="ARRAY_FORMAT_CUSTOM_MASK" value="7" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat"> + <constant name="ARRAY_COMPRESS_FLAGS_BASE" value="25" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="33554432" enum="ArrayFormat" is_bitfield="true"> Flag used to mark that the array contains 2D vertices. </constant> - <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_DYNAMIC_UPDATE" value="67108864" enum="ArrayFormat" is_bitfield="true"> </constant> - <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat"> + <constant name="ARRAY_FLAG_USE_8_BONE_WEIGHTS" value="134217728" enum="ArrayFormat" is_bitfield="true"> </constant> <constant name="PRIMITIVE_POINTS" value="0" enum="PrimitiveType"> Primitive to draw consists of points. diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index e4bc2db104..dd291a425d 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -378,12 +378,12 @@ Adds a [code][u][/code] tag to the tag stack. </description> </method> - <method name="remove_line"> + <method name="remove_paragraph"> <return type="bool" /> - <param index="0" name="line" type="int" /> + <param index="0" name="paragraph" type="int" /> <description> - Removes a line of content from the label. Returns [code]true[/code] if the line exists. - The [param line] argument is the index of the line to remove, it can take values in the interval [code][0, get_line_count() - 1][/code]. + Removes a paragraph of content from the label. Returns [code]true[/code] if the paragraph exists. + The [param paragraph] argument is the index of the paragraph to remove, it can take values in the interval [code][0, get_paragraph_count() - 1][/code]. </description> </method> <method name="scroll_to_line"> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index 7d63747bd2..e2db2166ed 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -60,7 +60,7 @@ <member name="select_all_on_focus" type="bool" setter="set_select_all_on_focus" getter="is_select_all_on_focus" default="false"> If [code]true[/code], the [SpinBox] will select the whole text when the [LineEdit] gains focus. Clicking the up and down arrows won't trigger this behavior. </member> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="1" /> <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" /> <member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default=""""> Adds the specified [code]suffix[/code] string after the numerical value of the [SpinBox]. diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index e9721495dd..87b823bd2a 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -20,8 +20,9 @@ <method name="add_frame"> <return type="void" /> <param index="0" name="anim" type="StringName" /> - <param index="1" name="frame" type="Texture2D" /> - <param index="2" name="at_position" type="int" default="-1" /> + <param index="1" name="texture" type="Texture2D" /> + <param index="2" name="duration" type="float" default="1.0" /> + <param index="3" name="at_position" type="int" default="-1" /> <description> Adds a frame to the given animation. </description> @@ -56,22 +57,34 @@ <return type="float" /> <param index="0" name="anim" type="StringName" /> <description> - The animation's speed in frames per second. + Returns the speed in frames per second for the [param anim] animation. </description> </method> - <method name="get_frame" qualifiers="const"> - <return type="Texture2D" /> + <method name="get_frame_count" qualifiers="const"> + <return type="int" /> + <param index="0" name="anim" type="StringName" /> + <description> + Returns the number of frames for the [param anim] animation. + </description> + </method> + <method name="get_frame_duration" qualifiers="const"> + <return type="float" /> <param index="0" name="anim" type="StringName" /> <param index="1" name="idx" type="int" /> <description> - Returns the animation's selected frame. + Returns a relative duration of the frame [param idx] in the [param anim] animation (defaults to [code]1.0[/code]). For example, a frame with a duration of [code]2.0[/code] is displayed twice as long as a frame with a duration of [code]1.0[/code]. You can calculate the absolute duration (in seconds) of a frame using the following formula: + [codeblock] + absolute_duration = relative_duration / (animation_fps * abs(speed_scale)) + [/codeblock] + In this example, [code]speed_scale[/code] refers to either [member AnimatedSprite2D.speed_scale] or [member AnimatedSprite3D.speed_scale]. </description> </method> - <method name="get_frame_count" qualifiers="const"> - <return type="int" /> + <method name="get_frame_texture" qualifiers="const"> + <return type="Texture2D" /> <param index="0" name="anim" type="StringName" /> + <param index="1" name="idx" type="int" /> <description> - Returns the number of frames in the animation. + Returns the texture of the frame [param idx] in the [param anim] animation. </description> </method> <method name="has_animation" qualifiers="const"> @@ -115,18 +128,19 @@ <method name="set_animation_speed"> <return type="void" /> <param index="0" name="anim" type="StringName" /> - <param index="1" name="speed" type="float" /> + <param index="1" name="fps" type="float" /> <description> - The animation's speed in frames per second. + Sets the speed for the [param anim] animation in frames per second. </description> </method> <method name="set_frame"> <return type="void" /> <param index="0" name="anim" type="StringName" /> <param index="1" name="idx" type="int" /> - <param index="2" name="txt" type="Texture2D" /> + <param index="2" name="texture" type="Texture2D" /> + <param index="3" name="duration" type="float" default="1.0" /> <description> - Sets the texture of the given frame. + Sets the texture and the duration of the frame [param idx] in the [param anim] animation. </description> </method> </methods> diff --git a/doc/classes/TabBar.xml b/doc/classes/TabBar.xml index 8d56cbda13..3c7191392a 100644 --- a/doc/classes/TabBar.xml +++ b/doc/classes/TabBar.xml @@ -17,6 +17,12 @@ Adds a new tab. </description> </method> + <method name="clear_tabs"> + <return type="void" /> + <description> + Clears all tabs. + </description> + </method> <method name="ensure_tab_visible"> <return type="void" /> <param index="0" name="idx" type="int" /> diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml index d7a9d06a15..f381ee771e 100644 --- a/doc/classes/TextureProgressBar.xml +++ b/doc/classes/TextureProgressBar.xml @@ -43,7 +43,7 @@ <member name="radial_initial_angle" type="float" setter="set_radial_initial_angle" getter="get_radial_initial_angle" default="0.0"> Starting angle for the fill of [member texture_progress] if [member fill_mode] is [constant FILL_CLOCKWISE] or [constant FILL_COUNTER_CLOCKWISE]. When the node's [code]value[/code] is equal to its [code]min_value[/code], the texture doesn't show up at all. When the [code]value[/code] increases, the texture fills and tends towards [member radial_fill_degrees]. </member> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="1" /> <member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" /> <member name="stretch_margin_bottom" type="int" setter="set_stretch_margin" getter="get_stretch_margin" default="0"> The height of the 9-patch's bottom row. A margin of 16 means the 9-slice's bottom corners and side will have a height of 16 pixels. You can set all 4 margin values individually to create panels with non-uniform borders. diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 8b537545bc..8176901ff7 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -321,7 +321,7 @@ <param index="1" name="y_sort_enabled" type="bool" /> <description> Enables or disables a layer's Y-sorting. If a layer is Y-sorted, the layer will behave as a CanvasItem node where each of its tile gets Y-sorted. - Y-sorted layers should usually be on different Z-index values than not Y-sorted layers, otherwise, each of those layer will be Y-sorted as whole with the Y-sorted one. This is usually an undesired behvaior. + Y-sorted layers should usually be on different Z-index values than not Y-sorted layers, otherwise, each of those layer will be Y-sorted as whole with the Y-sorted one. This is usually an undesired behavior. If [code]layer[/code] is negative, the layers are accessed from the last one. </description> </method> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 23d20a5a75..f3ed90a015 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -183,28 +183,6 @@ This can be seen as transforming with respect to the local frame. </description> </method> - <method name="set_rotation"> - <return type="void" /> - <param index="0" name="rotation" type="float" /> - <description> - Sets the transform's rotation (in radians). - </description> - </method> - <method name="set_scale"> - <return type="void" /> - <param index="0" name="scale" type="Vector2" /> - <description> - Sets the transform's scale. - [b]Note:[/b] Negative X scales in 2D are not decomposable from the transformation matrix. Due to the way scale is represented with transformation matrices in Godot, negative scales on the X axis will be changed to negative scales on the Y axis and a rotation of 180 degrees when decomposed. - </description> - </method> - <method name="set_skew"> - <return type="void" /> - <param index="0" name="skew" type="float" /> - <description> - Sets the transform's skew (in radians). - </description> - </method> <method name="translated" qualifiers="const"> <return type="Transform2D" /> <param index="0" name="offset" type="Vector2" /> diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml index f9baf194b7..41a87ba886 100644 --- a/doc/classes/VScrollBar.xml +++ b/doc/classes/VScrollBar.xml @@ -9,8 +9,8 @@ <tutorials> </tutorials> <members> - <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" default="0" /> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" /> + <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" enum="Control.SizeFlags" default="0" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="1" /> </members> <theme_items> <theme_item name="decrement" data_type="icon" type="Texture2D"> diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index 4bc98dea6f..2a5b5c1e0a 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -10,8 +10,8 @@ <tutorials> </tutorials> <members> - <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" default="0" /> - <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" default="1" /> + <member name="size_flags_horizontal" type="int" setter="set_h_size_flags" getter="get_h_size_flags" overrides="Control" enum="Control.SizeFlags" default="0" /> + <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" default="1" /> </members> <theme_items> <theme_item name="grabber_offset" data_type="constant" type="int" default="0"> diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 31811f817b..e069642e50 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -61,5 +61,12 @@ This object will only be visible for [Camera3D]s whose cull mask includes the render object this [VisualInstance3D] is set to. For [Light3D]s, this can be used to control which [VisualInstance3D]s are affected by a specific light. For [GPUParticles3D], this can be used to control which particles are effected by a specific attractor. For [Decal]s, this can be used to control which [VisualInstance3D]s are affected by a specific decal. </member> + <member name="sorting_offset" type="float" setter="set_sorting_offset" getter="get_sorting_offset" default="0.0"> + The sorting offset used by this [VisualInstance3D]. Adjusting it to a higher value will make the [VisualInstance3D] reliably draw on top of other [VisualInstance3D]s that are otherwise positioned at the same spot. + </member> + <member name="sorting_use_aabb_center" type="bool" setter="set_sorting_use_aabb_center" getter="is_sorting_use_aabb_center" default="true"> + If [code]true[/code], the object is sorted based on the [AABB] center. The object will be sorted based on the global position otherwise. + The [AABB] center based sorting is generally more accurate for 3D models. The position based sorting instead allows to better control the drawing order when working with [GPUParticles3D] and [CPUParticles3D]. + </member> </members> </class> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index a2089ae2b8..2d59810a5f 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -208,17 +208,19 @@ </constant> <constant name="VARYING_TYPE_INT" value="1" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_VECTOR_2D" value="2" enum="VaryingType"> + <constant name="VARYING_TYPE_UINT" value="2" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_VECTOR_3D" value="3" enum="VaryingType"> + <constant name="VARYING_TYPE_VECTOR_2D" value="3" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_VECTOR_4D" value="4" enum="VaryingType"> + <constant name="VARYING_TYPE_VECTOR_3D" value="4" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_BOOLEAN" value="5" enum="VaryingType"> + <constant name="VARYING_TYPE_VECTOR_4D" value="5" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_TRANSFORM" value="6" enum="VaryingType"> + <constant name="VARYING_TYPE_BOOLEAN" value="6" enum="VaryingType"> </constant> - <constant name="VARYING_TYPE_MAX" value="7" enum="VaryingType"> + <constant name="VARYING_TYPE_TRANSFORM" value="7" enum="VaryingType"> + </constant> + <constant name="VARYING_TYPE_MAX" value="8" enum="VaryingType"> </constant> <constant name="NODE_ID_INVALID" value="-1"> </constant> diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index 1f3397f39c..f95f871e52 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -72,25 +72,28 @@ <constant name="PORT_TYPE_SCALAR_INT" value="1" enum="PortType"> Integer scalar. Translated to [code]int[/code] type in shader code. </constant> - <constant name="PORT_TYPE_VECTOR_2D" value="2" enum="PortType"> + <constant name="PORT_TYPE_SCALAR_UINT" value="2" enum="PortType"> + Unsigned integer scalar. Translated to [code]uint[/code] type in shader code. + </constant> + <constant name="PORT_TYPE_VECTOR_2D" value="3" enum="PortType"> 2D vector of floating-point values. Translated to [code]vec2[/code] type in shader code. </constant> - <constant name="PORT_TYPE_VECTOR_3D" value="3" enum="PortType"> + <constant name="PORT_TYPE_VECTOR_3D" value="4" enum="PortType"> 3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code. </constant> - <constant name="PORT_TYPE_VECTOR_4D" value="4" enum="PortType"> + <constant name="PORT_TYPE_VECTOR_4D" value="5" enum="PortType"> 4D vector of floating-point values. Translated to [code]vec4[/code] type in shader code. </constant> - <constant name="PORT_TYPE_BOOLEAN" value="5" enum="PortType"> + <constant name="PORT_TYPE_BOOLEAN" value="6" enum="PortType"> Boolean type. Translated to [code]bool[/code] type in shader code. </constant> - <constant name="PORT_TYPE_TRANSFORM" value="6" enum="PortType"> + <constant name="PORT_TYPE_TRANSFORM" value="7" enum="PortType"> Transform type. Translated to [code]mat4[/code] type in shader code. </constant> - <constant name="PORT_TYPE_SAMPLER" value="7" enum="PortType"> + <constant name="PORT_TYPE_SAMPLER" value="8" enum="PortType"> Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes. </constant> - <constant name="PORT_TYPE_MAX" value="8" enum="PortType"> + <constant name="PORT_TYPE_MAX" value="9" enum="PortType"> Represents the size of the [enum PortType] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeClamp.xml b/doc/classes/VisualShaderNodeClamp.xml index 35f50a37c3..642a98ec8c 100644 --- a/doc/classes/VisualShaderNodeClamp.xml +++ b/doc/classes/VisualShaderNodeClamp.xml @@ -20,16 +20,19 @@ <constant name="OP_TYPE_INT" value="1" enum="OpType"> An integer scalar. </constant> - <constant name="OP_TYPE_VECTOR_2D" value="2" enum="OpType"> + <constant name="OP_TYPE_UINT" value="2" enum="OpType"> + An unsigned integer scalar. + </constant> + <constant name="OP_TYPE_VECTOR_2D" value="3" enum="OpType"> A 2D vector type. </constant> - <constant name="OP_TYPE_VECTOR_3D" value="3" enum="OpType"> + <constant name="OP_TYPE_VECTOR_3D" value="4" enum="OpType"> A 3D vector type. </constant> - <constant name="OP_TYPE_VECTOR_4D" value="4" enum="OpType"> + <constant name="OP_TYPE_VECTOR_4D" value="5" enum="OpType"> A 4D vector type. </constant> - <constant name="OP_TYPE_MAX" value="5" enum="OpType"> + <constant name="OP_TYPE_MAX" value="6" enum="OpType"> Represents the size of the [enum OpType] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml index 942ced2ebd..19ed42d1c7 100644 --- a/doc/classes/VisualShaderNodeCompare.xml +++ b/doc/classes/VisualShaderNodeCompare.xml @@ -26,22 +26,25 @@ <constant name="CTYPE_SCALAR_INT" value="1" enum="ComparisonType"> An integer scalar. </constant> - <constant name="CTYPE_VECTOR_2D" value="2" enum="ComparisonType"> + <constant name="CTYPE_SCALAR_UINT" value="2" enum="ComparisonType"> + An unsigned integer scalar. + </constant> + <constant name="CTYPE_VECTOR_2D" value="3" enum="ComparisonType"> A 2D vector type. </constant> - <constant name="CTYPE_VECTOR_3D" value="3" enum="ComparisonType"> + <constant name="CTYPE_VECTOR_3D" value="4" enum="ComparisonType"> A 3D vector type. </constant> - <constant name="CTYPE_VECTOR_4D" value="4" enum="ComparisonType"> + <constant name="CTYPE_VECTOR_4D" value="5" enum="ComparisonType"> A 4D vector type. </constant> - <constant name="CTYPE_BOOLEAN" value="5" enum="ComparisonType"> + <constant name="CTYPE_BOOLEAN" value="6" enum="ComparisonType"> A boolean type. </constant> - <constant name="CTYPE_TRANSFORM" value="6" enum="ComparisonType"> + <constant name="CTYPE_TRANSFORM" value="7" enum="ComparisonType"> A transform ([code]mat4[/code]) type. </constant> - <constant name="CTYPE_MAX" value="7" enum="ComparisonType"> + <constant name="CTYPE_MAX" value="8" enum="ComparisonType"> Represents the size of the [enum ComparisonType] enum. </constant> <constant name="FUNC_EQUAL" value="0" enum="Function"> diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml index e74ff6e162..3fda4eb2b8 100644 --- a/doc/classes/VisualShaderNodeSwitch.xml +++ b/doc/classes/VisualShaderNodeSwitch.xml @@ -20,22 +20,25 @@ <constant name="OP_TYPE_INT" value="1" enum="OpType"> An integer scalar. </constant> - <constant name="OP_TYPE_VECTOR_2D" value="2" enum="OpType"> + <constant name="OP_TYPE_UINT" value="2" enum="OpType"> + An unsigned integer scalar. + </constant> + <constant name="OP_TYPE_VECTOR_2D" value="3" enum="OpType"> A 2D vector type. </constant> - <constant name="OP_TYPE_VECTOR_3D" value="3" enum="OpType"> + <constant name="OP_TYPE_VECTOR_3D" value="4" enum="OpType"> A 3D vector type. </constant> - <constant name="OP_TYPE_VECTOR_4D" value="4" enum="OpType"> + <constant name="OP_TYPE_VECTOR_4D" value="5" enum="OpType"> A 4D vector type. </constant> - <constant name="OP_TYPE_BOOLEAN" value="5" enum="OpType"> + <constant name="OP_TYPE_BOOLEAN" value="6" enum="OpType"> A boolean type. </constant> - <constant name="OP_TYPE_TRANSFORM" value="6" enum="OpType"> + <constant name="OP_TYPE_TRANSFORM" value="7" enum="OpType"> A transform type. </constant> - <constant name="OP_TYPE_MAX" value="7" enum="OpType"> + <constant name="OP_TYPE_MAX" value="8" enum="OpType"> Represents the size of the [enum OpType] enum. </constant> </constants> diff --git a/doc/classes/VisualShaderNodeUIntConstant.xml b/doc/classes/VisualShaderNodeUIntConstant.xml new file mode 100644 index 0000000000..926e4e11d2 --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntConstant.xml @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeUIntConstant" inherits="VisualShaderNodeConstant" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + An unsigned scalar integer constant to be used within the visual shader graph. + </brief_description> + <description> + Translated to [code]uint[/code] in the shader language. + </description> + <tutorials> + </tutorials> + <members> + <member name="constant" type="int" setter="set_constant" getter="get_constant" default="0"> + An unsigned integer constant which represents a state of this node. + </member> + </members> +</class> diff --git a/doc/classes/VisualShaderNodeUIntFunc.xml b/doc/classes/VisualShaderNodeUIntFunc.xml new file mode 100644 index 0000000000..c0c591304a --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntFunc.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeUIntFunc" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + An unsigned scalar integer function to be used within the visual shader graph. + </brief_description> + <description> + Accept an unsigned integer scalar ([code]x[/code]) to the input port and transform it according to [member function]. + </description> + <tutorials> + </tutorials> + <members> + <member name="function" type="int" setter="set_function" getter="get_function" enum="VisualShaderNodeUIntFunc.Function" default="0"> + A function to be applied to the scalar. See [enum Function] for options. + </member> + </members> + <constants> + <constant name="FUNC_NEGATE" value="0" enum="Function"> + Negates the [code]x[/code] using [code]-(x)[/code]. + </constant> + <constant name="FUNC_BITWISE_NOT" value="1" enum="Function"> + Returns the result of bitwise [code]NOT[/code] operation on the integer. Translates to [code]~a[/code] in the Godot Shader Language. + </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/VisualShaderNodeUIntOp.xml b/doc/classes/VisualShaderNodeUIntOp.xml new file mode 100644 index 0000000000..44f71286e3 --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntOp.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeUIntOp" inherits="VisualShaderNode" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + An unsigned integer scalar operator to be used within the visual shader graph. + </brief_description> + <description> + Applies [member operator] to two unsigned integer inputs: [code]a[/code] and [code]b[/code]. + </description> + <tutorials> + </tutorials> + <members> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeUIntOp.Operator" default="0"> + An operator to be applied to the inputs. See [enum Operator] for options. + </member> + </members> + <constants> + <constant name="OP_ADD" value="0" enum="Operator"> + Sums two numbers using [code]a + b[/code]. + </constant> + <constant name="OP_SUB" value="1" enum="Operator"> + Subtracts two numbers using [code]a - b[/code]. + </constant> + <constant name="OP_MUL" value="2" enum="Operator"> + Multiplies two numbers using [code]a * b[/code]. + </constant> + <constant name="OP_DIV" value="3" enum="Operator"> + Divides two numbers using [code]a / b[/code]. + </constant> + <constant name="OP_MOD" value="4" enum="Operator"> + Calculates the remainder of two numbers using [code]a % b[/code]. + </constant> + <constant name="OP_MAX" value="5" enum="Operator"> + Returns the greater of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. + </constant> + <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_BITWISE_AND" value="7" enum="Operator"> + Returns the result of bitwise [code]AND[/code] operation on the integer. Translates to [code]a & b[/code] in the Godot Shader Language. + </constant> + <constant name="OP_BITWISE_OR" value="8" enum="Operator"> + Returns the result of bitwise [code]OR[/code] operation for two integers. Translates to [code]a | b[/code] in the Godot Shader Language. + </constant> + <constant name="OP_BITWISE_XOR" value="9" enum="Operator"> + Returns the result of bitwise [code]XOR[/code] operation for two integers. Translates to [code]a ^ b[/code] in the Godot Shader Language. + </constant> + <constant name="OP_BITWISE_LEFT_SHIFT" value="10" enum="Operator"> + Returns the result of bitwise left shift operation on the integer. Translates to [code]a << b[/code] in the Godot Shader Language. + </constant> + <constant name="OP_BITWISE_RIGHT_SHIFT" value="11" enum="Operator"> + Returns the result of bitwise right shift operation on the integer. Translates to [code]a >> b[/code] in the Godot Shader Language. + </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/VisualShaderNodeUIntParameter.xml b/doc/classes/VisualShaderNodeUIntParameter.xml new file mode 100644 index 0000000000..3b549c84f7 --- /dev/null +++ b/doc/classes/VisualShaderNodeUIntParameter.xml @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeUIntParameter" inherits="VisualShaderNodeParameter" version="4.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <members> + <member name="default_value" type="int" setter="set_default_value" getter="get_default_value" default="0"> + </member> + <member name="default_value_enabled" type="bool" setter="set_default_value_enabled" getter="is_default_value_enabled" default="false"> + </member> + </members> +</class> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 16ca486e4a..4cd6cf41da 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -503,7 +503,7 @@ <member name="content_scale_size" type="Vector2i" setter="set_content_scale_size" getter="get_content_scale_size" default="Vector2i(0, 0)"> Base size of the content (i.e. nodes that are drawn inside the window). If non-zero, [Window]'s content will be scaled when the window is resized to a different size. </member> - <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen" default="0"> + <member name="current_screen" type="int" setter="set_current_screen" getter="get_current_screen"> The screen the window is currently on. </member> <member name="exclusive" type="bool" setter="set_exclusive" getter="is_exclusive" default="false"> @@ -513,6 +513,8 @@ <member name="extend_to_title" type="bool" setter="set_flag" getter="get_flag" default="false"> If [code]true[/code], the [Window] contents is expanded to the full size of the window, window title bar is transparent. </member> + <member name="initial_position" type="int" setter="set_initial_position" getter="get_initial_position" enum="Window.WindowInitialPosition" default="0"> + </member> <member name="max_size" type="Vector2i" setter="set_max_size" getter="get_max_size" default="Vector2i(0, 0)"> If non-zero, the [Window] can't be resized to be bigger than this size. [b]Note:[/b] This property will be ignored if the value is lower than [member min_size]. @@ -732,6 +734,10 @@ <constant name="LAYOUT_DIRECTION_RTL" value="3" enum="LayoutDirection"> Right-to-left layout direction. </constant> + <constant name="WINDOW_INITIAL_POSITION_ABSOLUTE" value="0" enum="WindowInitialPosition"> + </constant> + <constant name="WINDOW_INITIAL_POSITION_CENTER_SCREEN" value="1" enum="WindowInitialPosition"> + </constant> </constants> <theme_items> <theme_item name="title_color" data_type="color" type="Color" default="Color(0.875, 0.875, 0.875, 1)"> |