diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/classes/Array.xml | 10 | ||||
-rw-r--r-- | doc/classes/Dictionary.xml | 7 | ||||
-rw-r--r-- | doc/classes/DisplayServer.xml | 66 | ||||
-rw-r--r-- | doc/classes/FileDialog.xml | 2 | ||||
-rw-r--r-- | doc/classes/Image.xml | 2 | ||||
-rw-r--r-- | doc/classes/InputMap.xml | 2 | ||||
-rw-r--r-- | doc/classes/Label.xml | 2 | ||||
-rw-r--r-- | doc/classes/Material.xml | 2 | ||||
-rw-r--r-- | doc/classes/Node.xml | 5 | ||||
-rw-r--r-- | doc/classes/OS.xml | 2 | ||||
-rw-r--r-- | doc/classes/Object.xml | 1 | ||||
-rw-r--r-- | doc/classes/PhysicsMaterial.xml | 2 | ||||
-rw-r--r-- | doc/classes/Skeleton3D.xml | 39 | ||||
-rw-r--r-- | doc/classes/String.xml | 14 | ||||
-rw-r--r-- | doc/classes/SubViewportContainer.xml | 1 | ||||
-rw-r--r-- | doc/classes/TileSet.xml | 2 |
16 files changed, 127 insertions, 32 deletions
diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 7593f7dff4..9a3eccd8dc 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -200,7 +200,7 @@ <argument index="1" name="from" type="int" default="0"> </argument> <description> - Searches the array for a value and returns its index or -1 if not found. Optionally, the initial search index can be passed. + Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. </description> </method> <method name="find_last"> @@ -209,7 +209,7 @@ <argument index="0" name="value" type="Variant"> </argument> <description> - Searches the array in reverse order for a value and returns its index or -1 if not found. + Searches the array in reverse order for a value and returns its index or [code]-1[/code] if not found. </description> </method> <method name="front"> @@ -232,6 +232,12 @@ ["inside", 7].has(7) == true ["inside", 7].has("7") == false [/codeblock] + [b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows: + [codeblock] + # Will evaluate to `true`. + if 2 in [2, 4, 6, 8]: + pass + [/codeblock] </description> </method> <method name="hash"> diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 4538e5ea4e..5413fa33c6 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -126,6 +126,13 @@ </argument> <description> Returns [code]true[/code] if the dictionary has a given key. + [b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows: + [codeblock] + # Will evaluate to `true`. + if "godot" in {"godot": "engine"}: + pass + [/codeblock] + This method (like the [code]in[/code] operator) will evaluate to [code]true[/code] as long as the key exists, even if the associated value is [code]null[/code]. </description> </method> <method name="has_all"> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 7fe712753c..f8306cbd72 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -127,12 +127,6 @@ <description> </description> </method> - <method name="get_latin_keyboard_variant" qualifiers="const"> - <return type="int" enum="DisplayServer.LatinKeyboardVariant"> - </return> - <description> - </description> - </method> <method name="get_name" qualifiers="const"> <return type="String"> </return> @@ -389,6 +383,52 @@ <description> </description> </method> + <method name="keyboard_get_current_layout" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns active keyboard layout index. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + </description> + </method> + <method name="keyboard_get_layout_count" qualifiers="const"> + <return type="int"> + </return> + <description> + Returns the number of keyboard layouts. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + </description> + </method> + <method name="keyboard_get_layout_language" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + Returns the ISO-639/BCP-47 language code of the keyboard layout at position [code]index[/code]. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + </description> + </method> + <method name="keyboard_get_layout_name" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + Returns the localized name of the keyboard layout at position [code]index[/code]. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + </description> + </method> + <method name="keyboard_set_current_layout"> + <return type="void"> + </return> + <argument index="0" name="index" type="int"> + </argument> + <description> + Sets active keyboard layout. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. + </description> + </method> <method name="mouse_get_absolute_position" qualifiers="const"> <return type="Vector2i"> </return> @@ -1021,20 +1061,6 @@ </constant> <constant name="WINDOW_FLAG_MAX" value="5" enum="WindowFlags"> </constant> - <constant name="LATIN_KEYBOARD_QWERTY" value="0" enum="LatinKeyboardVariant"> - </constant> - <constant name="LATIN_KEYBOARD_QWERTZ" value="1" enum="LatinKeyboardVariant"> - </constant> - <constant name="LATIN_KEYBOARD_AZERTY" value="2" enum="LatinKeyboardVariant"> - </constant> - <constant name="LATIN_KEYBOARD_QZERTY" value="3" enum="LatinKeyboardVariant"> - </constant> - <constant name="LATIN_KEYBOARD_DVORAK" value="4" enum="LatinKeyboardVariant"> - </constant> - <constant name="LATIN_KEYBOARD_NEO" value="5" enum="LatinKeyboardVariant"> - </constant> - <constant name="LATIN_KEYBOARD_COLEMAK" value="6" enum="LatinKeyboardVariant"> - </constant> <constant name="WINDOW_EVENT_MOUSE_ENTER" value="0" enum="WindowEvent"> </constant> <constant name="WINDOW_EVENT_MOUSE_EXIT" value="1" enum="WindowEvent"> diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index f4868df6a4..eaaccbd0dd 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -4,7 +4,7 @@ Dialog for selecting files or directories in the filesystem. </brief_description> <description> - FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. + FileDialog is a preset dialog used to choose files and directories in the filesystem. It supports filter masks. The FileDialog automatically sets its window title according to the [member file_mode]. If you want to use a custom title, disable this by setting [member mode_overrides_title] to [code]false[/code]. </description> <tutorials> </tutorials> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index aa8c8d2443..d29fcfd96f 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -154,7 +154,7 @@ <argument index="4" name="data" type="PackedByteArray"> </argument> <description> - Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. + Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then loads mipmaps for this image from [code]data[/code]. See [method generate_mipmaps]. </description> </method> <method name="crop"> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index da93d7fb53..842c69de27 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -95,7 +95,7 @@ Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. </description> </method> - <method name="get_action_list"> + <method name="action_get_events"> <return type="Array"> </return> <argument index="0" name="action" type="StringName"> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 263fb6c022..3318f2757d 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -57,7 +57,7 @@ </member> <member name="mouse_filter" type="int" setter="set_mouse_filter" getter="get_mouse_filter" override="true" enum="Control.MouseFilter" default="2" /> <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0"> - Limits the count of visible characters. If you set [code]percent_visible[/code] to 50, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box. + Limits the amount of visible characters. If you set [code]percent_visible[/code] to 0.5, only up to half of the text's characters will display on screen. Useful to animate the text in a dialog box. </member> <member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" override="true" default="4" /> <member name="text" type="String" setter="set_text" getter="get_text" default=""""> diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml index a37c8127f0..f3686876ca 100644 --- a/doc/classes/Material.xml +++ b/doc/classes/Material.xml @@ -17,7 +17,7 @@ </member> <member name="render_priority" type="int" setter="set_render_priority" getter="get_render_priority" default="0"> Sets the render priority for transparent objects in 3D scenes. Higher priority objects will be sorted in front of lower priority objects. - [b]Note:[/b] this only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are sorted based on depth, while transparent objects are sorted from back to front (subject to priority). + [b]Note:[/b] this only applies to sorting of transparent objects. This will not impact how transparent objects are sorted relative to opaque objects. This is because opaque objects are not sorted, while transparent objects are sorted from back to front (subject to priority). </member> </members> <constants> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 04c8d2bf57..9617ee0437 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -55,6 +55,7 @@ It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_input]. To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. For gameplay input, [method _unhandled_input] and [method _unhandled_key_input] are usually a better fit as they allow the GUI to intercept the events first. + [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan). </description> </method> <method name="_physics_process" qualifiers="virtual"> @@ -66,6 +67,7 @@ Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant. It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process]. Corresponds to the [constant NOTIFICATION_PHYSICS_PROCESS] notification in [method Object._notification]. + [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan). </description> </method> <method name="_process" qualifiers="virtual"> @@ -77,6 +79,7 @@ Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant. It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process]. Corresponds to the [constant NOTIFICATION_PROCESS] notification in [method Object._notification]. + [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan). </description> </method> <method name="_ready" qualifiers="virtual"> @@ -99,6 +102,7 @@ It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_input]. To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. For gameplay input, this and [method _unhandled_key_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first. + [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan). </description> </method> <method name="_unhandled_key_input" qualifiers="virtual"> @@ -111,6 +115,7 @@ It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input]. To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first. + [b]Note:[/b] This method is only called if the node is present in the scene tree (i.e. if it's not orphan). </description> </method> <method name="add_child"> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 03203e2ebb..b131d2728c 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -325,7 +325,7 @@ </description> </method> <method name="get_unix_time" qualifiers="const"> - <return type="int"> + <return type="float"> </return> <description> Returns the current UNIX epoch timestamp. diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 87bcab25db..8d08688b41 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -15,6 +15,7 @@ print("position" in n) # Prints "True". print("other_property" in n) # Prints "False". [/codeblock] + The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code]. Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification]. </description> <tutorials> diff --git a/doc/classes/PhysicsMaterial.xml b/doc/classes/PhysicsMaterial.xml index 6410626496..0889c238dc 100644 --- a/doc/classes/PhysicsMaterial.xml +++ b/doc/classes/PhysicsMaterial.xml @@ -12,6 +12,7 @@ </methods> <members> <member name="absorbent" type="bool" setter="set_absorbent" getter="is_absorbent" default="false"> + If [code]true[/code], subtracts the bounciness from the colliding object's bounciness instead of adding it. </member> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce" default="0.0"> The body's bounciness. Values range from [code]0[/code] (no bounce) to [code]1[/code] (full bounciness). @@ -20,6 +21,7 @@ The body's friction. Values range from [code]0[/code] (frictionless) to [code]1[/code] (maximum friction). </member> <member name="rough" type="bool" setter="set_rough" getter="is_rough" default="false"> + If [code]true[/code], the physics engine will use the friction of the object marked as "rough" when two objects collide. If [code]false[/code], the physics engine will use the lowest friction of all colliding objects instead. If [code]true[/code] for both colliding objects, the physics engine will use the highest friction. </member> </members> <constants> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 640cbe84f5..183fd5396f 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -31,6 +31,16 @@ [i]Deprecated soon.[/i] </description> </method> + <method name="bone_transform_to_world_transform"> + <return type="Transform"> + </return> + <argument index="0" name="bone_transform" type="Transform"> + </argument> + <description> + Takes the given bone pose/transform and converts it to a world transform, relative to the [Skeleton3D] node. + This is useful for using the bone transform in calculations with transforms from [Node3D]-based nodes. + </description> + </method> <method name="clear_bones"> <return type="void"> </return> @@ -42,6 +52,7 @@ <return type="void"> </return> <description> + Removes the global pose override on all bones in the skeleton. </description> </method> <method name="find_bone" qualifiers="const"> @@ -136,12 +147,14 @@ <argument index="0" name="bone_idx" type="int"> </argument> <description> + Returns whether the bone rest for the bone at [code]bone_idx[/code] is disabled. </description> </method> <method name="localize_rests"> <return type="void"> </return> <description> + Returns all bones in the skeleton to their rest poses. </description> </method> <method name="physical_bones_add_collision_exception"> @@ -150,6 +163,8 @@ <argument index="0" name="exception" type="RID"> </argument> <description> + Adds a collision exception to the physical bone. + Works just like the [RigidBody3D] node. </description> </method> <method name="physical_bones_remove_collision_exception"> @@ -158,6 +173,8 @@ <argument index="0" name="exception" type="RID"> </argument> <description> + Removes a collision exception to the physical bone. + Works just like the [RigidBody3D] node. </description> </method> <method name="physical_bones_start_simulation"> @@ -166,12 +183,15 @@ <argument index="0" name="bones" type="StringName[]" default="[ ]"> </argument> <description> + Tells the [PhysicalBone3D] nodes in the Skeleton to start simulating and reacting to the physics world. + Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated. </description> </method> <method name="physical_bones_stop_simulation"> <return type="void"> </return> <description> + Tells the [PhysicalBone3D] nodes in the Skeleton to stop simulating. </description> </method> <method name="register_skin"> @@ -180,6 +200,7 @@ <argument index="0" name="skin" type="Skin"> </argument> <description> + Binds the given Skin to the Skeleton. </description> </method> <method name="set_bone_custom_pose"> @@ -190,6 +211,8 @@ <argument index="1" name="custom_pose" type="Transform"> </argument> <description> + Sets the custom pose transform, [code]custom_pose[/code], for the bone at [code]bone_idx[/code]. This pose is an addition to the bone rest pose. + [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. </description> </method> <method name="set_bone_disable_rest"> @@ -200,6 +223,7 @@ <argument index="1" name="disable" type="bool"> </argument> <description> + Disables the rest pose for the bone at [code]bone_idx[/code] if [code]true[/code], enables the bone rest if [code]false[/code]. </description> </method> <method name="set_bone_global_pose_override"> @@ -214,6 +238,9 @@ <argument index="3" name="persistent" type="bool" default="false"> </argument> <description> + Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. + [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. </description> </method> <method name="set_bone_parent"> @@ -237,6 +264,7 @@ </argument> <description> Returns the pose transform for bone [code]bone_idx[/code]. + [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. </description> </method> <method name="set_bone_rest"> @@ -267,6 +295,17 @@ <argument index="0" name="bone_idx" type="int"> </argument> <description> + Unparents the bone at [code]bone_idx[/code] and sets its rest position to that of it's parent prior to being reset. + </description> + </method> + <method name="world_transform_to_bone_transform"> + <return type="Transform"> + </return> + <argument index="0" name="world_transform" type="Transform"> + </argument> + <description> + Takes the given world transform, relative to the [Skeleton3D], and converts it to a bone pose/transform. + This is useful for using setting bone poses using transforms from [Node3D]-based nodes. </description> </method> </methods> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 0dd6923129..24d92b822a 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -412,7 +412,13 @@ <argument index="1" name="from" type="int" default="0"> </argument> <description> - Finds the first occurrence of a substring. Returns the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. + Finds the first occurrence of a substring. Returns the starting position of the substring or [code]-1[/code] if not found. Optionally, the initial search index can be passed. + [b]Note:[/b] If you just want to know whether a string contains a substring, use the [code]in[/code] operator as follows: + [codeblock] + # Will evaluate to `false`. + if "i" in "team": + pass + [/codeblock] </description> </method> <method name="find_last"> @@ -421,7 +427,7 @@ <argument index="0" name="what" type="String"> </argument> <description> - Finds the last occurrence of a substring. Returns the starting position of the substring or -1 if not found. + Finds the last occurrence of a substring. Returns the starting position of the substring or [code]-1[/code] if not found. </description> </method> <method name="findn"> @@ -432,7 +438,7 @@ <argument index="1" name="from" type="int" default="0"> </argument> <description> - Finds the first occurrence of a substring, ignoring case. Returns the starting position of the substring or -1 if not found. Optionally, the initial search index can be passed. + Finds the first occurrence of a substring, ignoring case. Returns the starting position of the substring or [code]-1[/code] if not found. Optionally, the initial search index can be passed. </description> </method> <method name="format"> @@ -947,7 +953,7 @@ <argument index="1" name="len" type="int" default="-1"> </argument> <description> - Returns part of the string from the position [code]from[/code] with length [code]len[/code]. Argument [code]len[/code] is optional and using -1 will return remaining characters from given position. + Returns part of the string from the position [code]from[/code] with length [code]len[/code]. Argument [code]len[/code] is optional and using [code]-1[/code] will return remaining characters from given position. </description> </method> <method name="to_ascii"> diff --git a/doc/classes/SubViewportContainer.xml b/doc/classes/SubViewportContainer.xml index e6a0bd4866..16d483e7f8 100644 --- a/doc/classes/SubViewportContainer.xml +++ b/doc/classes/SubViewportContainer.xml @@ -5,6 +5,7 @@ </brief_description> <description> A [Container] node that holds a [SubViewport], automatically setting its size. + [b]Note:[/b] Changing a SubViewportContainer's [member Control.rect_scale] will cause its contents to appear distorted. To change its visual size without causing distortion, adjust the node's margins instead (if it's not already in a container). </description> <tutorials> </tutorials> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index c647f83598..9a78e45d46 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -44,6 +44,8 @@ <argument index="1" name="neighbor_id" type="int"> </argument> <description> + Determines when the auto-tiler should consider two different auto-tile IDs to be bound together. + [b]Note:[/b] [code]neighbor_id[/code] will be [code]-1[/code] ([constant TileMap.INVALID_CELL]) when checking a tile against an empty neighbor tile. </description> </method> <method name="autotile_clear_bitmask_map"> |