diff options
Diffstat (limited to 'doc')
34 files changed, 224 insertions, 84 deletions
diff --git a/doc/classes/@GDScript.xml b/doc/classes/@GDScript.xml index 63b9ef13fd..b6de5dbf62 100644 --- a/doc/classes/@GDScript.xml +++ b/doc/classes/@GDScript.xml @@ -92,13 +92,13 @@ <argument index="0" name="condition" type="bool"> </argument> <description> - Assert that the [code]condition[/code] is [code]true[/code] . If the [code]condition[/code] is [code]false[/code] a fatal error is generated and the program is halted. Useful for debugging to make sure a value is always [code]true[/code]. + Asserts that the [code]condition[/code] is [code]true[/code] . If the [code]condition[/code] is [code]false[/code], an error is generated and the program is halted until you resume it. Only executes in debug builds, or when running the game from the editor. Use it for debugging purposes, to make sure a statement is [code]true[/code] during development. [codeblock] - # Speed should always be between 0 and 20 + # Imagine we always want speed to be between 0 and 20 speed = -10 - assert(speed < 20) # Is true and program continues - assert(speed >= 0) # Is false and program stops - assert(speed >= 0 && speed < 20) # Or combined + assert(speed < 20) # True, the program will continue + assert(speed >= 0) # False, the program will stop + assert(speed >= 0 && speed < 20) # You can also combine the two conditional statements in one check [/codeblock] </description> </method> @@ -640,6 +640,23 @@ [/codeblock] </description> </method> + <method name="move_toward"> + <return type="float"> + </return> + <argument index="0" name="from" type="float"> + </argument> + <argument index="1" name="to" type="float"> + </argument> + <argument index="2" name="delta" type="float"> + </argument> + <description> + Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value. + Use a negative [code]delta[/code] value to move away. + [codeblock] + move_toward(10, 5, 4) # returns 6 + [/codeblock] + </description> + </method> <method name="nearest_po2"> <return type="int"> </return> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 9885f30883..c79903cb80 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -536,6 +536,19 @@ Set the interpolation type of a given track, from the INTERPOLATION_* enum. </description> </method> + <method name="track_set_key_time"> + <return type="void"> + </return> + <argument index="0" name="idx" type="int"> + </argument> + <argument index="1" name="key_idx" type="int"> + </argument> + <argument index="2" name="time" type="float"> + </argument> + <description> + Set the time of an existing key. + </description> + </method> <method name="track_set_key_transition"> <return type="void"> </return> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 1707ea07e0..745d803a30 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -155,17 +155,6 @@ Remove a surface at position surf_idx, shifting greater surfaces one surf_idx slot down. </description> </method> - <method name="surface_set_material"> - <return type="void"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> - <argument index="1" name="material" type="Material"> - </argument> - <description> - Set a [Material] for a given surface. Surface will be rendered using this material. - </description> - </method> <method name="surface_set_name"> <return type="void"> </return> diff --git a/doc/classes/AudioEffectReverb.xml b/doc/classes/AudioEffectReverb.xml index fde22c9238..8c9652eee2 100644 --- a/doc/classes/AudioEffectReverb.xml +++ b/doc/classes/AudioEffectReverb.xml @@ -21,7 +21,7 @@ <member name="hipass" type="float" setter="set_hpf" getter="get_hpf"> High-pass filter passes signals with a frequency higher than a certain cutoff frequency and attenuates signals with frequencies lower than the cutoff frequency. Value can range from 0 to 1. Default value: [code]0[/code]. </member> - <member name="predelay_feedback" type="float" setter="set_predelay_msec" getter="get_predelay_msec"> + <member name="predelay_feedback" type="float" setter="set_predelay_feedback" getter="get_predelay_feedback"> Output percent of predelay. Value can range from 0 to 1. Default value: [code]1[/code]. </member> <member name="predelay_msec" type="float" setter="set_predelay_msec" getter="get_predelay_msec"> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 22061322c8..fea706987c 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -4,7 +4,7 @@ All User Interface nodes inherit from Control. A control's anchors and margins adapt its position and size relative to its parent. </brief_description> <description> - Base class for all User Interface or [i]UI[/i] related nodes. [Control] features a bounding rectangle that defines its extents, an anchor position relative to its parent and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. + Base class for all User Interface or [i]UI[/i] related nodes. [Control] features a bounding rectangle that defines its extents, an anchor position relative to its parent control or the current viewport, and margins that represent an offset to the anchor. The margins update automatically when the node, any of its parents, or the screen size change. For more information on Godot's UI system, anchors, margins, and containers, see the related tutorials in the manual. To build flexible UIs, you'll need a mix of UI elements that inherit from [Control] and [Container] nodes. [b]User Interface nodes and input[/b] Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [method MainLoop._input_event]. Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it. @@ -714,7 +714,7 @@ <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents"> Enables whether rendering of children should be clipped to this control's rectangle. If [code]true[/code], parts of a child which would be visibly outside of this control's rectangle will not be rendered. </member> - <member name="rect_global_position" type="Vector2" setter="set_global_position" getter="get_global_position"> + <member name="rect_global_position" type="Vector2" setter="_set_global_position" getter="get_global_position"> The node's global position, relative to the world (usually to the top-left corner of the window). </member> <member name="rect_min_size" type="Vector2" setter="set_custom_minimum_size" getter="get_custom_minimum_size"> @@ -723,7 +723,7 @@ <member name="rect_pivot_offset" type="Vector2" setter="set_pivot_offset" getter="get_pivot_offset"> By default, the node's pivot is its top-left corner. When you change its [member rect_scale], it will scale around this pivot. Set this property to [member rect_size] / 2 to center the pivot in the node's rectangle. </member> - <member name="rect_position" type="Vector2" setter="set_position" getter="get_position"> + <member name="rect_position" type="Vector2" setter="_set_position" getter="get_position"> The node's position, relative to its parent. It corresponds to the rectangle's top-left corner. The property is not affected by [member rect_pivot_offset]. </member> <member name="rect_rotation" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees"> @@ -732,7 +732,7 @@ <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale"> The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. </member> - <member name="rect_size" type="Vector2" setter="set_size" getter="get_size"> + <member name="rect_size" type="Vector2" setter="_set_size" getter="get_size"> 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"> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 97ad4f6829..3d91bff0aa 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -525,6 +525,10 @@ </constant> <constant name="CONTAINER_PROPERTY_EDITOR_BOTTOM" value="9" enum="CustomControlContainer"> </constant> + <constant name="CONTAINER_PROJECT_SETTING_TAB_LEFT" value="10" enum="CustomControlContainer"> + </constant> + <constant name="CONTAINER_PROJECT_SETTING_TAB_RIGHT" value="11" enum="CustomControlContainer"> + </constant> <constant name="DOCK_SLOT_LEFT_UL" value="0" enum="DockSlot"> </constant> <constant name="DOCK_SLOT_LEFT_BL" value="1" enum="DockSlot"> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 5f8dc552d7..2a4ab4ce0d 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -217,7 +217,7 @@ </member> <member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias"> </member> - <member name="ssao_blur" type="int" setter="set_ssao_blur" getter="is_ssao_blur_enabled" enum="Environment.SSAOBlur"> + <member name="ssao_blur" type="int" setter="set_ssao_blur" getter="get_ssao_blur" enum="Environment.SSAOBlur"> </member> <member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color"> </member> diff --git a/doc/classes/InputEventAction.xml b/doc/classes/InputEventAction.xml index 25e9073ec7..9df7bbca74 100644 --- a/doc/classes/InputEventAction.xml +++ b/doc/classes/InputEventAction.xml @@ -18,6 +18,9 @@ <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed"> If [code]true[/code], the action's state is pressed. If [code]false[/code], the action's state is released. </member> + <member name="strength" type="float" setter="set_strength" getter="get_strength"> + The action's strength between 0 and 1. This value is consired as equal to 0 if pressed is [code]false[/code]. The event strength allows faking analog joypad motion events, by precising how strongly is the joypad axis bent or pressed. + </member> </members> <constants> </constants> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index 86a1362230..53b1f74bd4 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -29,7 +29,7 @@ Key scancode, one of the [enum KeyList] constants. </member> <member name="unicode" type="int" setter="set_unicode" getter="get_unicode"> - Key unicode identifier when relevant. + Key unicode identifier when relevant. Unicode identifiers for the composite characters and complex scripts may not be available unless IME input mode is active. See [method OS.set_ime_active] for more information. </member> </members> <constants> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index bb180b591d..184987d2dd 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -166,6 +166,7 @@ </constant> <constant name="MENU_PASTE" value="2" enum="MenuItems"> Pastes the clipboard text over the selected text (or at the cursor's position). + Non-printable escape characters are automatically stripped from the OS clipboard via [method String.strip_escapes]. </constant> <constant name="MENU_CLEAR" value="3" enum="MenuItems"> Erases the whole [LineEdit] text. diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index b8bc5cbd11..048e7074f1 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -80,6 +80,17 @@ Returns a [Material] in a given surface. Surface is rendered using this material. </description> </method> + <method name="surface_set_material"> + <return type="void"> + </return> + <argument index="0" name="surf_idx" type="int"> + </argument> + <argument index="1" name="material" type="Material"> + </argument> + <description> + Set a [Material] for a given surface. Surface will be rendered using this material. + </description> + </method> </methods> <members> <member name="lightmap_size_hint" type="Vector2" setter="set_lightmap_size_hint" getter="get_lightmap_size_hint"> diff --git a/doc/classes/MultiMeshInstance2D.xml b/doc/classes/MultiMeshInstance2D.xml new file mode 100644 index 0000000000..0bf243ee24 --- /dev/null +++ b/doc/classes/MultiMeshInstance2D.xml @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MultiMeshInstance2D" inherits="Node2D" category="Core" version="3.2"> + <brief_description> + Node that instances a [MultiMesh] in 2D. + </brief_description> + <description> + [MultiMeshInstance2D] is a specialized node to instance a [MultiMesh] resource in 2D. + Usage is the same as [MultiMeshInstance]. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="multimesh" type="MultiMesh" setter="set_multimesh" getter="get_multimesh"> + The [MultiMesh] that will be drawn by the [MultiMeshInstance2D]. + </member> + <member name="normal_map" type="Texture" setter="set_normal_map" getter="get_normal_map"> + The normal map that will be used if using the default [CanvasItemMaterial]. + </member> + <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> + The [Texture] that will be used if using the default [CanvasItemMaterial]. Can be accessed as [code]TEXTURE[/code] in CanvasItem shader. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Navigation.xml b/doc/classes/Navigation.xml index 3690c1d682..f0ae3fef99 100644 --- a/doc/classes/Navigation.xml +++ b/doc/classes/Navigation.xml @@ -59,7 +59,7 @@ <argument index="2" name="optimize" type="bool" default="true"> </argument> <description> - Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (raidus, height, etc.) are considered in the path calculation, otherwise they are ignored. + Returns the path between two given points. Points are in local coordinate space. If [code]optimize[/code] is [code]true[/code] (the default), the agent properties associated with each [NavigationMesh] (radius, height, etc.) are considered in the path calculation, otherwise they are ignored. </description> </method> <method name="navmesh_add"> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index dd0fcd63e7..2592bc6775 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -221,14 +221,16 @@ <return type="Vector2"> </return> <description> - Returns IME selection range. + Returns IME cursor position (currently edited portion of the string) relative to the characters in the composition string. + [code]NOTIFICATION_OS_IME_UPDATE[/code] is sent to the application to notify it of changes to the IME cursor position. </description> </method> <method name="get_ime_text" qualifiers="const"> <return type="String"> </return> <description> - Returns IME intermediate text. + Returns IME intermediate composition string. + [code]NOTIFICATION_OS_IME_UPDATE[/code] is sent to the application to notify it of changes to the IME composition string. </description> </method> <method name="get_latin_keyboard_variant" qualifiers="const"> @@ -710,6 +712,9 @@ </argument> <description> Sets whether IME input mode should be enabled. + If active IME handles key events before the application and creates an composition string and suggestion list. + Application can retrieve the composition status by using [method get_ime_selection] and [method get_ime_text] functions. + Completed composition string is committed when input is finished. </description> </method> <method name="set_ime_position"> @@ -813,6 +818,7 @@ </member> <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window"> If [code]true[/code], removes the window frame. + Note: Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency. </member> <member name="window_fullscreen" type="bool" setter="set_window_fullscreen" getter="is_window_fullscreen"> If [code]true[/code], the window is fullscreen. @@ -824,6 +830,9 @@ If [code]true[/code], the window is minimized. </member> <member name="window_per_pixel_transparency_enabled" type="bool" setter="set_window_per_pixel_transparency_enabled" getter="get_window_per_pixel_transparency_enabled"> + If [code]true[/code], the window background is transparent and window frame is removed. + Use [code]get_tree().get_root().set_transparent_background(true)[/code] to disable main viewport background rendering. + Note: This property has no effect if "Project > Project Settings > Display > Window > Per-pixel transparency > Allowed" setting is disabled. </member> <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position"> The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index dbbd974b04..c9910360ed 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -4,12 +4,12 @@ Base class for all non built-in types. </brief_description> <description> - Base class for all non built-in types. Everything which is not a built-in type starts the inheritance chain from this class. - Objects can be constructed from scripting languages, using [code]Object.new()[/code] in GDScript, [code]new Object[/code] in C#, or the "Construct Object" node in VisualScript. - Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the [method free] function from the script or delete from C++). - Some derivatives add memory management, such as [Reference] (which keeps a reference count and deletes itself automatically when no longer referenced) and [Node], which deletes the children tree when deleted. + Every class which is not a built-in type inherits from this class. + You can construct Objects from scripting languages, using [code]Object.new()[/code] in GDScript, [code]new Object[/code] in C#, or the "Construct Object" node in VisualScript. + Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the [method free] method from your script or delete the instance from C++. + Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory. Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them. - Objects also receive notifications ([method _notification]). Notifications are a simple way to notify the object about simple events, so they can all be handled together. + Objects also receive notifications. Notifications are a simple way to notify the object about simple events, so they can all be handled together. See [method _notification]. </description> <tutorials> </tutorials> @@ -126,7 +126,9 @@ <argument index="4" name="flags" type="int" default="0"> </argument> <description> - Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call. Use [code]flags[/code] to set deferred or one shot connections. See [code]CONNECT_*[/code] constants. A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected. To avoid this, first use [method is_connected] to check for existing connections. + Connects a [code]signal[/code] to a [code]method[/code] on a [code]target[/code] object. Pass optional [code]binds[/code] to the call. Use [code]flags[/code] to set deferred or one shot connections. See [code]CONNECT_*[/code] constants. + A [code]signal[/code] can only be connected once to a [code]method[/code]. It will throw an error if already connected. To avoid this, first, use [method is_connected] to check for existing connections. + If the [code]target[/code] is destroyed in the game's lifecycle, the connection will be lost. </description> </method> <method name="disconnect"> @@ -140,6 +142,7 @@ </argument> <description> Disconnects a [code]signal[/code] from a [code]method[/code] on the given [code]target[/code]. + If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists. </description> </method> <method name="emit_signal" qualifiers="vararg"> diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index 0023fce97d..7820c63ad7 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -15,13 +15,14 @@ <return type="AABB"> </return> <description> + Returns the bounding box that contains all the particles that are active in the current frame. </description> </method> <method name="restart"> <return type="void"> </return> <description> - Restarts the particle emmission, clearing existing particles. + Restarts the particle emission, clearing existing particles. </description> </method> </methods> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 6ae5afeac5..dd7a7cd151 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -214,14 +214,19 @@ Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation offset properties. </constant> <constant name="PARAM_MAX" value="12" enum="Parameter"> + Represents the size of the [enum Parameter] enum. </constant> <constant name="FLAG_ALIGN_Y_TO_VELOCITY" value="0" enum="Flags"> Use with [method set_flag] to set [member flag_align_y]. </constant> <constant name="FLAG_ROTATE_Y" value="1" enum="Flags"> - Use with [method set_flag] to set [member flag_rotate_y] + Use with [method set_flag] to set [member flag_rotate_y]. + </constant> + <constant name="FLAG_DISABLE_Z" value="2" enum="Flags"> + Use with [method set_flag] to set [member flag_disable_z]. </constant> <constant name="FLAG_MAX" value="3" enum="Flags"> + Represents the size of the [enum Flags] enum. </constant> <constant name="EMISSION_SHAPE_POINT" value="0" enum="EmissionShape"> All particles will be emitted from a single point. diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 7098f5f071..8f434e5499 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -109,7 +109,7 @@ <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset"> Amount to offset the polygon's [code]texture[/code]. If [code](0, 0)[/code] the texture's origin (its top-left corner) will be placed at the polygon's [code]position[/code]. </member> - <member name="texture_rotation" type="float" setter="set_texture_rotation_degrees" getter="get_texture_rotation_degrees"> + <member name="texture_rotation" type="float" setter="set_texture_rotation" getter="get_texture_rotation"> The texture's rotation in radians. </member> <member name="texture_rotation_degrees" type="float" setter="set_texture_rotation_degrees" getter="get_texture_rotation_degrees"> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index d4f4834a66..d6249f73aa 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -515,6 +515,9 @@ </method> </methods> <members> + <member name="allow_search" type="bool" setter="set_allow_search" getter="get_allow_search"> + If [code]true[/code], allows to navigate [PopupMenu] with letter keys. Default value: [code]false[/code]. + </member> <member name="hide_on_checkable_item_selection" type="bool" setter="set_hide_on_checkable_item_selection" getter="is_hide_on_checkable_item_selection"> </member> <member name="hide_on_item_selection" type="bool" setter="set_hide_on_item_selection" getter="is_hide_on_item_selection"> diff --git a/doc/classes/Position2D.xml b/doc/classes/Position2D.xml index 034e35d9d7..916bd99131 100644 --- a/doc/classes/Position2D.xml +++ b/doc/classes/Position2D.xml @@ -4,7 +4,7 @@ Generic 2D Position hint for editing. </brief_description> <description> - Generic 2D Position hint for editing. It's just like a plain [Node2D] but displays as a cross in the 2D-Editor at all times. + Generic 2D Position hint for editing. It's just like a plain [Node2D] but displays as a cross in the 2D-Editor at all times. You can set visual size of the cross by changing Gizmo Extents in the inspector. </description> <tutorials> </tutorials> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index ff8b702859..196fcbfaaa 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -374,11 +374,10 @@ Default orientation on mobile devices. </member> <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter=""> - If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance if not needed, so leave it on [code]false[/code] unless you need it. + If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance, so leave it on [code]false[/code] unless you need it. </member> <member name="display/window/per_pixel_transparency/enabled" type="bool" setter="" getter=""> - </member> - <member name="display/window/per_pixel_transparency/splash" type="bool" setter="" getter=""> + Set the window background to transparent when it starts. </member> <member name="display/window/size/always_on_top" type="bool" setter="" getter=""> Force the window to be always on top. @@ -410,6 +409,8 @@ <member name="editor/active" type="bool" setter="" getter=""> Internal editor setting, don't touch. </member> + <member name="editor/search_in_file_extensions" type="PoolStringArray" setter="" getter=""> + </member> <member name="gui/common/default_scroll_deadzone" type="int" setter="" getter=""> </member> <member name="gui/common/swap_ok_cancel" type="bool" setter="" getter=""> @@ -721,7 +722,7 @@ Shaders have a time variable that constantly increases. At some point, it needs to be rolled back to zero to avoid precision errors on shader animations. This setting specifies when (in seconds). </member> <member name="rendering/quality/2d/gles2_use_nvidia_rect_flicker_workaround" type="bool" setter="" getter=""> - Some NVIDIA GPU drivers have a bug which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to [url=https://github.com/godotengine/godot/issues/9913][/url] for details. + Some NVIDIA GPU drivers have a bug which produces flickering issues for the [code]draw_rect[/code] method, especially as used in [TileMap]. Refer to [url=https://github.com/godotengine/godot/issues/9913]GitHub issue 9913[/url] for details. If [code]true[/code], this option enables a "safe" code path for such NVIDIA GPUs at the cost of performance. This option only impacts the GLES2 rendering backend (so the bug stays if you use GLES3), and only desktop platforms. </member> <member name="rendering/quality/2d/use_pixel_snap" type="bool" setter="" getter=""> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index 8b6fb549aa..211bda1a09 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -7,7 +7,7 @@ Resource is the base class for all resource types, serving primarily as data containers. They are reference counted and freed when no longer in use. They are also loaded only once from disk, and further attempts to load the resource will return the same reference (all this in contrast to a [Node], which is not reference counted and can be instanced from disk as many times as desired). Resources can be saved externally on disk or bundled into another object, such as a [Node] or another resource. </description> <tutorials> - <link>https://docs.godotengine.org/en/stable/getting_started/step_by_step/resources.html</link> + <link>https://docs.godotengine.org/en/latest/getting_started/step_by_step/resources.html</link> </tutorials> <methods> <method name="_setup_local_to_scene" qualifiers="virtual"> diff --git a/doc/classes/RigidBody.xml b/doc/classes/RigidBody.xml index 9ea6bb0fe1..8dadca49e1 100644 --- a/doc/classes/RigidBody.xml +++ b/doc/classes/RigidBody.xml @@ -119,10 +119,10 @@ Lock the body's movement in the x-axis. </member> <member name="axis_lock_linear_y" type="bool" setter="set_axis_lock" getter="get_axis_lock"> - Lock the body's movement in the x-axis. + Lock the body's movement in the y-axis. </member> <member name="axis_lock_linear_z" type="bool" setter="set_axis_lock" getter="get_axis_lock"> - Lock the body's movement in the x-axis. + Lock the body's movement in the z-axis. </member> <member name="bounce" type="float" setter="set_bounce" getter="get_bounce"> RigidBody's bounciness. diff --git a/doc/classes/String.xml b/doc/classes/String.xml index e06f0738b8..af7e5a395a 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -7,7 +7,7 @@ This is the built-in string class (and the one used by GDScript). It supports Unicode and provides all necessary means for string handling. Strings are reference counted and use a copy-on-write approach, so passing them around is cheap in resources. </description> <tutorials> - <link>https://docs.godotengine.org/en/stable/getting_started/scripting/gdscript/gdscript_format_string.html</link> + <link>https://docs.godotengine.org/en/latest/getting_started/scripting/gdscript/gdscript_format_string.html</link> </tutorials> <methods> <method name="String"> @@ -662,16 +662,17 @@ <method name="rsplit"> <return type="PoolStringArray"> </return> - <argument index="0" name="divisor" type="String"> + <argument index="0" name="delimiter" type="String"> </argument> <argument index="1" name="allow_empty" type="bool" default="True"> </argument> <argument index="2" name="maxsplit" type="int" default="0"> </argument> <description> - Splits the string by a [code]divisor[/code] string and returns an array of the substrings, starting from right. - [b]Example:[/b] [code]"One,Two,Three"[/code] will return [code]["One","Two","Three"][/code] if split by [code]","[/code]. - If [code]maxsplit[/code] is specified, then it is number of splits to do, default is 0 which splits all the items. + Splits the string by a [code]delimiter[/code] string and returns an array of the substrings, starting from right. + The splits in the returned array are sorted in the same order as the original string, from left to right. + If [code]maxsplit[/code] is specified, it defines the number of splits to do from the right up to [code]maxsplit[/code]. The default value of 0 means that all items are split, thus giving the same result as [method split]. + [b]Example:[/b] [code]"One,Two,Three,Four"[/code] will return [code]["Three","Four"][/code] if split by [code]","[/code] with [code]maxsplit[/code] of 2. </description> </method> <method name="rstrip"> @@ -709,27 +710,27 @@ <method name="split"> <return type="PoolStringArray"> </return> - <argument index="0" name="divisor" type="String"> + <argument index="0" name="delimiter" type="String"> </argument> <argument index="1" name="allow_empty" type="bool" default="True"> </argument> <argument index="2" name="maxsplit" type="int" default="0"> </argument> <description> - Splits the string by a divisor string and returns an array of the substrings. - [b]Example:[/b] [code]"One,Two,Three"[/code] will return [code]["One","Two","Three"][/code] if split by [code]","[/code]. - If [code]maxsplit[/code] is given, at most maxsplit number of splits occur, and the remainder of the string is returned as the final element of the list (thus, the list will have at most maxsplit+1 elements) + Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. + If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of 0 means that all items are split. + [b]Example:[/b] [code]"One,Two,Three"[/code] will return [code]["One","Two"][/code] if split by [code]","[/code] with [code]maxsplit[/code] of 2. </description> </method> <method name="split_floats"> <return type="PoolRealArray"> </return> - <argument index="0" name="divisor" type="String"> + <argument index="0" name="delimiter" type="String"> </argument> <argument index="1" name="allow_empty" type="bool" default="True"> </argument> <description> - Splits the string in floats by using a divisor string and returns an array of the substrings. + Splits the string in floats by using a delimiter string and returns an array of the substrings. [b]Example:[/b] [code]"1,2.5,3"[/code] will return [code][1,2.5,3][/code] if split by [code]","[/code]. </description> </method> @@ -741,7 +742,14 @@ <argument index="1" name="right" type="bool" default="True"> </argument> <description> - Returns a copy of the string stripped of any non-printable character at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. + Returns a copy of the string stripped of any non-printable character (including tabulations, spaces and line breaks) at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. + </description> + </method> + <method name="strip_escapes"> + <return type="String"> + </return> + <description> + Returns a copy of the string stripped of any escape character. These include all non-printable control characters of the first page of the ASCII table (< 32), such as tabulation ([code]\t[/code] in C) and newline ([code]\n[/code] and [code]\r[/code]) characters, but not spaces. </description> </method> <method name="substr"> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index eb70d7a1c3..8ca553ccb8 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -388,10 +388,10 @@ <member name="draw_tabs" type="bool" setter="set_draw_tabs" getter="is_drawing_tabs"> If [code]true[/code], the "tab" character will have a visible representation. </member> - <member name="fold_gutter" type="bool" setter="set_fold_gutter_enabled" getter="is_fold_gutter_enabled"> + <member name="fold_gutter" type="bool" setter="set_draw_fold_gutter" getter="is_drawing_fold_gutter"> If [code]true[/code], the fold gutter is visible. This enables folding groups of indented lines. </member> - <member name="hiding_enabled" type="int" setter="set_hiding_enabled" getter="is_hiding_enabled"> + <member name="hiding_enabled" type="bool" setter="set_hiding_enabled" getter="is_hiding_enabled"> </member> <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled"> </member> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index c14e098b12..8fdef5540b 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -8,7 +8,7 @@ Theme resources can be alternatively loaded by writing them in a .theme file, see docs for more info. </description> <tutorials> - <link>https://docs.godotengine.org/en/stable/tutorials/gui/gui_skinning.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/gui/gui_skinning.html</link> </tutorials> <methods> <method name="clear"> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 0bf602dcf7..f29a7990ed 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -10,6 +10,18 @@ <tutorials> </tutorials> <methods> + <method name="_forward_atlas_subtile_selection" qualifiers="virtual"> + <return type="Vector2"> + </return> + <argument index="0" name="atlastile_id" type="int"> + </argument> + <argument index="1" name="tilemap" type="Object"> + </argument> + <argument index="2" name="tile_location" type="Vector2"> + </argument> + <description> + </description> + </method> <method name="_forward_subtile_selection" qualifiers="virtual"> <return type="Vector2"> </return> diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index 5d51f7ee09..eea4f8ed03 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -7,8 +7,8 @@ Translations are resources that can be loaded/unloaded on demand. They map a string to another string. </description> <tutorials> - <link>https://docs.godotengine.org/en/stable/tutorials/i18n/internationalizing_games.html</link> - <link>https://docs.godotengine.org/en/stable/tutorials/i18n/locales.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/i18n/locales.html</link> </tutorials> <methods> <method name="add_message"> diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 05774635b8..400a6e31d5 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -7,8 +7,8 @@ Server that manages all translations. Translations can be set to it and removed from it. </description> <tutorials> - <link>https://docs.godotengine.org/en/stable/tutorials/i18n/internationalizing_games.html</link> - <link>https://docs.godotengine.org/en/stable/tutorials/i18n/locales.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/i18n/internationalizing_games.html</link> + <link>https://docs.godotengine.org/en/latest/tutorials/i18n/locales.html</link> </tutorials> <methods> <method name="add_translation"> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 9524e048bb..f7887a87c8 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -163,8 +163,11 @@ <method name="get_next_visible"> <return type="TreeItem"> </return> + <argument index="0" name="wrap" type="bool" default="false"> + </argument> <description> Returns the next visible TreeItem in the tree. + If [code]wrap[/code] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns [code]null[/code]. </description> </method> <method name="get_parent"> @@ -184,8 +187,11 @@ <method name="get_prev_visible"> <return type="TreeItem"> </return> + <argument index="0" name="wrap" type="bool" default="false"> + </argument> <description> Returns the previous visible TreeItem in the tree. + If [code]wrap[/code] is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns [code]null[/code]. </description> </method> <method name="get_range" qualifiers="const"> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 75221ccc82..243dbceced 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -185,6 +185,17 @@ Returns the result of the linear interpolation between this vector and [code]b[/code] by amount [code]t[/code]. [code]t[/code] is in the range of [code]0.0 - 1.0[/code], representing the amount of interpolation. </description> </method> + <method name="move_toward"> + <return type="Vector2"> + </return> + <argument index="0" name="to" type="Vector2"> + </argument> + <argument index="1" name="delta" type="float"> + </argument> + <description> + Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount. + </description> + </method> <method name="normalized"> <return type="Vector2"> </return> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index bcd745945e..99bf3d2610 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -175,6 +175,17 @@ Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. </description> </method> + <method name="move_toward"> + <return type="Vector3"> + </return> + <argument index="0" name="to" type="Vector3"> + </argument> + <argument index="1" name="delta" type="float"> + </argument> + <description> + Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount. + </description> + </method> <method name="normalized"> <return type="Vector3"> </return> diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml index c3b668c170..0bc0e351e4 100644 --- a/doc/classes/VehicleWheel.xml +++ b/doc/classes/VehicleWheel.xml @@ -19,7 +19,7 @@ <return type="float"> </return> <description> - Returns a value between 0.0 and 1.0 that indicates whether this wheel is skidding. 0.0 is not skidding, 1.0 means the wheel has lost grip. + Returns a value between 0.0 and 1.0 that indicates whether this wheel is skidding. 0.0 is skidding (the wheel has lost grip, e.g. icy terrain), 1.0 means not skidding (the wheel has full grip, e.g. dry asphalt road). </description> </method> <method name="is_in_contact" qualifiers="const"> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index c3e15b2f9a..454c71d3c7 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -478,24 +478,7 @@ def make_rst_class(class_def, state, dry_run, output_dir): # type: (ClassDef, S f.write(make_heading('Tutorials', '-')) for t in class_def.tutorials: link = t.strip() - match = GODOT_DOCS_PATTERN.search(link) - if match: - groups = match.groups() - if match.lastindex == 2: - # Doc reference with fragment identifier: emit direct link to section with reference to page, for example: - # `#calling-javascript-from-script in Exporting For Web` - f.write("- `" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n\n") - # Commented out alternative: Instead just emit: - # `Subsection in Exporting For Web` - # f.write("- `Subsection <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`\n\n") - elif match.lastindex == 1: - # Doc reference, for example: - # `Math` - f.write("- :doc:`../" + groups[0] + "`\n\n") - else: - # External link, for example: - # `http://enet.bespin.org/usergroup0.html` - f.write("- `" + link + " <" + link + ">`_\n\n") + f.write("- " + make_url(link) + "\n\n") # Property descriptions if len(class_def.properties) > 0: @@ -802,15 +785,16 @@ def rstize_text(text, state): # type: (str, State) -> str tag_text = "" # '![](' + cmd[6:] + ')' elif cmd.find('url=') == 0: url_link = cmd[4:] - tag_text = ':ref:`' + tag_text = '`' tag_depth += 1 - url_has_name = False inside_url = True + url_has_name = False elif cmd == '/url': - tag_text = ('' if url_has_name else url_link) + '<' + url_link + ">`" + tag_text = ('' if url_has_name else url_link) + " <" + url_link + ">`_" tag_depth -= 1 escape_post = True inside_url = False + url_has_name = False elif cmd == 'center': tag_depth += 1 tag_text = '' @@ -996,5 +980,26 @@ def make_heading(title, underline): # type: (str, str) -> str return title + '\n' + (underline * len(title)) + "\n\n" +def make_url(link): # type: (str) -> str + match = GODOT_DOCS_PATTERN.search(link) + if match: + groups = match.groups() + if match.lastindex == 2: + # Doc reference with fragment identifier: emit direct link to section with reference to page, for example: + # `#calling-javascript-from-script in Exporting For Web` + return "`" + groups[1] + " <../" + groups[0] + ".html" + groups[1] + ">`_ in :doc:`../" + groups[0] + "`" + # Commented out alternative: Instead just emit: + # `Subsection in Exporting For Web` + # return "`Subsection <../" + groups[0] + ".html" + groups[1] + ">`__ in :doc:`../" + groups[0] + "`" + elif match.lastindex == 1: + # Doc reference, for example: + # `Math` + return ":doc:`../" + groups[0] + "`" + else: + # External link, for example: + # `http://enet.bespin.org/usergroup0.html` + return "`" + link + " <" + link + ">`_" + + if __name__ == '__main__': main() |