diff options
Diffstat (limited to 'doc/classes')
84 files changed, 521 insertions, 251 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index b25de3cf99..e84e265983 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -879,7 +879,7 @@ Ctrl key mask. </constant> <constant name="KEY_MASK_CMD" value="268435456" enum="KeyModifierMask"> - Cmd key mask. + Command key mask. On macOS, this is equivalent to [constant KEY_MASK_META]. On other platforms, this is equivalent to [constant KEY_MASK_CTRL]. This mask should be preferred to [constant KEY_MASK_META] or [constant KEY_MASK_CTRL] for system shortcuts as it handles all platforms correctly. </constant> <constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask"> Keypad key mask. diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index 44f1d9a921..af5598f126 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -43,7 +43,7 @@ <return type="float"> </return> <description> - Gets the area of the [AABB]. + Returns the volume of the [AABB]. </description> </method> <method name="get_endpoint"> @@ -66,7 +66,7 @@ <return type="int"> </return> <description> - Returns the index of the longest axis of the [AABB] (according to [Vector3]::AXIS* enum). + Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants). </description> </method> <method name="get_longest_axis_size"> @@ -182,7 +182,7 @@ <argument index="0" name="aabb" type="AABB"> </argument> <description> - Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. + Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="merge"> @@ -197,7 +197,7 @@ </methods> <members> <member name="end" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> - Ending corner. + Ending corner. This is calculated as [code]position + size[/code]. Changing this property changes [member size] accordingly. </member> <member name="position" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> Beginning corner. diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml index 9c6cfc1d7d..24d8b48077 100644 --- a/doc/classes/ARVRController.xml +++ b/doc/classes/ARVRController.xml @@ -22,7 +22,7 @@ <return type="int" enum="ARVRPositionalTracker.TrackerHand"> </return> <description> - Returns the hand holding this controller, if known. See [code]TRACKER_*[/code] constants in [ARVRPositionalTracker]. + Returns the hand holding this controller, if known. See [enum ARVRPositionalTracker.TrackerHand]. </description> </method> <method name="get_is_active" qualifiers="const"> @@ -61,7 +61,7 @@ <argument index="0" name="button" type="int"> </argument> <description> - Returns [code]true[/code] if the button at index [code]button[/code] is pressed. + Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoystickList], in particular the [code]JOY_VR_*[/code] constants. </description> </method> </methods> @@ -73,7 +73,8 @@ When a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off. </member> <member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0"> - The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly. + The degree to which the controller vibrates. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly. + This is a useful property to animate if you want the controller to vibrate for a limited duration. </member> </members> <signals> diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml index 1da1351e49..41effcaecb 100644 --- a/doc/classes/ARVRInterface.xml +++ b/doc/classes/ARVRInterface.xml @@ -21,7 +21,7 @@ <return type="int"> </return> <description> - Returns a combination of flags providing information about the capabilities of this interface. + Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface. </description> </method> <method name="get_name" qualifiers="const"> @@ -51,9 +51,9 @@ <description> Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output. After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. - [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot such as for mobile VR. - If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport and it will be used to output to the HMD leaving you free to do anything you like in the main window such as using a separate camera as a spectator camera or render out something completely different. - While currently not used you can activate additional interfaces, you may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD. + [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR. + If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different. + While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD. </description> </method> <method name="is_stereo"> @@ -73,13 +73,13 @@ </methods> <members> <member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled" default="false"> - On an AR interface, is our anchor detection enabled? + On an AR interface, [code]true[/code] if anchor detection is enabled. </member> <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized" default="false"> - Has this interface been initialized? + [code]true[/code] if this interface been initialized. </member> <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary" default="false"> - Is this our primary interface? + [code]true[/code] if this is the primary interface. </member> </members> <constants> @@ -93,10 +93,10 @@ This interface supports stereoscopic rendering. </constant> <constant name="ARVR_AR" value="4" enum="Capabilities"> - This interface support AR (video background and real world tracking). + This interface supports AR (video background and real world tracking). </constant> <constant name="ARVR_EXTERNAL" value="8" enum="Capabilities"> - This interface outputs to an external device, if the main viewport is used the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes. + This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes. </constant> <constant name="EYE_MONO" value="0" enum="Eyes"> Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported. @@ -111,7 +111,7 @@ Tracking is behaving as expected. </constant> <constant name="ARVR_EXCESSIVE_MOTION" value="1" enum="Tracking_status"> - Tracking is hindered by excessive motion, player is moving faster than tracking can keep up. + Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up). </constant> <constant name="ARVR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status"> Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc. diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml index 5551d48a08..c4acfd3b51 100644 --- a/doc/classes/ARVRPositionalTracker.xml +++ b/doc/classes/ARVRPositionalTracker.xml @@ -15,7 +15,7 @@ <return type="int" enum="ARVRPositionalTracker.TrackerHand"> </return> <description> - Returns the hand holding this tracker, if known. See [code]TRACKER_*[/code] constants. + Returns the hand holding this tracker, if known. See [enum TrackerHand] constants. </description> </method> <method name="get_joy_id" qualifiers="const"> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 97da8c9980..9924f75289 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -656,7 +656,7 @@ <argument index="1" name="mode" type="int" enum="Animation.UpdateMode"> </argument> <description> - Sets the update mode ([code]UPDATE_*[/code]) of a value track. + Sets the update mode (see [enum UpdateMode]) of a value track. </description> </method> </methods> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 60d04649a8..a47b4a590e 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -106,7 +106,7 @@ <return type="float"> </return> <description> - Gets the actual playing speed of current animation or 0 if not playing. This speed is the [code]playback_speed[/code] property multiplied by [code]custom_speed[/code] argument specified when calling the [code]play[/code] method. + Gets the actual playing speed of current animation or 0 if not playing. This speed is the [member playback_speed] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method. </description> </method> <method name="get_queue"> @@ -144,9 +144,9 @@ <argument index="3" name="from_end" type="bool" default="false"> </argument> <description> - Plays the animation with key [code]name[/code]. Custom speed and blend times can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards. - If the animation has been paused by [method stop], it will be resumed. Calling [method play] without arguments will also resume the animation. - [b]Note:[/b] The animation will be updated the next time the AnimationPlayer is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code]. + Plays the animation with key [code]name[/code]. Custom blend times and speed can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]). + The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [code]name[/code], or with no [code]name[/code] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing. + [b]Note:[/b] The animation will be updated the next time the [AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code]. </description> </method> <method name="play_backwards"> @@ -158,8 +158,7 @@ </argument> <description> Plays the animation with key [code]name[/code] in reverse. - If the animation has been paused by [code]stop(true)[/code], it will be resumed backwards. Calling [code]play_backwards()[/code] without arguments will also resume the animation backwards. - [b]Note:[/b] This is the same as [code]play[/code] in regards to process/update behavior. + This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information. </description> </method> <method name="queue"> @@ -222,8 +221,8 @@ <argument index="0" name="reset" type="bool" default="true"> </argument> <description> - Stops the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. - If [code]reset[/code] is [code]false[/code], then calling [method play] without arguments or [code]play("same_as_before")[/code] will resume the animation. Works the same for the [method play_backwards]. + Stops or pauses the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. + If [code]reset[/code] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation. </description> </method> </methods> diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml index 3b6003b478..0d7a34b179 100644 --- a/doc/classes/AnimationTreePlayer.xml +++ b/doc/classes/AnimationTreePlayer.xml @@ -285,7 +285,7 @@ <argument index="0" name="id" type="String"> </argument> <description> - Gets the node type, will return from [code]NODE_*[/code] enum. + Gets the node type, will return from [enum NodeType] enum. </description> </method> <method name="node_rename"> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 9f32691e57..62ff0edbd2 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -47,7 +47,7 @@ </argument> <description> Creates a new surface. - Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. See [Mesh] for details. (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. + Surfaces are created to be rendered using a [code]primitive[/code], 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. The [code]arrays[/code] argument is an array of arrays. See [enum ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant ARRAY_INDEX] if it is used. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data, and the index array defines the order of the vertices. Godot uses clockwise winding order for front faces of triangle primitive modes. diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 4bc29335ff..89fc18476b 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -57,7 +57,7 @@ Bus on which this audio is playing. </member> <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0"> - If the audio configuration has more than two speakers, this sets the target channels. See [code]MIX_TARGET_*[/code] constants. + If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants. </member> <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0"> Changes the pitch and the tempo of the audio. diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index a496902ded..bb418f3c36 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -27,7 +27,7 @@ [b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte. </member> <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="0"> - Audio format. See [code]FORMAT_*[/code] constants for values. + Audio format. See [enum Format] constants for values. </member> <member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" default="0"> Loop start in bytes. @@ -36,7 +36,7 @@ Loop end in bytes. </member> <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode" default="0"> - Loop mode. See [code]LOOP_*[/code] constants for values. + Loop mode. See [enum LoopMode] constants for values. </member> <member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100"> The sample rate for mixing this audio. diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index b4f4b21afd..21f46efe84 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -22,14 +22,14 @@ <argument index="0" name="button_pressed" type="bool"> </argument> <description> - Called when the button is toggled (only if toggle_mode is active). + Called when the button is toggled (only if [member toggle_mode] is active). </description> </method> <method name="get_draw_mode" qualifiers="const"> <return type="int" enum="BaseButton.DrawMode"> </return> <description> - Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [code]DRAW_*[/code] enum. + Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [enum DrawMode] enum. </description> </method> <method name="is_hovered" qualifiers="const"> @@ -42,7 +42,7 @@ </methods> <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1"> - Determines when the button is considered clicked, one of the [code]ACTION_MODE_*[/code] constants. + Determines when the button is considered clicked, one of the [enum ActionMode] constants. </member> <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1"> Binary mask to choose which mouse buttons this button will respond to. @@ -62,7 +62,7 @@ If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> - If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active). + If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). </member> <member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut"> [ShortCut] associated to the button. diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 305be8b58d..3b73580294 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -12,7 +12,7 @@ </methods> <members> <member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign" default="1"> - Text alignment policy for the button's text, use one of the [code]ALIGN_*[/code] constants. + Text alignment policy for the button's text, use one of the [enum TextAlign] constants. </member> <member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false"> When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index 6f1627e296..b575fa72e0 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -103,7 +103,7 @@ </methods> <members> <member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode" default="1"> - The Camera2D's anchor point. See [code]ANCHOR_MODE_*[/code] constants. + The Camera2D's anchor point. See [enum AnchorMode] constants. </member> <member name="current" type="bool" setter="_set_current" getter="is_current" default="false"> If [code]true[/code], the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index e03229abe1..ef9a366c86 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -1,39 +1,51 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CharFXTransform" inherits="Reference" category="Core" version="3.2"> <brief_description> + Controls how an individual character will be displayed in a [RichTextEffect]. </brief_description> <description> + By setting various properties on this object, you can control how individual characters will be displayed in a [RichTextEffect]. </description> <tutorials> + <link>http://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> + <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> <methods> - <method name="get_value_or"> - <return type="Variant"> - </return> - <argument index="0" name="key" type="String"> - </argument> - <argument index="1" name="default_value" type="Variant"> - </argument> - <description> - </description> - </method> </methods> <members> <member name="absolute_index" type="int" setter="set_absolute_index" getter="get_absolute_index" default="0"> + The index of the current character (starting from 0). Setting this property won't affect drawing. </member> <member name="character" type="int" setter="set_character" getter="get_character" default="0"> + The Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks: + [codeblock] + # `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`. + # See the RichTextEffect documentation for details. + char_fx.character = ord("*") + [/codeblock] </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )"> + The color the character will be drawn with. </member> <member name="elapsed_time" type="float" setter="set_elapsed_time" getter="get_elapsed_time" default="0.0"> + The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS]. + [b]Note:[/b] Time still passes while the [RichTextLabel] is hidden. </member> <member name="env" type="Dictionary" setter="set_environment" getter="get_environment" default="{}"> + Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], [int] or [float], they will be converted automatically. Color codes in the form [code]#rrggbb[/code] or [code]#rgb[/code] will be converted to an opaque [Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string. + For example, the opening BBCode tag [code][example foo=hello bar=true baz=42 color=#ffffff][/code] will map to the following [Dictionary]: + [codeblock] + {"foo": "hello", "bar": true, "baz": 42, "color": Color(1, 1, 1, 1)} + [/codeblock] </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> + The position offset the character will be drawn with (in pixels). </member> <member name="relative_index" type="int" setter="set_relative_index" getter="get_relative_index" default="0"> + The index of the current character (starting from 0). Setting this property won't affect drawing. </member> <member name="visible" type="bool" setter="set_visibility" getter="is_visible" default="true"> + If [code]true[/code], the character will be drawn. If [code]false[/code], the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to [code]Color(1, 1, 1, 0)[/code] instead. </member> </members> <constants> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index fe46d45f71..1d935a3e99 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -4,7 +4,7 @@ Defines a 2D collision polygon. </brief_description> <description> - Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygon can be drawn in the editor or specified by a list of vertices. + Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygons can be drawn in the editor or specified by a list of vertices. </description> <tutorials> </tutorials> @@ -12,18 +12,18 @@ </methods> <members> <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode" default="0"> - Collision build mode. Use one of the [code]BUILD_*[/code] constants. + Collision build mode. Use one of the [enum BuildMode] constants. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> If [code]true[/code], no collisions will be detected. </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false"> - If [code]true[/code], only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. + If [code]true[/code], only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects. </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> - The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference. + The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PoolVector2Array], not a reference. </member> </members> <constants> diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index 5fd8826a98..4166ee31d3 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -19,6 +19,7 @@ Sets whether this collision shape should only detect collision on one side (top or bottom). </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> + The margin used for one-way collision (in pixels). </member> <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape"> The actual shape owned by this collision shape. diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index 56f54e4434..d99f90d09a 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -104,7 +104,8 @@ <argument index="0" name="path" type="String"> </argument> <description> - Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object which the method was called on. Returns one of the [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK]. + Loads the config file specified as a parameter. The file's contents are parsed and loaded in the ConfigFile object which the method was called on. + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="load_encrypted"> @@ -133,7 +134,8 @@ <argument index="0" name="path" type="String"> </argument> <description> - Saves the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. Returns one of the [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK]. + Saves the contents of the ConfigFile object to the file specified as a parameter. The output file uses an INI-style structure. + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="save_encrypted"> diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index 8a8d1ed9e8..01a2eebce5 100644 --- a/doc/classes/ConfirmationDialog.xml +++ b/doc/classes/ConfirmationDialog.xml @@ -5,6 +5,10 @@ </brief_description> <description> Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order). + To get cancel action, you can use: + [codeblock] + get_cancel().connect("pressed", self, "cancelled") + [/codeblock]. </description> <tutorials> </tutorials> diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml index 2cedc78499..6db1cf2d64 100644 --- a/doc/classes/CubeMap.xml +++ b/doc/classes/CubeMap.xml @@ -22,7 +22,7 @@ <argument index="0" name="side" type="int" enum="CubeMap.Side"> </argument> <description> - Returns an [Image] for a side of the [CubeMap] using one of the [code]SIDE_*[/code] constants or an integer 0-5. + Returns an [Image] for a side of the [CubeMap] using one of the [enum Side] constants. </description> </method> <method name="get_width" qualifiers="const"> @@ -40,19 +40,19 @@ <argument index="1" name="image" type="Image"> </argument> <description> - Sets an [Image] for a side of the [CubeMap] using one of the [code]SIDE_*[/code] constants or an integer 0-5. + Sets an [Image] for a side of the [CubeMap] using one of the [enum Side] constants. </description> </method> </methods> <members> <member name="flags" type="int" setter="set_flags" getter="get_flags" default="7"> - The render flags for the [CubeMap]. See the [code]FLAG_*[/code] constants for details. + The render flags for the [CubeMap]. See the [enum Flags] constants for details. </member> <member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7"> - The lossy storage quality of the [CubeMap] if the storage mode is set to STORAGE_COMPRESS_LOSSY. + The lossy storage quality of the [CubeMap] if the storage mode is set to [constant STORAGE_COMPRESS_LOSSY]. </member> <member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage" default="0"> - The [CubeMap]'s storage mode. See [code]STORAGE_*[/code] constants. + The [CubeMap]'s storage mode. See [enum Storage] constants. </member> </members> <constants> diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index 8aae85563a..754fafadbe 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -33,7 +33,7 @@ </argument> <description> Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]). - The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="copy"> @@ -45,7 +45,7 @@ </argument> <description> Copies the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. - Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="current_is_dir" qualifiers="const"> @@ -145,7 +145,7 @@ </argument> <description> Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]). - The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="make_dir_recursive"> @@ -155,7 +155,7 @@ </argument> <description> Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path. - Returns one of the error code constants defined in [@GlobalScope] ([code]0K[/code], [code]FAILED[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="open"> @@ -165,7 +165,7 @@ </argument> <description> Opens an existing directory of the filesystem. The [code]path[/code] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]). - The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="remove"> @@ -175,7 +175,7 @@ </argument> <description> Deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. - Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="rename"> @@ -187,7 +187,7 @@ </argument> <description> Renames (move) the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. - Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> </methods> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 5395a8fcb0..18e8ee2d7e 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -21,7 +21,10 @@ <argument index="0" name="info" type="Dictionary"> </argument> <description> - Adds a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String]. + Adds a custom property info to a property. The dictionary must contain: + - [code]name[/code]: [String] (the name of the property) + - [code]type[/code]: [int] (see [enum Variant.Type]) + - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String] [b]Example:[/b] [codeblock] editor_settings.set("category/property_name", 0) diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 0d64f0ff64..1feccec501 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -45,7 +45,7 @@ Global contrast value of the rendered scene (default value is 1). </member> <member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled" default="false"> - Enables the adjustment_* options provided by this resource. If [code]false[/code], adjustments modifications will have no effect on the rendered scene. + Enables the [code]adjustment_*[/code] options provided by this resource. If [code]false[/code], adjustments modifications will have no effect on the rendered scene. </member> <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0"> Global color saturation value of the rendered scene (default value is 1). diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 80e9b152ef..3041a7cb7f 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -87,6 +87,8 @@ <return type="HBoxContainer"> </return> <description> + Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph. + Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of it's children use their [member CanvasItem.visible] property instead. </description> </method> <method name="is_node_connected"> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 8470a346ff..77b3eb1ca0 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -5,6 +5,7 @@ </brief_description> <description> A GraphNode is a container defined by a title. It can have one or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections. + To add a slot to GraphNode, add any [Control]-derived child node to it. </description> <tutorials> </tutorials> @@ -169,6 +170,12 @@ <argument index="8" name="custom_right" type="Texture" default="null"> </argument> <description> + Sets properties of the slot with id [code]idx[/code]. + If [code]enable_left[/code]/[code]right[/code], a port will appear and the slot will be able to be connected from this side. + [code]type_left[/code]/[code]right[/code] is an arbitrary type of the port. Only ports with the same type values can be connected. + [code]color_left[/code]/[code]right[/code] is the tint of the port's icon on this side. + [code]custom_left[/code]/[code]right[/code] is a custom texture for this side's port. + [b]Note:[/b] this method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode. </description> </method> </methods> diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml index 2fef4669d2..4e7d9bc9f3 100644 --- a/doc/classes/HSlider.xml +++ b/doc/classes/HSlider.xml @@ -13,20 +13,14 @@ <constants> </constants> <theme_items> - <theme_item name="focus" type="StyleBox"> - </theme_item> <theme_item name="grabber" type="Texture"> </theme_item> <theme_item name="grabber_area" type="StyleBox"> </theme_item> <theme_item name="grabber_disabled" type="Texture"> </theme_item> - <theme_item name="grabber_disabled" type="StyleBox"> - </theme_item> <theme_item name="grabber_highlight" type="Texture"> </theme_item> - <theme_item name="grabber_highlight" type="StyleBox"> - </theme_item> <theme_item name="slider" type="StyleBox"> </theme_item> <theme_item name="tick" type="Texture"> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 3347eeafa7..3a63b2dc07 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -79,7 +79,7 @@ <return type="int" enum="HTTPClient.Status"> </return> <description> - Returns a [code]STATUS_*[/code] enum constant. Need to call [method poll] in order to get status updates. + Returns a [enum Status] constant. Need to call [method poll] in order to get status updates. </description> </method> <method name="has_response" qualifiers="const"> @@ -112,13 +112,13 @@ Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: [codeblock] var fields = {"username": "user", "password": "pass"} - String query_string = http_client.query_string_from_dict(fields) + var query_string = http_client.query_string_from_dict(fields) # Returns "username=user&password=pass" [/codeblock] Furthermore, if a key has a [code]null[/code] value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. [codeblock] var fields = {"single": 123, "not_valued": null, "multiple": [22, 33, 44]} - String query_string = http_client.query_string_from_dict(fields) + var query_string = http_client.query_string_from_dict(fields) # Returns "single=123&not_valued&multiple=22&multiple=33&multiple=44" [/codeblock] </description> @@ -143,7 +143,7 @@ </argument> <description> Sends a request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code]. - Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/code]. + Headers are HTTP request headers. For available HTTP methods, see [enum Method]. To create a POST request with query strings to push to the server, do: [codeblock] var fields = {"username" : "user", "password" : "pass"} @@ -166,7 +166,7 @@ </argument> <description> Sends a raw request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code]. - Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/code]. + Headers are HTTP request headers. For available HTTP methods, see [enum Method]. Sends the body data raw, as a byte array and does not encode it in any way. </description> </method> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 98ba08e6a2..2fed423a32 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -67,7 +67,7 @@ <return type="int" enum="HTTPClient.Status"> </return> <description> - Returns the current status of the underlying [HTTPClient]. See [code]STATUS_*[/code] enum on [HTTPClient]. + Returns the current status of the underlying [HTTPClient]. See [enum HTTPClient.Status]. </description> </method> <method name="request"> diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml index b8b5f0bd39..bfc645b8e7 100644 --- a/doc/classes/IP.xml +++ b/doc/classes/IP.xml @@ -65,7 +65,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns a queued hostname's status as a [code]RESOLVER_STATUS_*[/code] constant, given its queue [code]id[/code]. + Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [code]id[/code]. </description> </method> <method name="resolve_hostname"> @@ -76,7 +76,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [code]TYPE_*[/code] constant given as [code]ip_type[/code]. + Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [code]ip_type[/code]. </description> </method> <method name="resolve_hostname_queue_item"> @@ -87,7 +87,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [code]TYPE_*[/code] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error. + Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error. </description> </method> </methods> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index c6d63035d1..0303585120 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -90,7 +90,7 @@ <argument index="2" name="lossy_quality" type="float"> </argument> <description> - Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [code]COMPRESS_*[/code] constants. + Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [enum CompressMode] and [enum CompressSource] constants. </description> </method> <method name="convert"> @@ -99,7 +99,7 @@ <argument index="0" name="format" type="int" enum="Image.Format"> </argument> <description> - Converts the image's format. See [code]FORMAT_*[/code] constants. + Converts the image's format. See [enum Format] constants. </description> </method> <method name="copy_from"> @@ -123,7 +123,7 @@ <argument index="3" name="format" type="int" enum="Image.Format"> </argument> <description> - Creates an empty image of given size and format. See [code]FORMAT_*[/code] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. + Creates an empty image of given size and format. See [enum Format] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. </description> </method> <method name="create_from_data"> @@ -140,7 +140,7 @@ <argument index="4" name="data" type="PoolByteArray"> </argument> <description> - Creates a new image of given size and format. See [code]FORMAT_*[/code] 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 generate mipmaps for this image. See the [method generate_mipmaps]. </description> </method> <method name="crop"> @@ -165,7 +165,7 @@ <return type="int" enum="Image.AlphaMode"> </return> <description> - Returns ALPHA_BLEND if the image has data for alpha values. Returns ALPHA_BIT if all the alpha values are below a certain threshold or the maximum value. Returns ALPHA_NONE if no data for alpha values is found. + Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are below a certain threshold or the maximum value. Returns [constant ALPHA_NONE] if no data for alpha values is found. </description> </method> <method name="expand_x2_hq2x"> @@ -225,7 +225,7 @@ <return type="int" enum="Image.Format"> </return> <description> - Returns the image's format. See [code]FORMAT_*[/code] constants. + Returns the image's format. See [enum Format] constants. </description> </method> <method name="get_height" qualifiers="const"> @@ -491,7 +491,7 @@ </methods> <members> <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"data": PoolByteArray( ),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}"> - Holds all of the image's color data in a given format. See [code]FORMAT_*[/code] constants. + Holds all of the image's color data in a given format. See [enum Format] constants. </member> </members> <constants> diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml index ddfd3d74d5..e0807760f7 100644 --- a/doc/classes/ImmediateGeometry.xml +++ b/doc/classes/ImmediateGeometry.xml @@ -41,8 +41,8 @@ <argument index="1" name="texture" type="Texture" default="null"> </argument> <description> - Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references. - For the type of primitive, use the [Mesh].[code]PRIMITIVE_*[/code] enumerations. + Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references. + For the type of primitive, see the [enum Mesh.PrimitiveType] enum. </description> </method> <method name="clear"> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 6d4adfad51..3f94ad2d2c 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -314,7 +314,7 @@ <argument index="2" name="hotspot" type="Vector2" default="Vector2( 0, 0 )"> </argument> <description> - Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See enum [code]CURSOR_*[/code] for the list of shapes. + Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes. [code]image[/code]'s size must be lower than 256×256. [code]hotspot[/code] must be within [code]image[/code]'s size. [b]Note:[/b] [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed. diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml index 98db123f5b..01cffe6262 100644 --- a/doc/classes/JSONParseResult.xml +++ b/doc/classes/JSONParseResult.xml @@ -12,13 +12,13 @@ </methods> <members> <member name="error" type="int" setter="set_error" getter="get_error" enum="Error"> - The error type if the JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants. + The error type if the JSON source was not successfully parsed. See the [enum Error] constants. </member> <member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="-1"> The line number where the error occurred if JSON source was not successfully parsed. </member> <member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default=""""> - The error message if JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants. + The error message if JSON source was not successfully parsed. See the [enum Error] constants. </member> <member name="result" type="Variant" setter="set_result" getter="get_result"> A [Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with braces ([code][][/code]), an [Array] will be returned. diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index 2fab689f89..164932749f 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -18,6 +18,7 @@ <argument index="0" name="axis" type="int" enum="PhysicsServer.BodyAxis"> </argument> <description> + Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z]. </description> </method> <method name="get_floor_velocity" qualifiers="const"> @@ -125,7 +126,7 @@ </argument> <description> Moves the body while keeping it attached to slopes. Similar to [method move_and_slide]. - As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting[code]snap[/code] to[code](0, 0, 0)[/code] or by using [method move_and_slide] instead. + As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code](0, 0, 0)[/code] or by using [method move_and_slide] instead. </description> </method> <method name="set_axis_lock"> @@ -136,6 +137,7 @@ <argument index="1" name="lock" type="bool"> </argument> <description> + Locks or unlocks the specified [code]axis[/code] depending on the value of [code]lock[/code]. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z]. </description> </method> <method name="test_move"> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 4d1584e9de..9222611090 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -41,7 +41,7 @@ </methods> <members> <member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align" default="0"> - Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [code]ALIGN_*[/code] constants. + Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [enum Align] constants. </member> <member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false"> If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. @@ -67,7 +67,7 @@ If [code]true[/code], all the text displays as UPPERCASE. </member> <member name="valign" type="int" setter="set_valign" getter="get_valign" enum="Label.VAlign" default="0"> - Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants. + Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [enum VAlign] constants. </member> <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1"> Restricts the number of characters to display. Set to -1 to disable. diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index f61be5a5af..5bb90daaf4 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -26,7 +26,7 @@ The Light2D's energy value. The larger the value, the stronger the light. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Light2D.Mode" default="0"> - The Light2D's mode. See [code]MODE_*[/code] constants for values. + The Light2D's mode. See [enum Mode] constants for values. </member> <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )"> The offset of the Light2D's [code]texture[/code]. diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index b11f3e27e5..9eaf70711e 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -70,13 +70,13 @@ If [code]true[/code], the line's border will be anti-aliased. </member> <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode" default="0"> - Controls the style of the line's first point. Use [code]LINE_CAP_*[/code] constants. + Controls the style of the line's first point. Use [enum LineCapMode] constants. </member> <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" default="Color( 0.4, 0.5, 1, 1 )"> The line's color. Will not be used if a gradient is set. </member> <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode" default="0"> - Controls the style of the line's last point. Use [code]LINE_CAP_*[/code] constants. + Controls the style of the line's last point. Use [enum LineCapMode] constants. </member> <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient"> The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set. @@ -97,7 +97,7 @@ The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style. </member> <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode" default="0"> - The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants. + The style to render the [code]texture[/code] on the line. Use [enum LineTextureMode] constants. </member> <member name="width" type="float" setter="set_width" getter="get_width" default="10.0"> The line's width. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index de216563d3..78459d2839 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -54,7 +54,7 @@ <argument index="0" name="option" type="int"> </argument> <description> - Executes a given action as defined in the[code]MENU_*[/code] enum. + Executes a given action as defined in the [enum MenuItems] enum. </description> </method> <method name="select"> @@ -84,7 +84,7 @@ </methods> <members> <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0"> - Text alignment as defined in the [code]ALIGN_*[/code] enum. + Text alignment as defined in the [enum Align] enum. </member> <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false"> If [code]true[/code], the caret (visual cursor) blinks. diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index f7b3b0d7ea..d4804930e1 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -40,6 +40,14 @@ Generate a [TriangleMesh] from the mesh. </description> </method> + <method name="get_aabb" qualifiers="const"> + <return type="AABB"> + </return> + <description> + Returns the smallest [AABB] enclosing this mesh. Not affected by [code]custom_aabb[/code]. + [b]Note:[/b] This is only implemented for [ArrayMesh] and [PrimitiveMesh]. + </description> + </method> <method name="get_faces" qualifiers="const"> <return type="PoolVector3Array"> </return> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index 5f8c7ed120..9cd3fe7bb4 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -92,7 +92,7 @@ [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master (see [code]NETWORK_MODE_*[/code] constants in [Node]), or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. </member> <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false"> If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index e9fb47cbbd..193cfeb0ff 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -839,7 +839,7 @@ Pause mode. How the node will behave if the [SceneTree] is paused. </member> <member name="process_priority" type="int" setter="set_process_priority" getter="get_process_priority" default="0"> - The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes with a higher process priority will have their processing callbacks executed first. + The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is [i]lower[/i] will have their processing callbacks executed first. </member> </members> <signals> @@ -994,6 +994,7 @@ </constant> <constant name="DUPLICATE_USE_INSTANCING" value="8" enum="DuplicateFlags"> Duplicate using instancing. + An instance stays linked to the original so when the original changes, the instance changes too. </constant> </constants> </class> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 6da0547352..54b4f3df64 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -45,6 +45,8 @@ <return type="void"> </return> <description> + Shuts down system MIDI driver. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="delay_msec" qualifiers="const"> @@ -119,6 +121,7 @@ [codeblock] OS.execute("CMD.exe", ["/C", "cd %TEMP% && dir"], true, output) [/codeblock] + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> <method name="find_scancode_from_string" qualifiers="const"> @@ -159,6 +162,7 @@ <description> Returns an array of MIDI device names. The returned array will be empty if the system MIDI driver has not previously been initialised with [method open_midi_inputs]. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_current_video_driver" qualifiers="const"> @@ -224,6 +228,7 @@ </return> <description> With this function you can get the list of dangerous permissions that have been granted to the Android application. + [b]Note:[/b] This method is implemented on Android. </description> </method> <method name="get_ime_selection" qualifiers="const"> @@ -232,6 +237,7 @@ <description> Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string. [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="get_ime_text" qualifiers="const"> @@ -240,6 +246,7 @@ <description> Returns the IME intermediate composition string. [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="get_latin_keyboard_variant" qualifiers="const"> @@ -248,6 +255,7 @@ <description> Returns the current latin keyboard variant as a String. Possible return values are: [code]"QWERTY"[/code], [code]"AZERTY"[/code], [code]"QZERTY"[/code], [code]"DVORAK"[/code], [code]"NEO"[/code], [code]"COLEMAK"[/code] or [code]"ERROR"[/code]. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. Returns [code]"QWERTY"[/code] on unsupported platforms. </description> </method> <method name="get_locale" qualifiers="const"> @@ -262,6 +270,7 @@ </return> <description> Returns the model name of the current device. + [b]Note:[/b] This method is implemented on Android and iOS. Returns [code]"GenericDevice"[/code] on unsupported platforms. </description> </method> <method name="get_name" qualifiers="const"> @@ -275,14 +284,16 @@ <return type="int"> </return> <description> - Returns the amount of battery left in the device as a percentage. + Returns the amount of battery left in the device as a percentage. Returns [code]-1[/code] if power state is unknown. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_power_seconds_left"> <return type="int"> </return> <description> - Returns an estimate of the time left in seconds before the device runs out of battery. + Returns an estimate of the time left in seconds before the device runs out of battery. Returns [code]-1[/code] if power state is unknown. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_power_state"> @@ -290,6 +301,7 @@ </return> <description> Returns the current state of the device regarding battery and power. See [enum PowerState] constants. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_process_id" qualifiers="const"> @@ -297,6 +309,7 @@ </return> <description> Returns the project's process ID. + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> <method name="get_processor_count" qualifiers="const"> @@ -345,6 +358,7 @@ xxhdpi - 480 dpi xxxhdpi - 640 dpi [/codeblock] + [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms. </description> </method> <method name="get_screen_position" qualifiers="const"> @@ -393,6 +407,7 @@ </argument> <description> Returns the actual path to commonly used folders across different platforms. Available locations are specified in [enum SystemDir]. + [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. </description> </method> <method name="get_system_time_msecs" qualifiers="const"> @@ -519,6 +534,7 @@ </argument> <description> Add a new item with text "label" to global menu. Use "_dock" menu to add item to the macOS dock icon menu. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="global_menu_add_separator"> @@ -528,6 +544,7 @@ </argument> <description> Add a separator between items. Separators also occupy an index. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="global_menu_clear"> @@ -537,6 +554,7 @@ </argument> <description> Clear the global menu, in effect removing all items. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="global_menu_remove_item"> @@ -548,6 +566,7 @@ </argument> <description> Removes the item at index "idx" from the global menu. Note that the indexes of items after the removed item are going to be shifted by one. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="has_environment" qualifiers="const"> @@ -644,6 +663,7 @@ <description> Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode. [b]Note:[/b] This method can also be used to kill processes that were not spawned by the game. + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> <method name="move_window_to_foreground"> @@ -651,6 +671,7 @@ </return> <description> Moves the window to the front. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="native_video_is_playing"> @@ -658,6 +679,7 @@ </return> <description> Returns [code]true[/code] if native video is playing. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="native_video_pause"> @@ -665,6 +687,7 @@ </return> <description> Pauses native video playback. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="native_video_play"> @@ -680,7 +703,7 @@ </argument> <description> Plays native video from the specified path, at the given volume and with audio and subtitle tracks. - [b]Note:[/b] This method is only implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options. + [b]Note:[/b] This method is implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options. </description> </method> <method name="native_video_stop"> @@ -688,6 +711,7 @@ </return> <description> Stops native video playback. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="native_video_unpause"> @@ -695,6 +719,7 @@ </return> <description> Resumes native video playback. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="open_midi_inputs"> @@ -702,6 +727,7 @@ </return> <description> Initialises the singleton for the system MIDI driver. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="print_all_resources"> @@ -743,6 +769,7 @@ </return> <description> Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="request_permission"> @@ -759,6 +786,7 @@ </return> <description> With this function you can request dangerous permissions since normal permissions are automatically granted at install time in Android application. + [b]Note:[/b] This method is implemented on Android. </description> </method> <method name="set_icon"> @@ -769,6 +797,7 @@ <description> Sets the game's icon using an [Image] resource. The same image is used for window caption, taskbar/dock and window selection dialog. Image is scaled as needed. + [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows. </description> </method> <method name="set_ime_active"> @@ -781,6 +810,7 @@ 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. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="set_ime_position"> @@ -790,6 +820,7 @@ </argument> <description> Sets position of IME suggestion list popup (in window coordinates). + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="set_native_icon"> @@ -800,7 +831,7 @@ <description> Sets the game's icon using a multi-size platform-specific icon file ([code]*.ico[/code] on Windows and [code]*.icns[/code] on macOS). Appropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog. - [b]Note:[/b] This method is only implemented on macOS and Windows. + [b]Note:[/b] This method is implemented on macOS and Windows. </description> </method> <method name="set_thread_name"> @@ -828,6 +859,7 @@ </argument> <description> Sets whether the window should always be on top. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="set_window_title"> @@ -838,6 +870,7 @@ <description> Sets the window title to the specified string. [b]Note:[/b] This should be used sporadically. Don't set this every frame, as that will negatively affect performance on some window managers. + [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows. </description> </method> <method name="shell_open"> @@ -850,6 +883,7 @@ - [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder. - [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website. - [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing [code]mailto:[/code] Links[/url] for a list of fields that can be added. + [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows. </description> </method> <method name="show_virtual_keyboard"> @@ -859,6 +893,7 @@ </argument> <description> Shows the virtual keyboard if the platform has one. The [code]existing_text[/code] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). + [b]Note:[/b] This method is implemented on Android, iOS and UWP. </description> </method> </methods> @@ -893,6 +928,9 @@ <member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled" default="true"> If [code]true[/code], vertical synchronization (Vsync) is enabled. </member> + <member name="vsync_via_compositor" type="bool" setter="set_vsync_via_compositor" getter="is_vsync_via_compositor_enabled" default="false"> + If [code]true[/code] and [code]vsync_enabled[/code] is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode. + </member> <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window" default="false"> If [code]true[/code], removes the window frame. [b]Note:[/b] Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency. @@ -910,6 +948,7 @@ 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. [b]Note:[/b] This property has no effect if [b]Project > Project Settings > Display > Window > Per-pixel transparency > Allowed[/b] setting is disabled. + [b]Note:[/b] This property is implemented on Linux, macOS and Windows. </member> <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position" default="Vector2( 0, 0 )"> 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/OptionButton.xml b/doc/classes/OptionButton.xml index b3f1359e69..0debb988ce 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -19,7 +19,7 @@ <argument index="2" name="id" type="int" default="-1"> </argument> <description> - Adds an item, with a [code]texture[/code] icon, text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, [code]id[/code] becomes the item index. New items are appended at the end. + Adds an item, with a [code]texture[/code] icon, text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end. </description> </method> <method name="add_item"> @@ -30,7 +30,7 @@ <argument index="1" name="id" type="int" default="-1"> </argument> <description> - Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, [code]id[/code] becomes the item index. New items are appended at the end. + Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end. </description> </method> <method name="add_separator"> @@ -44,14 +44,14 @@ <return type="void"> </return> <description> - Clear all the items in the [OptionButton]. + Clears all the items in the [OptionButton]. </description> </method> <method name="get_item_count" qualifiers="const"> <return type="int"> </return> <description> - Returns the amount of items in the OptionButton. + Returns the amount of items in the OptionButton, including separators. </description> </method> <method name="get_item_icon" qualifiers="const"> @@ -87,6 +87,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Retrieves the metadata of an item. Metadata may be any type and can be used to store extra information about an item, such as an external string ID. </description> </method> <method name="get_item_text" qualifiers="const"> @@ -109,12 +110,14 @@ <return type="int"> </return> <description> + Returns the ID of the selected item, or [code]0[/code] if no item is selected. </description> </method> <method name="get_selected_metadata" qualifiers="const"> <return type="Variant"> </return> <description> + Gets the metadata of the selected item. Metadata for items can be set using [method set_item_metadata]. </description> </method> <method name="is_item_disabled" qualifiers="const"> @@ -123,6 +126,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. </description> </method> <method name="remove_item"> @@ -131,6 +135,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Removes the item at index [code]idx[/code]. </description> </method> <method name="select"> @@ -139,7 +144,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Select an item by index and make it the current item. + Selects an item by index and makes it the current item. This will work even if the item is disabled. </description> </method> <method name="set_item_disabled"> @@ -150,6 +155,8 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> + Sets whether the item at index [code]idx[/code] is disabled. + Disabled items are drawn differently in the dropdown and are not selectable by the user. If the current selected item is set as disabled, it will remain selected. </description> </method> <method name="set_item_icon"> @@ -160,7 +167,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> - Sets the icon of an item at index [code]idx[/code]. + Sets the icon of the item at index [code]idx[/code]. </description> </method> <method name="set_item_id"> @@ -171,7 +178,7 @@ <argument index="1" name="id" type="int"> </argument> <description> - Sets the ID of an item at index [code]idx[/code]. + Sets the ID of the item at index [code]idx[/code]. </description> </method> <method name="set_item_metadata"> @@ -182,6 +189,7 @@ <argument index="1" name="metadata" type="Variant"> </argument> <description> + Sets the metadata of an item. Metadata may be of any type and can be used to store extra information about an item, such as an external string ID. </description> </method> <method name="set_item_text"> @@ -192,7 +200,7 @@ <argument index="1" name="text" type="String"> </argument> <description> - Sets the text of an item at index [code]idx[/code]. + Sets the text of the item at index [code]idx[/code]. </description> </method> </methods> @@ -200,6 +208,7 @@ <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" override="true" enum="BaseButton.ActionMode" default="0" /> <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" /> <member name="selected" type="int" setter="_select_int" getter="get_selected" default="-1"> + The index of the currently selected item, or [code]-1[/code] if no item is selected. </member> <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" /> </members> diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml index ff45ca925c..e9ff2c0916 100644 --- a/doc/classes/PCKPacker.xml +++ b/doc/classes/PCKPacker.xml @@ -1,16 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PCKPacker" inherits="Reference" category="Core" version="3.2"> <brief_description> + Creates packages that can be loaded into a running project. </brief_description> <description> - The [PCKPacker] is used to create packages in application runtime. + The [PCKPacker] is used to create packages that can be loaded into a running project using [method ProjectSettings.load_resource_pack]. [codeblock] var packer = PCKPacker.new() - packer.pck_start("test.pck", 0) + packer.pck_start("test.pck") packer.add_file("res://text.txt", "text.txt") - packer.flush(false) + packer.flush() [/codeblock] - The above [PCKPacker] creates package [b]test.pck[/b], then adds a file named [b]text.txt[/b] in the root of the package. + The above [PCKPacker] creates package [code]test.pck[/code], then adds a file named [code]text.txt[/code] at the root of the package. </description> <tutorials> </tutorials> @@ -29,9 +30,10 @@ <method name="flush"> <return type="int" enum="Error"> </return> - <argument index="0" name="verbose" type="bool"> + <argument index="0" name="verbose" type="bool" default="false"> </argument> <description> + Writes the files specified using all [method add_file] calls since the last flush. If [code]verbose[/code] is [code]true[/code], a list of files added will be printed to the console for easier debugging. </description> </method> <method name="pck_start"> @@ -39,9 +41,10 @@ </return> <argument index="0" name="pck_name" type="String"> </argument> - <argument index="1" name="alignment" type="int"> + <argument index="1" name="alignment" type="int" default="0"> </argument> <description> + Creates a new PCK file with the name [code]pck_name[/code]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [code]pck_name[/code] (even though it's not required). </description> </method> </methods> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 260dbae8e2..3dc83ce8b4 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -47,6 +47,7 @@ <description> Joins the multicast group specified by [code]multicast_address[/code] using the interface identified by [code]interface_name[/code]. You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available. + Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission for multicast to work. </description> </method> <method name="leave_multicast_group"> @@ -76,6 +77,16 @@ If [code]bind_address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists). </description> </method> + <method name="set_broadcast_enabled"> + <return type="void"> + </return> + <argument index="0" name="enabled" type="bool"> + </argument> + <description> + Enable or disable sending of broadcast packets (e.g. [code]set_dest_address("255.255.255.255", 4343)[/code]. This option is disabled by default. + Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission and this option to be enabled to receive broadcast packets too. + </description> + </method> <method name="set_dest_address"> <return type="int" enum="Error"> </return> @@ -85,6 +96,7 @@ </argument> <description> Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. + Note: [method set_broadcast_enabled] must be enabled before sending packets to a broadcast address (e.g. [code]255.255.255.255[/code]). </description> </method> <method name="wait"> diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index 7bfea8bce4..2219be5a26 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -51,7 +51,7 @@ Number of particles to emit. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles.DrawOrder" default="0"> - Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. + Particle draw order. Uses [enum DrawOrder] values. </member> <member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh"> [Mesh] that is drawn for the first draw pass. diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index 7c7b42ce88..100585768d 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -31,7 +31,7 @@ Number of particles emitted in one emission cycle. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder" default="0"> - Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. + Particle draw order. Uses [enum DrawOrder] values. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> If [code]true[/code], particles are being emitted. diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 64751cdf76..187ad1688d 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -157,7 +157,7 @@ Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape" default="0"> - Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values. + Particles will be emitted inside this region. Use [enum EmissionShape] constants for values. </member> <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius"> The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE]. diff --git a/doc/classes/PhysicalBone.xml b/doc/classes/PhysicalBone.xml index 583c24e2c0..81446063f2 100644 --- a/doc/classes/PhysicalBone.xml +++ b/doc/classes/PhysicalBone.xml @@ -7,6 +7,24 @@ <tutorials> </tutorials> <methods> + <method name="apply_central_impulse"> + <return type="void"> + </return> + <argument index="0" name="impulse" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="apply_impulse"> + <return type="void"> + </return> + <argument index="0" name="position" type="Vector3"> + </argument> + <argument index="1" name="impulse" type="Vector3"> + </argument> + <description> + </description> + </method> <method name="get_bone_id" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml index a139fa4664..02e3ef5efb 100644 --- a/doc/classes/Physics2DServer.xml +++ b/doc/classes/Physics2DServer.xml @@ -203,7 +203,7 @@ </argument> <description> Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: - 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. + 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. 2: [RID] of the object that entered/exited the area. 3: Instance ID of the object that entered/exited the area. 4: The shape index of the object that entered/exited the area. @@ -1155,7 +1155,7 @@ Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. </constant> <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter"> - This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. + This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE]. </constant> <constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter"> Constant to set/get the linear dampening factor of an area. diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml index 7d46dd2876..7ea00cbddc 100644 --- a/doc/classes/Physics2DShapeQueryParameters.xml +++ b/doc/classes/Physics2DShapeQueryParameters.xml @@ -4,7 +4,7 @@ Parameters to be sent to a 2D shape physics query. </brief_description> <description> - This class contains the shape and other parameters for intersection/collision queries. + This class contains the shape and other parameters for 2D intersection/collision queries. See also [Physics2DShapeQueryResult]. </description> <tutorials> </tutorials> @@ -21,14 +21,16 @@ </methods> <members> <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> + If [code]true[/code], the query will take [Area2D]s into account. </member> <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> + If [code]true[/code], the query will take [PhysicsBody2D]s into account. </member> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="2147483647"> - The physics layer the query should be made on. + The physics layer(s) the query will take into account (as a bitmask). </member> <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]"> - The list of objects or object [RID]s, that will be excluded from collisions. + The list of objects or object [RID]s that will be excluded from collisions. </member> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> The collision margin for the shape. @@ -37,10 +39,10 @@ The motion of the shape being queried for. </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> - The [RID] of the queried shape. See also [method set_shape]. + The queried shape's [RID]. See also [method set_shape]. </member> <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> - the transform matrix of the queried shape. + The queried shape's transform matrix. </member> </members> <constants> diff --git a/doc/classes/Physics2DShapeQueryResult.xml b/doc/classes/Physics2DShapeQueryResult.xml index dd38b488f5..06f943cb6d 100644 --- a/doc/classes/Physics2DShapeQueryResult.xml +++ b/doc/classes/Physics2DShapeQueryResult.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Physics2DShapeQueryResult" inherits="Reference" category="Core" version="3.2"> <brief_description> + Result of a 2D shape query in [Physics2DServer]. </brief_description> <description> + The result of a 2D shape query in [Physics2DServer]. See also [Physics2DShapeQueryParameters]. </description> <tutorials> </tutorials> @@ -11,6 +13,7 @@ <return type="int"> </return> <description> + Returns the number of objects that intersected with the shape. </description> </method> <method name="get_result_object" qualifiers="const"> @@ -19,6 +22,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_id" qualifiers="const"> @@ -27,6 +31,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_shape" qualifiers="const"> @@ -35,6 +40,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the child index of the object's [Shape] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_rid" qualifiers="const"> @@ -43,6 +49,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. </description> </method> </methods> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index a779a34e6a..d7eb4c8c4f 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -68,7 +68,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter"> </argument> <description> - Returns an area parameter value. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants. + Returns an area parameter value. A list of available parameters is on the [enum AreaParameter] constants. </description> </method> <method name="area_get_shape" qualifiers="const"> @@ -194,7 +194,7 @@ </argument> <description> Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: - 1: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. + 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. 2: [RID] of the object that entered/exited the area. 3: Instance ID of the object that entered/exited the area. 4: The shape index of the object that entered/exited the area. @@ -221,7 +221,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Sets the value for an area parameter. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants. + Sets the value for an area parameter. A list of available parameters is on the [enum AreaParameter] constants. </description> </method> <method name="area_set_ray_pickable"> @@ -292,7 +292,7 @@ <argument index="1" name="mode" type="int" enum="PhysicsServer.AreaSpaceOverrideMode"> </argument> <description> - Sets the space override mode for the area. The modes are described in the constants [code]AREA_SPACE_OVERRIDE_*[/code]. + Sets the space override mode for the area. The modes are described in the [enum AreaSpaceOverrideMode] constants. </description> </method> <method name="area_set_transform"> @@ -426,7 +426,7 @@ <argument index="1" name="init_sleeping" type="bool" default="false"> </argument> <description> - Creates a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. + Creates a physics body. The first parameter can be any value from [enum BodyMode] constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. </description> </method> <method name="body_get_collision_layer" qualifiers="const"> @@ -500,7 +500,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter"> </argument> <description> - Returns the value of a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants. + Returns the value of a body parameter. A list of available parameters is on the [enum BodyParameter] constants. </description> </method> <method name="body_get_shape" qualifiers="const"> @@ -715,7 +715,7 @@ <argument index="1" name="mode" type="int" enum="PhysicsServer.BodyMode"> </argument> <description> - Sets the body mode, from one of the constants BODY_MODE*. + Sets the body mode, from one of the [enum BodyMode] constants. </description> </method> <method name="body_set_omit_force_integration"> @@ -739,7 +739,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants. + Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants. </description> </method> <method name="body_set_ray_pickable"> @@ -812,7 +812,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Sets a body state (see BODY_STATE* constants). + Sets a body state (see [enum BodyState] constants). </description> </method> <method name="cone_twist_joint_get_param" qualifiers="const"> @@ -823,7 +823,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam"> </argument> <description> - Gets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants). + Gets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). </description> </method> <method name="cone_twist_joint_set_param"> @@ -836,7 +836,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants). + Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). </description> </method> <method name="free_rid"> @@ -858,7 +858,7 @@ <argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag"> </argument> <description> - Gets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants). + Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). </description> </method> <method name="generic_6dof_joint_get_param"> @@ -871,7 +871,7 @@ <argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam"> </argument> <description> - Gets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*). + Gets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). </description> </method> <method name="generic_6dof_joint_set_flag"> @@ -886,7 +886,7 @@ <argument index="3" name="enable" type="bool"> </argument> <description> - Sets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants). + Sets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). </description> </method> <method name="generic_6dof_joint_set_param"> @@ -901,7 +901,7 @@ <argument index="3" name="value" type="float"> </argument> <description> - Sets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*). + Sets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). </description> </method> <method name="get_process_info"> @@ -921,7 +921,7 @@ <argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag"> </argument> <description> - Gets a hinge_joint flag (see HINGE_JOINT_FLAG* constants). + Gets a hinge_joint flag (see [enum HingeJointFlag] constants). </description> </method> <method name="hinge_joint_get_param" qualifiers="const"> @@ -932,7 +932,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam"> </argument> <description> - Gets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*). + Gets a hinge_joint parameter (see [enum HingeJointParam]). </description> </method> <method name="hinge_joint_set_flag"> @@ -945,7 +945,7 @@ <argument index="2" name="enabled" type="bool"> </argument> <description> - Sets a hinge_joint flag (see HINGE_JOINT_FLAG* constants). + Sets a hinge_joint flag (see [enum HingeJointFlag] constants). </description> </method> <method name="hinge_joint_set_param"> @@ -958,7 +958,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*). + Sets a hinge_joint parameter (see [enum HingeJointParam] constants). </description> </method> <method name="joint_create_cone_twist"> @@ -1091,7 +1091,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam"> </argument> <description> - Gets a pin_joint parameter (see PIN_JOINT* constants). + Gets a pin_joint parameter (see [enum PinJointParam] constants). </description> </method> <method name="pin_joint_set_local_a"> @@ -1126,7 +1126,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a pin_joint parameter (see PIN_JOINT* constants). + Sets a pin_joint parameter (see [enum PinJointParam] constants). </description> </method> <method name="set_active"> @@ -1144,7 +1144,7 @@ <argument index="0" name="type" type="int" enum="PhysicsServer.ShapeType"> </argument> <description> - Creates a shape of type [code]SHAPE_*[/code]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. + Creates a shape of a type from [enum ShapeType]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. </description> </method> <method name="shape_get_data" qualifiers="const"> @@ -1162,7 +1162,7 @@ <argument index="0" name="shape" type="RID"> </argument> <description> - Returns the type of shape (see [code]SHAPE_*[/code] constants). + Returns the type of shape (see [enum ShapeType] constants). </description> </method> <method name="shape_set_data"> @@ -1184,7 +1184,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam"> </argument> <description> - Gets a slider_joint parameter (see SLIDER_JOINT* constants). + Gets a slider_joint parameter (see [enum SliderJointParam] constants). </description> </method> <method name="slider_joint_set_param"> @@ -1197,7 +1197,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Gets a slider_joint parameter (see SLIDER_JOINT* constants). + Gets a slider_joint parameter (see [enum SliderJointParam] constants). </description> </method> <method name="space_create"> @@ -1257,7 +1257,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets the value for a space parameter. A list of available parameters is on the [code]SPACE_PARAM_*[/code] constants. + Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants. </description> </method> </methods> @@ -1509,7 +1509,7 @@ Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. </constant> <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter"> - This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. + This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE]. </constant> <constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter"> Constant to set/get the linear dampening factor of an area. diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml index 7d7307592e..d56247fcaf 100644 --- a/doc/classes/PhysicsShapeQueryParameters.xml +++ b/doc/classes/PhysicsShapeQueryParameters.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core" version="3.2"> <brief_description> + Parameters to be sent to a 3D shape physics query. </brief_description> <description> + This class contains the shape and other parameters for 3D intersection/collision queries. See also [PhysicsShapeQueryResult]. </description> <tutorials> </tutorials> @@ -13,23 +15,31 @@ <argument index="0" name="shape" type="Resource"> </argument> <description> + Sets the [Shape] that will be used for collision/intersection queries. </description> </method> </methods> <members> <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> + If [code]true[/code], the query will take [Area]s into account. </member> <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> + If [code]true[/code], the query will take [PhysicsBody]s into account. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647"> + The physics layer(s) the query will take into account (as a bitmask). </member> <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[ ]"> + The list of objects or object [RID]s that will be excluded from collisions. </member> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> + The collision margin for the shape. </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> + The queried shape's [RID]. See also [method set_shape]. </member> <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + The queried shape's transform matrix. </member> </members> <constants> diff --git a/doc/classes/PhysicsShapeQueryResult.xml b/doc/classes/PhysicsShapeQueryResult.xml index 92a4393979..1f151ebb1a 100644 --- a/doc/classes/PhysicsShapeQueryResult.xml +++ b/doc/classes/PhysicsShapeQueryResult.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PhysicsShapeQueryResult" inherits="Reference" category="Core" version="3.2"> <brief_description> - Result of a shape query in Physics2DServer. + Result of a 3D shape query in [PhysicsServer]. </brief_description> <description> + The result of a 3D shape query in [PhysicsServer]. See also [PhysicsShapeQueryParameters]. </description> <tutorials> </tutorials> @@ -12,6 +13,7 @@ <return type="int"> </return> <description> + Returns the number of objects that intersected with the shape. </description> </method> <method name="get_result_object" qualifiers="const"> @@ -20,6 +22,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_id" qualifiers="const"> @@ -28,6 +31,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_shape" qualifiers="const"> @@ -36,6 +40,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the child index of the object's [Shape] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_rid" qualifiers="const"> @@ -44,6 +49,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. </description> </method> </methods> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index f179041327..0164943ccc 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -22,7 +22,7 @@ <argument index="3" name="d" type="float"> </argument> <description> - Creates a plane from the four parameters [code]a[/code], [code]b[/code], [code]c[/code] and [code]d[/code]. + Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [code]a[/code], [code]b[/code] and [code]c[/code], and the plane has a distance of [code]d[/code] from the origin. </description> </method> <method name="Plane"> @@ -35,7 +35,7 @@ <argument index="2" name="v3" type="Vector3"> </argument> <description> - Creates a plane from three points. + Creates a plane from the three points, given in clockwise order. </description> </method> <method name="Plane"> @@ -153,14 +153,19 @@ </methods> <members> <member name="d" type="float" setter="" getter="" default="0.0"> + Distance from the origin to the plane, in the direction of [member normal]. </member> <member name="normal" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> + The normal of the plane. "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. </member> <member name="x" type="float" setter="" getter="" default="0.0"> + The [member normal]'s X component. </member> <member name="y" type="float" setter="" getter="" default="0.0"> + The [member normal]'s Y component. </member> <member name="z" type="float" setter="" getter="" default="0.0"> + The [member normal]'s Z component. </member> </members> <constants> diff --git a/doc/classes/PlaneShape.xml b/doc/classes/PlaneShape.xml index b94bb8e613..ee841a3cff 100644 --- a/doc/classes/PlaneShape.xml +++ b/doc/classes/PlaneShape.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PlaneShape" inherits="Shape" category="Core" version="3.2"> <brief_description> + Infinite plane shape for 3D collisions. </brief_description> <description> + An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [PlaneShape] is used in a [PhysicsBody], it will cause colliding objects placed "below" it to teleport "above" the plane. </description> <tutorials> </tutorials> @@ -10,6 +12,7 @@ </methods> <members> <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane( 0, 1, 0, 0 )"> + The [Plane] used by the [PlaneShape] for collision. </member> </members> <constants> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index b0e69bd089..3f07affdfd 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -22,7 +22,8 @@ Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices. </member> <member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false"> - If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. Result is the same as using *CULL_BACK* in [SpatialMaterial]. + If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. + This gives the same result as using [constant SpatialMaterial.CULL_BACK] in [member SpatialMaterial.params_cull_mode]. </member> <member name="material" type="Material" setter="set_material" getter="get_material"> The current [Material] of the primitive mesh. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 772c2f5073..126f11a4ed 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -17,7 +17,10 @@ <argument index="0" name="hint" type="Dictionary"> </argument> <description> - Adds a custom property info to a property. The dictionary must contain: name:[String](the property's name) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String]. + Adds a custom property info to a property. The dictionary must contain: + - [code]name[/code]: [String] (the property's name) + - [code]type[/code]: [int] (see [enum Variant.Type]) + - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String] [b]Example:[/b] [codeblock] ProjectSettings.set("category/property_name", 0) @@ -345,7 +348,7 @@ <member name="debug/gdscript/warnings/unused_argument" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a function parameter is unused. </member> - <member name="debug/gdscript/warnings/unused_class_variable" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/unused_class_variable" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables warnings when a member variable is unused. </member> <member name="debug/gdscript/warnings/unused_signal" type="bool" setter="" getter="" default="true"> @@ -398,6 +401,9 @@ <member name="display/window/handheld/orientation" type="String" setter="" getter="" default=""landscape""> Default orientation on mobile devices. </member> + <member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true"> + If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button. + </member> <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="" default="false"> 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> @@ -431,6 +437,9 @@ <member name="display/window/vsync/use_vsync" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables vertical synchronization. This eliminates tearing that may appear in moving scenes, at the cost of higher input latency and stuttering at lower framerates. If [code]false[/code], vertical synchronization will be disabled, however, many platforms will enforce it regardless (such as mobile platforms and HTML5). </member> + <member name="display/window/vsync/vsync_via_compositor" type="bool" setter="" getter="" default="false"> + If [code]Use Vsync[/code] is enabled and this setting is [code]true[/code], enables vertical synchronization via the operating system's window compositor when in windowed mode and the compositor is enabled. This will prevent stutter in certain situations. (Windows only.) + </member> <member name="editor/script_templates_search_path" type="String" setter="" getter="" default=""res://script_templates""> </member> <member name="editor/search_in_file_extensions" type="PoolStringArray" setter="" getter="" default="PoolStringArray( "gd", "shader" )"> diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml index 5c3ffd9cff..0e043b1d50 100644 --- a/doc/classes/RichTextEffect.xml +++ b/doc/classes/RichTextEffect.xml @@ -1,10 +1,20 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RichTextEffect" inherits="Resource" category="Core" version="3.2"> <brief_description> + A custom effect for use with [RichTextLabel]. </brief_description> <description> + A custom effect for use with [RichTextLabel]. + [b]Note:[/b] For a [RichTextEffect] to be usable, a BBCode tag must be defined as a member variable called [code]bbcode[/code] in the script. + [codeblock] + # The RichTextEffect will be usable like this: `[example]Some text[/example]` + var bbcode = "example" + [/codeblock] + [b]Note:[/b] As soon as a [RichTextLabel] contains at least one [RichTextEffect], it will continuously process the effect unless the project is paused. This may impact battery life negatively. </description> <tutorials> + <link>http://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> + <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> <methods> <method name="_process_custom_fx" qualifiers="virtual"> @@ -13,6 +23,7 @@ <argument index="0" name="char_fx" type="CharFXTransform"> </argument> <description> + Override this method to modify properties in [code]char_fx[/code]. The method must return [code]true[/code] if the character could be transformed successfully. If the method returns [code]false[/code], it will skip transformation to avoid displaying broken text. </description> </method> </methods> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 2962391b99..2567b64c03 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -278,6 +278,7 @@ </member> <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode" default=""""> The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. + [b]Note:[/b] It is unadvised to use [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead. </member> <member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[ ]"> </member> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index bf22b865d3..0635dd8935 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -289,7 +289,7 @@ If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. </member> <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master (see [code]NETWORK_MODE_*[/code] constants in [Node]), or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals. + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master, or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals. </member> <member name="paused" type="bool" setter="set_pause" getter="is_paused" default="false"> If [code]true[/code], the [SceneTree] is paused. Doing so will have the following behavior: diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml index ce5947bc06..123353b59a 100644 --- a/doc/classes/Shape.xml +++ b/doc/classes/Shape.xml @@ -13,6 +13,7 @@ </methods> <members> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04"> + The collision margin for the shape. </member> </members> <constants> diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 2c3120f04d..70d55344ca 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -77,6 +77,7 @@ </methods> <members> <member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0"> + The shape's custom solver bias. </member> </members> <constants> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 05ee79eef2..46b11ac010 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StyleBoxFlat" inherits="StyleBox" category="Core" version="3.2"> <brief_description> - Customizable Stylebox with a given set of parameters. (no texture required) + Customizable [StyleBox] with a given set of parameters (no texture required). </brief_description> <description> - This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: + This [StyleBox] can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: - Color - Border width (individual width for each border) - Rounded corners (individual radius for each corner) - - Shadow + - Shadow (with blur and offset) Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example: [codeblock] height = 30 @@ -30,12 +30,14 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the given [code]margin[/code]'s border width. See [enum Margin] for possible values. </description> </method> <method name="get_border_width_min" qualifiers="const"> <return type="int"> </return> <description> + Returns the smallest border width out of all four borders. </description> </method> <method name="get_corner_radius" qualifiers="const"> @@ -44,6 +46,7 @@ <argument index="0" name="corner" type="int" enum="Corner"> </argument> <description> + Returns the given [code]corner[/code]'s radius. See [enum Corner] for possible values. </description> </method> <method name="get_expand_margin" qualifiers="const"> @@ -52,6 +55,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values. </description> </method> <method name="set_border_width"> @@ -62,6 +66,7 @@ <argument index="1" name="width" type="int"> </argument> <description> + Sets the border width to [code]width[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_border_width_all"> @@ -70,6 +75,7 @@ <argument index="0" name="width" type="int"> </argument> <description> + Sets the border width to [code]width[/code] pixels for all margins. </description> </method> <method name="set_corner_radius"> @@ -80,6 +86,7 @@ <argument index="1" name="radius" type="int"> </argument> <description> + Sets the corner radius to [code]radius[/code] pixels for the given [code]corner[/code]. See [enum Corner] for possible values. </description> </method> <method name="set_corner_radius_all"> @@ -88,6 +95,7 @@ <argument index="0" name="radius" type="int"> </argument> <description> + Sets the corner radius to [code]radius[/code] pixels for all corners. </description> </method> <method name="set_corner_radius_individual"> @@ -102,6 +110,7 @@ <argument index="3" name="radius_bottom_left" type="int"> </argument> <description> + Sets the corner radius for each corner to [code]radius_top_left[/code], [code]radius_top_right[/code], [code]radius_bottom_right[/code], and [code]radius_bottom_left[/code] pixels. </description> </method> <method name="set_expand_margin"> @@ -112,6 +121,7 @@ <argument index="1" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_expand_margin_all"> @@ -120,6 +130,7 @@ <argument index="0" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for all margins. </description> </method> <method name="set_expand_margin_individual"> @@ -134,6 +145,7 @@ <argument index="3" name="size_bottom" type="float"> </argument> <description> + Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels. </description> </method> </methods> diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml index c0745c5f39..b5da81de79 100644 --- a/doc/classes/StyleBoxLine.xml +++ b/doc/classes/StyleBoxLine.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StyleBoxLine" inherits="StyleBox" category="Core" version="3.2"> <brief_description> + [StyleBox] that displays a single line. </brief_description> <description> + [StyleBox] that displays a single line of a given color and thickness. It can be used to draw things like separators. </description> <tutorials> </tutorials> @@ -10,14 +12,19 @@ </methods> <members> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )"> + The line's color. </member> <member name="grow_begin" type="float" setter="set_grow_begin" getter="get_grow_begin" default="1.0"> + The number of pixels the line will extend before the [StyleBoxLine]'s bounds. If set to a negative value, the line will begin inside the [StyleBoxLine]'s bounds. </member> <member name="grow_end" type="float" setter="set_grow_end" getter="get_grow_end" default="1.0"> + The number of pixels the line will extend past the [StyleBoxLine]'s bounds. If set to a negative value, the line will end inside the [StyleBoxLine]'s bounds. </member> <member name="thickness" type="int" setter="set_thickness" getter="get_thickness" default="1"> + The line's thickness in pixels. </member> <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false"> + If [code]true[/code], the line will be vertical. If [code]false[/code], the line will be horizontal. </member> </members> <constants> diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml index d5efc80846..af4186dcb6 100644 --- a/doc/classes/StyleBoxTexture.xml +++ b/doc/classes/StyleBoxTexture.xml @@ -15,6 +15,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values. </description> </method> <method name="get_margin_size" qualifiers="const"> @@ -23,6 +24,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the size of the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_expand_margin_all"> @@ -31,6 +33,7 @@ <argument index="0" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for all margins. </description> </method> <method name="set_expand_margin_individual"> @@ -45,6 +48,7 @@ <argument index="3" name="size_bottom" type="float"> </argument> <description> + Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels. </description> </method> <method name="set_expand_margin_size"> @@ -55,6 +59,7 @@ <argument index="1" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_margin_size"> @@ -65,15 +70,19 @@ <argument index="1" name="size" type="float"> </argument> <description> + Sets the margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> </methods> <members> <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0"> + Controls how the stylebox's texture will be stretched or tiled horizontally. See [enum AxisStretchMode] for possible values. </member> <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0"> + Controls how the stylebox's texture will be stretched or tiled vertically. See [enum AxisStretchMode] for possible values. </member> <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" default="true"> + If [code]true[/code], the nine-patch texture's center tile will be drawn. </member> <member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0"> Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested. @@ -114,7 +123,7 @@ The normal map to use when drawing this style box. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> - Species a sub region of the texture to use. + Species a sub-region of the texture to use. This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> @@ -124,15 +133,19 @@ <signals> <signal name="texture_changed"> <description> + Emitted when the stylebox's texture is changed. </description> </signal> </signals> <constants> <constant name="AXIS_STRETCH_MODE_STRETCH" value="0" enum="AxisStretchMode"> + Stretch the stylebox's texture. This results in visible distortion unless the texture size matches the stylebox's size perfectly. </constant> <constant name="AXIS_STRETCH_MODE_TILE" value="1" enum="AxisStretchMode"> + Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. </constant> <constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2" enum="AxisStretchMode"> + Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. Unlike [constant AXIS_STRETCH_MODE_TILE], the texture may be slightly stretched to make the nine-patch texture tile seamlessly. </constant> </constants> </class> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 7cfd8c6919..0c9ac9fbff 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -167,7 +167,7 @@ </argument> <description> Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh]. - Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]Mesh.ARRAY_COMPRESS_*[/code] constants for other flags. + Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]ARRAY_COMPRESS_*[/code] constants in [enum Mesh.ArrayFormat] for other flags. </description> </method> <method name="commit_to_arrays"> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 1b9f38fc54..1f584ad317 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -144,7 +144,7 @@ If [code]true[/code], tabs can be rearranged with mouse drag. </member> <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabContainer.TabAlign" default="1"> - The alignment of all tabs in the tab container. See the [code]ALIGN_*[/code] constants for details. + The alignment of all tabs in the tab container. See the [enum TabAlign] constants for details. </member> <member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible" default="true"> If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden. diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index 899ab8b875..201f8ddb8e 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -16,7 +16,7 @@ If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node. </member> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode" default="0"> - Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more. + Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [enum StretchMode] constants. See the constants to learn more. </member> <member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask"> Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index dd12c5af23..b9aa74ebb7 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -26,7 +26,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the [Color] at [code]name[/code] if the Theme has [code]type[/code]. + Clears the [Color] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_constant"> @@ -37,7 +37,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the constant at [code]name[/code] if the Theme has [code]type[/code]. + Clears the constant at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_font"> @@ -48,7 +48,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the [Font] at [code]name[/code] if the Theme has [code]type[/code]. + Clears the [Font] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_icon"> @@ -59,7 +59,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the icon at [code]name[/code] if the Theme has [code]type[/code]. + Clears the icon at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_stylebox"> @@ -70,14 +70,14 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears [StyleBox] at [code]name[/code] if the Theme has [code]type[/code]. + Clears [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="copy_default_theme"> <return type="void"> </return> <description> - Sets the Theme's values to a copy of the default theme values. + Sets the theme's values to a copy of the default theme values. </description> </method> <method name="copy_theme"> @@ -86,7 +86,7 @@ <argument index="0" name="other" type="Theme"> </argument> <description> - Sets the Theme's values to a copy of a given theme. + Sets the theme's values to a copy of a given theme. </description> </method> <method name="get_color" qualifiers="const"> @@ -97,7 +97,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the [Color] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the [Color] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_color_list" qualifiers="const"> @@ -106,7 +106,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the Theme has [code]type[/code]. + Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code]. </description> </method> <method name="get_constant" qualifiers="const"> @@ -117,7 +117,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the constant at [code]name[/code] if the Theme has [code]type[/code]. + Returns the constant at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_constant_list" qualifiers="const"> @@ -126,7 +126,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the Theme has [code]type[/code]. + Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code]. </description> </method> <method name="get_font" qualifiers="const"> @@ -137,7 +137,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the [Font] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the [Font] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_font_list" qualifiers="const"> @@ -146,7 +146,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the Theme has [code]type[/code]. + Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code]. </description> </method> <method name="get_icon" qualifiers="const"> @@ -157,7 +157,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the icon [Texture] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the icon [Texture] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_icon_list" qualifiers="const"> @@ -166,7 +166,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the Theme has [code]type[/code]. + Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox" qualifiers="const"> @@ -177,7 +177,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the icon [StyleBox] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> @@ -186,14 +186,14 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the Theme has [code]type[/code]. + Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox_types" qualifiers="const"> <return type="PoolStringArray"> </return> <description> - Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the Theme has [code]type[/code]. + Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code]. </description> </method> <method name="get_type_list" qualifiers="const"> @@ -202,7 +202,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the get_* functions, if the Theme has [code]type[/code]. + Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code]. </description> </method> <method name="has_color" qualifiers="const"> @@ -214,7 +214,7 @@ </argument> <description> Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_constant" qualifiers="const"> @@ -226,7 +226,7 @@ </argument> <description> Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_font" qualifiers="const"> @@ -238,7 +238,7 @@ </argument> <description> Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_icon" qualifiers="const"> @@ -250,7 +250,7 @@ </argument> <description> Returns [code]true[/code] if icon [Texture] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_stylebox" qualifiers="const"> @@ -262,7 +262,7 @@ </argument> <description> Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="set_color"> @@ -275,8 +275,8 @@ <argument index="2" name="color" type="Color"> </argument> <description> - Sets the Theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_constant"> @@ -289,8 +289,8 @@ <argument index="2" name="constant" type="int"> </argument> <description> - Sets the Theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_font"> @@ -303,8 +303,8 @@ <argument index="2" name="font" type="Font"> </argument> <description> - Sets the Theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_icon"> @@ -317,8 +317,8 @@ <argument index="2" name="texture" type="Texture"> </argument> <description> - Sets the Theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_stylebox"> @@ -331,8 +331,8 @@ <argument index="2" name="texture" type="StyleBox"> </argument> <description> - Sets Theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> </methods> diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index 4c4022b3b5..2e447ca1ba 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -126,7 +126,7 @@ <argument index="1" name="phi" type="float"> </argument> <description> - Rotates the transform around given axis by phi. The axis must be a normalized vector. + Rotates the transform around the given axis by the given angle (in radians), using matrix multiplication. The axis must be a normalized vector. </description> </method> <method name="scaled"> @@ -135,16 +135,17 @@ <argument index="0" name="scale" type="Vector3"> </argument> <description> - Scales the transform by the specified 3D scaling factors. + Scales the transform by the given scale factor, using matrix multiplication. </description> </method> <method name="translated"> <return type="Transform"> </return> - <argument index="0" name="ofs" type="Vector3"> + <argument index="0" name="offset" type="Vector3"> </argument> <description> - Translates the transform by the specified offset. + Translates the transform by the given offset, relative to the transform's basis vectors. + Unlike [method rotated] and [method scaled], this does not use matrix multiplication. </description> </method> <method name="xform"> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 6288bb074c..afc8b04dc7 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -128,7 +128,7 @@ <argument index="0" name="phi" type="float"> </argument> <description> - Rotates the transform by the given angle (in radians). + Rotates the transform by the given angle (in radians), using matrix multiplication. </description> </method> <method name="scaled"> @@ -137,7 +137,7 @@ <argument index="0" name="scale" type="Vector2"> </argument> <description> - Scales the transform by the given factor. + Scales the transform by the given scale factor, using matrix multiplication. </description> </method> <method name="translated"> @@ -146,7 +146,8 @@ <argument index="0" name="offset" type="Vector2"> </argument> <description> - Translates the transform by the given offset. + Translates the transform by the given offset, relative to the transform's basis vectors. + Unlike [method rotated] and [method scaled], this does not use matrix multiplication. </description> </method> <method name="xform"> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index e0c8d0b0e8..dd4330b00b 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -229,7 +229,7 @@ The number of columns. </member> <member name="drop_mode_flags" type="int" setter="set_drop_mode_flags" getter="get_drop_mode_flags" default="0"> - The drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended. + The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" /> <member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden" default="false"> @@ -240,7 +240,7 @@ </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" /> <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0"> - Allows single or multiple selection. See the [code]SELECT_*[/code] constants. + Allows single or multiple selection. See the [enum SelectMode] constants. </member> </members> <signals> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index c77388e5f4..f32c5527fd 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -396,7 +396,7 @@ <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode"> </argument> <description> - Sets the given column's cell mode to [code]mode[/code]. See [code]CELL_MODE_*[/code] constants. + Sets the given column's cell mode to [code]mode[/code]. See [enum TreeCellMode] constants. </description> </method> <method name="set_checked"> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 0f7a93e8d5..cf75e71358 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -34,9 +34,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -60,9 +60,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -137,9 +137,9 @@ </argument> <argument index="4" name="duration" type="float"> </argument> - <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="6" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="7" name="delay" type="float" default="0"> </argument> @@ -161,9 +161,9 @@ </argument> <argument index="4" name="duration" type="float"> </argument> - <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="6" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="7" name="delay" type="float" default="0"> </argument> @@ -292,9 +292,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -318,9 +318,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -433,10 +433,10 @@ The interpolation starts quickly and slows down towards the end. </constant> <constant name="EASE_IN_OUT" value="2" enum="EaseType"> - A combination of EASE_IN and EASE_OUT. The interpolation is slowest at both ends. + A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is slowest at both ends. </constant> <constant name="EASE_OUT_IN" value="3" enum="EaseType"> - A combination of EASE_IN and EASE_OUT. The interpolation is fastest at both ends. + A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is fastest at both ends. </constant> </constants> </class> diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index fc62e5c892..8590c7bc3b 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -17,20 +17,14 @@ <constants> </constants> <theme_items> - <theme_item name="focus" type="StyleBox"> - </theme_item> <theme_item name="grabber" type="Texture"> </theme_item> <theme_item name="grabber_area" type="StyleBox"> </theme_item> <theme_item name="grabber_disabled" type="Texture"> </theme_item> - <theme_item name="grabber_disabled" type="StyleBox"> - </theme_item> <theme_item name="grabber_highlight" type="Texture"> </theme_item> - <theme_item name="grabber_highlight" type="StyleBox"> - </theme_item> <theme_item name="slider" type="StyleBox"> </theme_item> <theme_item name="tick" type="Texture"> diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml index 9d55f5846f..1976e812ba 100644 --- a/doc/classes/Variant.xml +++ b/doc/classes/Variant.xml @@ -17,7 +17,7 @@ - VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time. - C# is statically typed, but uses the Mono [code]object[/code] type in place of Godot's Variant class when it needs to represent a dynamic value. [code]object[/code] is the Mono runtime's equivalent of the same concept. - The statically-typed language NativeScript C++ does not define a built-in Variant-like class. Godot's GDNative bindings provide their own godot::Variant class for users; Any point at which the C++ code starts interacting with the Godot runtime is a place where you might have to start wrapping data inside Variant objects. - The global [method @GDScript.typeof] function returns the enumerated value of the Variant type stored in the current variable. These correspond to [code]TYPE_*[/code] constants in the [@GlobalScope] docs. + The global [method @GDScript.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]). [codeblock] var foo = 2 match typeof(foo): diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml index ff6004bcba..ba33f66e77 100644 --- a/doc/classes/VehicleWheel.xml +++ b/doc/classes/VehicleWheel.xml @@ -75,7 +75,7 @@ This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest length to move the wheel down to the position it should be in when the car is in rest. </member> <member name="wheel_roll_influence" type="float" setter="set_roll_influence" getter="get_roll_influence" default="0.1"> - This value affects the roll of your vehicle. If set to 0.0 for all wheels, your vehicle will be prone to rolling over, while a value of 1.0 will resist body roll. + This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll. </member> </members> <constants> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 4effe9aad2..58dd36daa5 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -305,6 +305,13 @@ </member> </members> <signals> + <signal name="gui_focus_changed"> + <argument index="0" name="node" type="Control"> + </argument> + <description> + Emitted when a Control node grabs keyboard focus. + </description> + </signal> <signal name="size_changed"> <description> Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means. diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index f1926834ad..f804e32c4b 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -44,6 +44,7 @@ <return type="RID"> </return> <description> + Creates a camera and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] VisualServer functions. </description> </method> <method name="camera_set_cull_mask"> @@ -54,6 +55,7 @@ <argument index="1" name="layers" type="int"> </argument> <description> + Sets the cull mask associated with this camera. The cull mask describes which 3d layers are rendered by this camera. Equivalent to [member Camera.cull_mask]. </description> </method> <method name="camera_set_environment"> @@ -64,6 +66,7 @@ <argument index="1" name="env" type="RID"> </argument> <description> + Sets the environment used by this camera. Equivalent to [member Camera.environment]. </description> </method> <method name="camera_set_frustum"> @@ -80,6 +83,7 @@ <argument index="4" name="z_far" type="float"> </argument> <description> + Sets camera to use frustum projection. This mode allows adjusting the [code]offset[/code] argument to create "tilted frustum" effects. </description> </method> <method name="camera_set_orthogonal"> @@ -94,6 +98,7 @@ <argument index="3" name="z_far" type="float"> </argument> <description> + Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. </description> </method> <method name="camera_set_perspective"> @@ -108,6 +113,7 @@ <argument index="3" name="z_far" type="float"> </argument> <description> + Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away. </description> </method> <method name="camera_set_transform"> @@ -118,6 +124,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets [Transform] of camera. </description> </method> <method name="camera_set_use_vertical_aspect"> @@ -128,6 +135,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], preserves the horizontal aspect ratio which is equivalent to [constant Camera.KEEP_WIDTH]. If [code]false[/code], preserves the vertical aspect ratio which is equivalent to [constant Camera.KEEP_HEIGHT]. </description> </method> <method name="canvas_create"> @@ -198,6 +206,7 @@ <argument index="5" name="normal_map" type="RID"> </argument> <description> + Adds a mesh command to the [CanvasItem]'s draw commands. </description> </method> <method name="canvas_item_add_multimesh"> @@ -414,6 +423,7 @@ <argument index="10" name="antialiased" type="bool" default="false"> </argument> <description> + Adds a triangle array to the [CanvasItem]'s draw commands. </description> </method> <method name="canvas_item_clear"> @@ -477,6 +487,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Enables the use of distance fields for GUI elements that are rendering distance field based fonts. </description> </method> <method name="canvas_item_set_draw_behind_parent"> @@ -789,7 +800,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.CanvasLightMode"> </argument> <description> - The mode of the light, see [code]CANVAS_LIGHT_MODE_*[/code] constants. + The mode of the light, see [enum CanvasLightMode] constants. </description> </method> <method name="canvas_light_set_scale"> @@ -800,6 +811,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets the texture's scale factor of the light. Equivalent to [member Light2D.texture_scale]. </description> </method> <method name="canvas_light_set_shadow_buffer_size"> @@ -843,7 +855,7 @@ <argument index="1" name="filter" type="int" enum="VisualServer.CanvasLightShadowFilter"> </argument> <description> - Sets the canvas light's shadow's filter, see [code]CANVAS_LIGHT_SHADOW_FILTER_*[/code] constants. + Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants. </description> </method> <method name="canvas_light_set_shadow_gradient_length"> @@ -876,6 +888,7 @@ <argument index="1" name="texture" type="RID"> </argument> <description> + Sets texture to be used by light. Equivalent to [member Light2D.texture]. </description> </method> <method name="canvas_light_set_texture_offset"> @@ -886,6 +899,7 @@ <argument index="1" name="offset" type="Vector2"> </argument> <description> + Sets the offset of the light's texture. Equivalent to [member Light2D.offset]. </description> </method> <method name="canvas_light_set_transform"> @@ -909,6 +923,7 @@ <argument index="2" name="max_z" type="int"> </argument> <description> + Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max]. </description> </method> <method name="canvas_occluder_polygon_create"> @@ -926,7 +941,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.CanvasOccluderPolygonCullMode"> </argument> <description> - Sets an occluder polygons cull mode. See [code]CANVAS_OCCLUDER_POLYGON_CULL_MODE_*[/code] constants. + Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants. </description> </method> <method name="canvas_occluder_polygon_set_shape"> @@ -981,6 +996,7 @@ <return type="RID"> </return> <description> + Creates a directional light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. </description> </method> <method name="draw"> @@ -991,12 +1007,14 @@ <argument index="1" name="frame_step" type="float" default="0.0"> </argument> <description> + Draws a frame. [i]This method is deprecated[/i], please use [method force_draw] instead. </description> </method> <method name="environment_create"> <return type="RID"> </return> <description> + Creates an environment and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]environment_*[/code] VisualServer functions. </description> </method> <method name="environment_set_adjustment"> @@ -1015,6 +1033,7 @@ <argument index="5" name="ramp" type="RID"> </argument> <description> + Sets the values to be used with the "Adjustment" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ambient_light"> @@ -1029,6 +1048,7 @@ <argument index="3" name="sky_contibution" type="float" default="0.0"> </argument> <description> + Sets the ambient light parameters. See [Environment] for more details. </description> </method> <method name="environment_set_background"> @@ -1039,6 +1059,7 @@ <argument index="1" name="bg" type="int" enum="VisualServer.EnvironmentBG"> </argument> <description> + Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode]. </description> </method> <method name="environment_set_bg_color"> @@ -1049,6 +1070,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). </description> </method> <method name="environment_set_bg_energy"> @@ -1059,6 +1081,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the intensity of the background color. </description> </method> <method name="environment_set_canvas_max_layer"> @@ -1069,6 +1092,7 @@ <argument index="1" name="max_layer" type="int"> </argument> <description> + Sets the maximum layer to use if using Canvas background mode. </description> </method> <method name="environment_set_dof_blur_far"> @@ -1087,6 +1111,7 @@ <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> </argument> <description> + Sets the values to be used with the "DoF Far Blur" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_dof_blur_near"> @@ -1105,6 +1130,7 @@ <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> </argument> <description> + Sets the values to be used with the "DoF Near Blur" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_fog"> @@ -1121,6 +1147,7 @@ <argument index="4" name="sun_amount" type="float"> </argument> <description> + Sets the variables to be used with the scene fog. See [Environment] for more details. </description> </method> <method name="environment_set_fog_depth"> @@ -1141,6 +1168,7 @@ <argument index="6" name="transmit_curve" type="float"> </argument> <description> + Sets the variables to be used with the fog depth effect. See [Environment] for more details. </description> </method> <method name="environment_set_fog_height"> @@ -1157,6 +1185,7 @@ <argument index="4" name="height_curve" type="float"> </argument> <description> + Sets the variables to be used with the fog height effect. See [Environment] for more details. </description> </method> <method name="environment_set_glow"> @@ -1185,6 +1214,7 @@ <argument index="10" name="bicubic_upscale" type="bool"> </argument> <description> + Sets the variables to be used with the "glow" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_sky"> @@ -1195,6 +1225,7 @@ <argument index="1" name="sky" type="RID"> </argument> <description> + Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.background_sky]. </description> </method> <method name="environment_set_sky_custom_fov"> @@ -1205,6 +1236,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.background_sky_custom_fov]. </description> </method> <method name="environment_set_sky_orientation"> @@ -1215,6 +1247,7 @@ <argument index="1" name="orientation" type="Basis"> </argument> <description> + Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.background_sky_orientation]. </description> </method> <method name="environment_set_ssao"> @@ -1247,6 +1280,7 @@ <argument index="12" name="bilateral_sharpness" type="float"> </argument> <description> + Sets the variables to be used with the "Screen Space Ambient Occlusion (SSAO)" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ssr"> @@ -1267,6 +1301,7 @@ <argument index="6" name="roughness" type="bool"> </argument> <description> + Sets the variables to be used with the "screen space reflections" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_tonemap"> @@ -1291,6 +1326,7 @@ <argument index="8" name="auto_exp_grey" type="float"> </argument> <description> + Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details. </description> </method> <method name="finish"> @@ -1308,6 +1344,7 @@ <argument index="1" name="frame_step" type="float" default="0.0"> </argument> <description> + Forces a frame to be drawn when the function is called. Drawing a frame updates all [Viewport]s that are set to update. Use with extreme caution. </description> </method> <method name="force_sync"> @@ -1332,7 +1369,7 @@ <argument index="0" name="info" type="int" enum="VisualServer.RenderInfo"> </argument> <description> - Returns a certain information, see [code]RENDER_INFO_*[/code] for options. + Returns a certain information, see [enum RenderInfo] for options. </description> </method> <method name="get_test_cube"> @@ -1594,6 +1631,7 @@ <argument index="2" name="texture" type="RID"> </argument> <description> + Sets up [ImmediateGeometry] internals to prepare for drawing. Equivalent to [method ImmediateGeometry.begin]. </description> </method> <method name="immediate_clear"> @@ -1602,6 +1640,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry.clear]. </description> </method> <method name="immediate_color"> @@ -1612,12 +1651,14 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry.set_color]. </description> </method> <method name="immediate_create"> <return type="RID"> </return> <description> + Creates an [ImmediateGeometry] and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] VisualServer functions. </description> </method> <method name="immediate_end"> @@ -1626,6 +1667,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Ends drawing the [ImmediateGeometry] and displays it. Equivalent to [method ImmediateGeometry.end]. </description> </method> <method name="immediate_get_material" qualifiers="const"> @@ -1634,6 +1676,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Returns the material assigned to the [ImmediateGeometry]. </description> </method> <method name="immediate_normal"> @@ -1644,6 +1687,7 @@ <argument index="1" name="normal" type="Vector3"> </argument> <description> + Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry.set_normal]. </description> </method> <method name="immediate_set_material"> @@ -1654,6 +1698,7 @@ <argument index="1" name="material" type="RID"> </argument> <description> + Sets the material to be used to draw the [ImmediateGeometry]. </description> </method> <method name="immediate_tangent"> @@ -1664,6 +1709,7 @@ <argument index="1" name="tangent" type="Plane"> </argument> <description> + Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry.set_tangent]. </description> </method> <method name="immediate_uv"> @@ -1674,6 +1720,7 @@ <argument index="1" name="tex_uv" type="Vector2"> </argument> <description> + Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv]. </description> </method> <method name="immediate_uv2"> @@ -1684,6 +1731,7 @@ <argument index="1" name="tex_uv" type="Vector2"> </argument> <description> + Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv2]. </description> </method> <method name="immediate_vertex"> @@ -1694,6 +1742,7 @@ <argument index="1" name="vertex" type="Vector3"> </argument> <description> + Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry.add_vertex]. </description> </method> <method name="immediate_vertex_2d"> @@ -2308,7 +2357,7 @@ </return> <argument index="0" name="mesh" type="RID"> </argument> - <argument index="1" name="primtive" type="int" enum="VisualServer.PrimitiveType"> + <argument index="1" name="primitive" type="int" enum="VisualServer.PrimitiveType"> </argument> <argument index="2" name="arrays" type="Array"> </argument> @@ -2317,7 +2366,7 @@ <argument index="4" name="compress_format" type="int" default="97280"> </argument> <description> - Adds a surface generated from the Arrays to a mesh. See [code]PRIMITIVE_TYPE_*[/code] constants for types. + Adds a surface generated from the Arrays to a mesh. See [enum PrimitiveType] constants for types. </description> </method> <method name="mesh_clear"> @@ -2606,6 +2655,14 @@ <description> </description> </method> + <method name="multimesh_create"> + <return type="RID"> + </return> + <description> + Creates a new multimesh on the VisualServer and returns an [RID] handle. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + </description> + </method> <method name="multimesh_get_aabb" qualifiers="const"> <return type="AABB"> </return> @@ -3657,7 +3714,7 @@ <argument index="1" name="info" type="int" enum="VisualServer.ViewportRenderInfo"> </argument> <description> - Returns a viewport's render information. For options, see the [code]VIEWPORT_RENDER_INFO*[/code] constants. + Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants. </description> </method> <method name="viewport_get_texture" qualifiers="const"> @@ -3948,10 +4005,12 @@ <signals> <signal name="frame_post_draw"> <description> + Emitted at the end of the frame, after the VisualServer has finished updating all the Viewports. </description> </signal> <signal name="frame_pre_draw"> <description> + Emitted at the beginning of the frame, before the VisualServer updates all the Viewports. </description> </signal> </signals> diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml index a94b798745..4150b36c9c 100644 --- a/doc/classes/VisualShaderNodeTexture.xml +++ b/doc/classes/VisualShaderNodeTexture.xml @@ -28,6 +28,8 @@ </constant> <constant name="SOURCE_DEPTH" value="4" enum="Source"> </constant> + <constant name="SOURCE_PORT" value="5" enum="Source"> + </constant> <constant name="TYPE_DATA" value="0" enum="TextureType"> </constant> <constant name="TYPE_COLOR" value="1" enum="TextureType"> diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml index 6989246e24..4375b2eb62 100644 --- a/doc/classes/XMLParser.xml +++ b/doc/classes/XMLParser.xml @@ -84,7 +84,7 @@ <return type="int" enum="XMLParser.NodeType"> </return> <description> - Gets the type of the current node. Compare with [code]NODE_*[/code] constants. + Gets the type of the current node. Compare with [enum NodeType] constants. </description> </method> <method name="has_attribute" qualifiers="const"> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 4c4ea83157..7164e8cb0a 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -33,7 +33,7 @@ <argument index="0" name="from" type="String"> </argument> <description> - Cast a [String] value to a floating-point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. + Cast a [String] value to a floating-point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. Calling this method with an invalid float string will return 0. This method stops parsing at the first invalid character and will return the parsed result so far, so calling [code]float("1a3")[/code] will return 1 while calling [code]float("1e3a2")[/code] will return 1000.0. </description> </method> </methods> |