diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml
index a077900a9c8..32b5d9eb249 100644
--- a/doc/classes/@GlobalScope.xml
+++ b/doc/classes/@GlobalScope.xml
@@ -120,7 +120,7 @@
Returns the arc tangent of [param x] in radians. Use it to get the angle from an angle's tangent in trigonometry.
- The method cannot know in which quadrant the angle should fall. See [method atan2] if you have both [code]y[/code] and [code]x[/code].
+ The method cannot know in which quadrant the angle should fall. See [method atan2] if you have both [code]y[/code] and [code skip-lint]x[/code].
[codeblock]
var a = atan(0.5) # a is 0.463648
[/codeblock]
@@ -338,7 +338,7 @@
Cubic interpolates between two rotation values with shortest path by the factor defined in [param weight] with [param pre] and [param post] values. See also [method lerp_angle].
- It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
+ It can perform smoother interpolation than [method cubic_interpolate] by the time values.
@@ -879,10 +879,10 @@
URL tags only support URLs wrapped by a URL tag, not URLs with a different title.
When printing to standard output, the supported subset of BBCode is converted to ANSI escape codes for the terminal emulator to display. Support for ANSI escape codes varies across terminal emulators, especially for italic and strikethrough. In standard output, [code]code[/code] is represented with faint text but without any font change. Unsupported tags are left as-is in standard output.
[codeblocks]
- [gdscript]
+ [gdscript skip-lint]
print_rich("[color=green][b]Hello world![/b][/color]") # Prints out "Hello world!" in green with a bold font
[/gdscript]
- [csharp]
+ [csharp skip-lint]
GD.PrintRich("[color=green][b]Hello world![/b][/color]"); // Prints out "Hello world!" in green with a bold font
[/csharp]
[/codeblocks]
@@ -1392,7 +1392,7 @@
Converts the given [param variant] to the given [param type], using the [enum Variant.Type] values. This method is generous with how it handles types, it can automatically convert between array types, convert numeric [String]s to [int], and converting most things to [String].
- If the type conversion cannot be done, this method will return the default value for that type, for example converting [Rect2] to [Vector2] will always return [code]Vector2.ZERO[/code]. This method will never show error messages as long as [param type] is a valid Variant type.
+ If the type conversion cannot be done, this method will return the default value for that type, for example converting [Rect2] to [Vector2] will always return [constant Vector2.ZERO]. This method will never show error messages as long as [param type] is a valid Variant type.
The returned value is a [Variant], but the data inside and the [enum Variant.Type] will be the same as the requested type.
[codeblock]
type_convert("Hi!", TYPE_INT) # Returns 0
@@ -1507,7 +1507,7 @@
angle = wrapf(angle + 0.1, -PI, PI)
[/codeblock]
[b]Note:[/b] If [param min] is [code]0[/code], this is equivalent to [method fposmod], so prefer using that instead.
- [code]wrapf[/code] is more flexible than using the [method fposmod] approach by giving the user control over the minimum value.
+ [method wrapf] is more flexible than using the [method fposmod] approach by giving the user control over the minimum value.
diff --git a/doc/classes/AStar3D.xml b/doc/classes/AStar3D.xml
index d35835d73de..e2afeef3778 100644
--- a/doc/classes/AStar3D.xml
+++ b/doc/classes/AStar3D.xml
@@ -6,7 +6,7 @@
A* (A star) is a computer algorithm used in pathfinding and graph traversal, the process of plotting short paths among vertices (points), passing through a given set of edges (segments). It enjoys widespread use due to its performance and accuracy. Godot's A* implementation uses points in 3D space and Euclidean distances by default.
You must add points manually with [method add_point] and create segments manually with [method connect_points]. Once done, you can test if there is a path between two points with the [method are_points_connected] function, get a path containing indices by [method get_id_path], or one containing actual coordinates with [method get_point_path].
- It is also possible to use non-Euclidean distances. To do so, create a class that extends [code]AStar3D[/code] and override methods [method _compute_cost] and [method _estimate_cost]. Both take two indices and return a length, as is shown in the following example.
+ It is also possible to use non-Euclidean distances. To do so, create a class that extends [AStar3D] and override methods [method _compute_cost] and [method _estimate_cost]. Both take two indices and return a length, as is shown in the following example.
[codeblocks]
[gdscript]
class MyAStar:
@@ -33,7 +33,7 @@
}
[/csharp]
[/codeblocks]
- [method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) <= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [code]_compute_cost[/code] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information.
+ [method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) <= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [method _compute_cost] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information.
If the default [method _estimate_cost] and [method _compute_cost] methods are used, or if the supplied [method _estimate_cost] method returns a lower bound of the cost, then the paths returned by A* will be the lowest-cost paths. Here, the cost of a path equals the sum of the [method _compute_cost] results of all segments in the path multiplied by the [code]weight_scale[/code]s of the endpoints of the respective segments. If the default methods are used and the [code]weight_scale[/code]s of all points are set to [code]1.0[/code], then this equals the sum of Euclidean distances of all segments in the path.
@@ -45,7 +45,7 @@
Called when computing the cost between two connected points.
- Note that this function is hidden in the default [code]AStar3D[/code] class.
+ Note that this function is hidden in the default [AStar3D] class.
@@ -54,7 +54,7 @@
Called when estimating the cost between a point and the path's ending point.
- Note that this function is hidden in the default [code]AStar3D[/code] class.
+ Note that this function is hidden in the default [AStar3D] class.
@@ -204,7 +204,7 @@
- Returns the capacity of the structure backing the points, useful in conjunction with [code]reserve_space[/code].
+ Returns the capacity of the structure backing the points, useful in conjunction with [method reserve_space].
diff --git a/doc/classes/AStarGrid2D.xml b/doc/classes/AStarGrid2D.xml
index d64941cb9b6..9924af08c4a 100644
--- a/doc/classes/AStarGrid2D.xml
+++ b/doc/classes/AStarGrid2D.xml
@@ -35,7 +35,7 @@
Called when computing the cost between two connected points.
- Note that this function is hidden in the default [code]AStarGrid2D[/code] class.
+ Note that this function is hidden in the default [AStarGrid2D] class.
@@ -44,7 +44,7 @@
Called when estimating the cost between a point and the path's ending point.
- Note that this function is hidden in the default [code]AStarGrid2D[/code] class.
+ Note that this function is hidden in the default [AStarGrid2D] class.
@@ -84,7 +84,7 @@
- Returns an array with the points that are in the path found by AStarGrid2D between the given points. The array is ordered from the starting point to the ending point of the path.
+ Returns an array with the points that are in the path found by [AStarGrid2D] between the given points. The array is ordered from the starting point to the ending point of the path.
[b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector3Array] and will print an error message.
diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml
index c48c7f43008..ac50a5ee30e 100644
--- a/doc/classes/AudioStreamPlayer.xml
+++ b/doc/classes/AudioStreamPlayer.xml
@@ -79,7 +79,7 @@
The [AudioStream] object to be played.
- If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code].
+ If [code]true[/code], the playback is paused. You can resume it by setting [member stream_paused] to [code]false[/code].
Volume of sound, in dB.
diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml
index 7c590897087..77a038c5fa7 100644
--- a/doc/classes/AudioStreamPlayer2D.xml
+++ b/doc/classes/AudioStreamPlayer2D.xml
@@ -85,7 +85,7 @@
The [AudioStream] object to be played.
- If [code]true[/code], the playback is paused. You can resume it by setting [code]stream_paused[/code] to [code]false[/code].
+ If [code]true[/code], the playback is paused. You can resume it by setting [member stream_paused] to [code]false[/code].
Base volume before attenuation.
diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml
index 2246e308176..72bfc2dcc71 100644
--- a/doc/classes/BaseMaterial3D.xml
+++ b/doc/classes/BaseMaterial3D.xml
@@ -184,11 +184,11 @@
Distance at which the object appears fully opaque.
- [b]Note:[/b] If [code]distance_fade_max_distance[/code] is less than [code]distance_fade_min_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code].
+ [b]Note:[/b] If [member distance_fade_max_distance] is less than [member distance_fade_min_distance], the behavior will be reversed. The object will start to fade away at [member distance_fade_max_distance] and will fully disappear once it reaches [member distance_fade_min_distance].
Distance at which the object starts to become visible. If the object is less than this distance away, it will be invisible.
- [b]Note:[/b] If [code]distance_fade_min_distance[/code] is greater than [code]distance_fade_max_distance[/code], the behavior will be reversed. The object will start to fade away at [code]distance_fade_max_distance[/code] and will fully disappear once it reaches [code]distance_fade_min_distance[/code].
+ [b]Note:[/b] If [member distance_fade_min_distance] is greater than [member distance_fade_max_distance], the behavior will be reversed. The object will start to fade away at [member distance_fade_max_distance] and will fully disappear once it reaches [member distance_fade_min_distance].
Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s.
diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml
index 972a8eb114c..f98c207a6e0 100644
--- a/doc/classes/Basis.xml
+++ b/doc/classes/Basis.xml
@@ -207,7 +207,7 @@
The identity basis, with no rotation or scaling applied.
- This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer, and for consistency with C#.
+ This is identical to creating [constructor Basis] without any parameters. This constant can be used to make your code clearer, and for consistency with C#.
The basis that will flip something along the X axis when used in a transformation.
diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml
index fa8112de29e..a62c160080e 100644
--- a/doc/classes/Bone2D.xml
+++ b/doc/classes/Bone2D.xml
@@ -46,7 +46,7 @@
- Returns the node's [member rest] [code]Transform2D[/code] if it doesn't have a parent, or its rest pose relative to its parent.
+ Returns the node's [member rest] [Transform2D] if it doesn't have a parent, or its rest pose relative to its parent.
diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml
index bee0cbcf4a5..bf0534ab1e4 100644
--- a/doc/classes/Button.xml
+++ b/doc/classes/Button.xml
@@ -140,7 +140,7 @@
[StyleBox] used when the [Button] is disabled (for right-to-left layouts).
- [StyleBox] used when the [Button] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ [StyleBox] used when the [Button] is focused. The [theme_item focus] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
[StyleBox] used when the [Button] is being hovered.
diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml
index 83f1ffa08ee..07b23e02520 100644
--- a/doc/classes/Camera3D.xml
+++ b/doc/classes/Camera3D.xml
@@ -179,7 +179,7 @@
The distance to the far culling boundary for this camera relative to its local Z axis. Higher values allow the camera to see further away, while decreasing [member far] can improve performance if it results in objects being partially or fully culled.
- The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle.
+ The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [member fov] sets the other axis' field of view angle.
For reference, the default vertical field of view value ([code]75.0[/code]) is equivalent to a horizontal FOV of:
- ~91.31 degrees in a 4:3 viewport
- ~101.67 degrees in a 16:10 viewport
diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml
index 7b22fe2e932..b66a01a282c 100644
--- a/doc/classes/CharacterBody2D.xml
+++ b/doc/classes/CharacterBody2D.xml
@@ -24,7 +24,7 @@
- Returns the floor's collision angle at the last collision point according to [param up_direction], which is [code]Vector2.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ Returns the floor's collision angle at the last collision point according to [param up_direction], which is [constant Vector2.UP] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
@@ -188,7 +188,7 @@
If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically.
- Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling [method move_and_slide]. Defaults to [code]Vector2.UP[/code]. As the vector will be normalized it can't be equal to [constant Vector2.ZERO], if you want all collisions to be reported as walls, consider using [constant MOTION_MODE_FLOATING] as [member motion_mode].
+ Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling [method move_and_slide]. Defaults to [constant Vector2.UP]. As the vector will be normalized it can't be equal to [constant Vector2.ZERO], if you want all collisions to be reported as walls, consider using [constant MOTION_MODE_FLOATING] as [member motion_mode].
Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide].
diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml
index b4f68cb1aa0..2382c77a12c 100644
--- a/doc/classes/CharacterBody3D.xml
+++ b/doc/classes/CharacterBody3D.xml
@@ -25,7 +25,7 @@
- Returns the floor's collision angle at the last collision point according to [param up_direction], which is [code]Vector3.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
+ Returns the floor's collision angle at the last collision point according to [param up_direction], which is [constant Vector3.UP] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code].
@@ -179,7 +179,7 @@
If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically.
- Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling [method move_and_slide]. Defaults to [code]Vector3.UP[/code]. As the vector will be normalized it can't be equal to [constant Vector3.ZERO], if you want all collisions to be reported as walls, consider using [constant MOTION_MODE_FLOATING] as [member motion_mode].
+ Vector pointing upwards, used to determine what is a wall and what is a floor (or a ceiling) when calling [method move_and_slide]. Defaults to [constant Vector3.UP]. As the vector will be normalized it can't be equal to [constant Vector3.ZERO], if you want all collisions to be reported as walls, consider using [constant MOTION_MODE_FLOATING] as [member motion_mode].
Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide].
diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml
index e5c255706fe..ec0c2fbf06c 100644
--- a/doc/classes/CodeEdit.xml
+++ b/doc/classes/CodeEdit.xml
@@ -544,7 +544,7 @@
Prefixes to trigger an automatic indent.
- Size of tabs, if [code]indent_use_spaces[/code] is enabled the number of spaces to use.
+ Size of the tabulation indent (one [kbd]Tab[/kbd] press) in characters. If [member indent_use_spaces] is enabled the number of spaces to use.
Use spaces instead of tabs for indentation.
diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml
index 07bc53575ce..137e7129135 100644
--- a/doc/classes/CollisionObject2D.xml
+++ b/doc/classes/CollisionObject2D.xml
@@ -16,7 +16,7 @@
- Accepts unhandled [InputEvent]s. [param shape_idx] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events.
+ Accepts unhandled [InputEvent]s. [param shape_idx] is the child index of the clicked [Shape2D]. Connect to [signal input_event] to easily pick up these events.
[b]Note:[/b] [method _input_event] requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set.
diff --git a/doc/classes/CollisionPolygon3D.xml b/doc/classes/CollisionPolygon3D.xml
index 0a3a3cfd26d..ed6fa0ba3c9 100644
--- a/doc/classes/CollisionPolygon3D.xml
+++ b/doc/classes/CollisionPolygon3D.xml
@@ -21,7 +21,7 @@
Array of vertices which define the 2D polygon in the local XY plane.
- [b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the [code]polygon[/code] member.
+ [b]Note:[/b] The returned value is a copy of the original. Methods which mutate the size or properties of the return value will not impact the original polygon. To change properties of the polygon, assign it to a temporary variable and make changes before reassigning the class property.
diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml
index d665084469e..21d6cb2756e 100644
--- a/doc/classes/Control.xml
+++ b/doc/classes/Control.xml
@@ -1052,7 +1052,7 @@
[b]Note:[/b] [Window] styles will have no effect unless the window is embedded.
- The name of a theme type variation used by this [Control] to look up its own theme items. When empty, the class name of the node is used (e.g. [code]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance).
+ The name of a theme type variation used by this [Control] to look up its own theme items. When empty, the class name of the node is used (e.g. [code skip-lint]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance).
When set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See [method Theme.set_type_variation]. If the theme item cannot be found using this type or its base types, lookup falls back on the class names.
[b]Note:[/b] To look up [Control]'s own items use various [code]get_theme_*[/code] methods without specifying [code]theme_type[/code].
[b]Note:[/b] Theme items are looked for in the tree order, from branch to root, where each [Control] node is checked for its [member theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last.
diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml
index 06b6409e09d..9157649af2b 100644
--- a/doc/classes/Curve3D.xml
+++ b/doc/classes/Curve3D.xml
@@ -117,8 +117,7 @@
- Returns a point within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve.
- To do that, it finds the two cached points where the [param offset] lies between, then interpolates the values. This interpolation is cubic if [param cubic] is set to [code]true[/code], or linear if set to [code]false[/code].
+ Returns a point within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve. To do that, it finds the two cached points where the [param offset] lies between, then interpolates the values. This interpolation is cubic if [param cubic] is set to [code]true[/code], or linear if set to [code]false[/code].
Cubic interpolation tends to follow the curves better, but linear is faster (and often, precise enough).
@@ -127,8 +126,7 @@
- Returns an up vector within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve.
- To do that, it finds the two cached up vectors where the [param offset] lies between, then interpolates the values. If [param apply_tilt] is [code]true[/code], an interpolated tilt is applied to the interpolated up vector.
+ Returns an up vector within the curve at position [param offset], where [param offset] is measured as a distance in 3D units along the curve. To do that, it finds the two cached up vectors where the [param offset] lies between, then interpolates the values. If [param apply_tilt] is [code]true[/code], an interpolated tilt is applied to the interpolated up vector.
If the curve has no up vectors, the function sends an error to the console, and returns [code](0, 1, 0)[/code].
@@ -138,7 +136,7 @@
- Similar with [code]interpolate_baked()[/code]. The return value is [code]Transform3D[/code], with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes.
+ Returns a [Transform3D] with [code]origin[/code] as point position, [code]basis.x[/code] as sideway vector, [code]basis.y[/code] as up vector, [code]basis.z[/code] as forward vector. When the curve length is 0, there is no reasonable way to calculate the rotation, all vectors aligned with global space axes. See also [method sample_baked].
diff --git a/doc/classes/DampedSpringJoint2D.xml b/doc/classes/DampedSpringJoint2D.xml
index c47a7d9303a..4bb80c84e52 100644
--- a/doc/classes/DampedSpringJoint2D.xml
+++ b/doc/classes/DampedSpringJoint2D.xml
@@ -10,7 +10,7 @@
- The spring joint's damping ratio. A value between [code]0[/code] and [code]1[/code]. When the two bodies move into different directions the system tries to align them to the spring axis again. A high [code]damping[/code] value forces the attached bodies to align faster.
+ The spring joint's damping ratio. A value between [code]0[/code] and [code]1[/code]. When the two bodies move into different directions the system tries to align them to the spring axis again. A high [member damping] value forces the attached bodies to align faster.
The spring joint's maximum length. The two attached bodies cannot stretch it past this value.
diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml
index 6cb049e0e49..508b0b74821 100644
--- a/doc/classes/DisplayServer.xml
+++ b/doc/classes/DisplayServer.xml
@@ -120,7 +120,7 @@
Displays OS native dialog for selecting files or directories in the file system.
Callbacks have the following arguments: [code]bool status, PackedStringArray selected_paths[/code].
- [b]Note:[/b] This method is implemented if the display server has the [code]FEATURE_NATIVE_DIALOG[/code] feature.
+ [b]Note:[/b] This method is implemented if the display server has the [constant FEATURE_NATIVE_DIALOG] feature.
[b]Note:[/b] This method is implemented on Linux, Windows and macOS.
[b]Note:[/b] [param current_directory] might be ignored.
[b]Note:[/b] On Linux, [param show_hidden] is ignored.
@@ -1055,7 +1055,7 @@
Each [Dictionary] contains two [String] entries:
- [code]name[/code] is voice name.
- [code]id[/code] is voice identifier.
- - [code]language[/code] is language code in [code]lang_Variant[/code] format. [code]lang[/code] part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. And [code]Variant[/code] part is an engine dependent string describing country, region or/and dialect.
+ - [code]language[/code] is language code in [code]lang_Variant[/code] format. The [code]lang[/code] part is a 2 or 3-letter code based on the ISO-639 standard, in lowercase. The [code skip-lint]Variant[/code] part is an engine-dependent string describing country, region or/and dialect.
Note that Godot depends on system libraries for text-to-speech functionality. These libraries are installed by default on Windows and macOS, but not on all Linux distributions. If they are not present, this method will return an empty list. This applies to both Godot users on Linux, as well as end-users on Linux running Godot games that use text-to-speech.
[b]Note:[/b] This method is implemented on Android, iOS, Web, Linux (X11), macOS, and Windows.
[b]Note:[/b] [member ProjectSettings.audio/general/text_to_speech] should be [code]true[/code] to use text-to-speech.
diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml
index fde6307a130..853348f64ce 100644
--- a/doc/classes/EditorExportPlugin.xml
+++ b/doc/classes/EditorExportPlugin.xml
@@ -228,8 +228,8 @@
Adds a dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary.
- [b]Note:[/b] For static libraries (*.a) works in same way as [code]add_ios_framework[/code].
- This method should not be used for System libraries as they are already present on the device.
+ [b]Note:[/b] For static libraries (*.a) works in same way as [method add_ios_framework].
+ [b]Note:[/b] This method should not be used for System libraries as they are already present on the device.
diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml
index 59c0b7b9123..b51341dc24c 100644
--- a/doc/classes/EditorFileDialog.xml
+++ b/doc/classes/EditorFileDialog.xml
@@ -43,7 +43,7 @@
- Returns the [code]VBoxContainer[/code] used to display the file system.
+ Returns the [VBoxContainer] used to display the file system.
[b]Warning:[/b] This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their [member CanvasItem.visible] property.
diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml
index d1361c4f0d5..82ba956151f 100644
--- a/doc/classes/EditorImportPlugin.xml
+++ b/doc/classes/EditorImportPlugin.xml
@@ -234,7 +234,7 @@
- This function can only be called during the [method _import] callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the [param custom_options]. Additionally, in cases where multiple importers can handle a file, the [param custom_importer] ca be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. [param generator_parameters] defines optional extra metadata which will be stored as [code]generator_parameters[/code] in the [code]remap[/code] section of the [code].import[/code] file, for example to store a md5 hash of the source data.
+ This function can only be called during the [method _import] callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the [param custom_options]. Additionally, in cases where multiple importers can handle a file, the [param custom_importer] ca be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. [param generator_parameters] defines optional extra metadata which will be stored as [code skip-lint]generator_parameters[/code] in the [code]remap[/code] section of the [code].import[/code] file, for example to store a md5 hash of the source data.
diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml
index f8a73141a99..d0de09e4512 100644
--- a/doc/classes/EditorInterface.xml
+++ b/doc/classes/EditorInterface.xml
@@ -339,7 +339,7 @@
- Sets the editor's current main screen to the one specified in [param name]. [param name] must match the text of the tab in question exactly ([code]2D[/code], [code]3D[/code], [code]Script[/code], [code]AssetLib[/code]).
+ Sets the editor's current main screen to the one specified in [param name]. [param name] must match the title of the tab in question exactly (e.g. [code]2D[/code], [code]3D[/code], [code skip-lint]Script[/code], or [code]AssetLib[/code] for default tabs).
diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml
index 5ac9840f81c..16804003843 100644
--- a/doc/classes/EditorNode3DGizmo.xml
+++ b/doc/classes/EditorNode3DGizmo.xml
@@ -95,7 +95,7 @@
- Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and a [param frustum], this method should return which subgizmos are contained within the frustum. The [param frustum] argument consists of an array with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos].
+ Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and a [param frustum], this method should return which subgizmos are contained within the frustum. The [param frustum] argument consists of an array with all the [Plane]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos].
diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml
index 3e90c546474..da7ee173353 100644
--- a/doc/classes/EditorNode3DGizmoPlugin.xml
+++ b/doc/classes/EditorNode3DGizmoPlugin.xml
@@ -147,7 +147,7 @@
- Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and [param frustum_planes], this method should return which subgizmos are contained within the frustums. The [param frustum_planes] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos.
+ Override this method to allow selecting subgizmos using mouse drag box selection. Given a [param camera] and [param frustum_planes], this method should return which subgizmos are contained within the frustums. The [param frustum_planes] argument consists of an array with all the [Plane]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos.
diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml
index 3b6263b67be..acd959d7f7d 100644
--- a/doc/classes/Environment.xml
+++ b/doc/classes/Environment.xml
@@ -36,20 +36,20 @@
- The global brightness value of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
+ The global brightness value of the rendered scene. Effective only if [member adjustment_enabled] is [code]true[/code].
- The [Texture2D] or [Texture3D] lookup table (LUT) to use for the built-in post-process color grading. Can use a [GradientTexture1D] for a 1-dimensional LUT, or a [Texture3D] for a more complex LUT. Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
+ The [Texture2D] or [Texture3D] lookup table (LUT) to use for the built-in post-process color grading. Can use a [GradientTexture1D] for a 1-dimensional LUT, or a [Texture3D] for a more complex LUT. Effective only if [member adjustment_enabled] is [code]true[/code].
- The global contrast value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
+ The global contrast value of the rendered scene (default value is 1). Effective only if [member adjustment_enabled] is [code]true[/code].
If [code]true[/code], enables the [code]adjustment_*[/code] properties provided by this resource. If [code]false[/code], modifications to the [code]adjustment_*[/code] properties will have no effect on the rendered scene.
[b]Note:[/b] Adjustments are only supported in the Forward+ and Mobile rendering methods, not Compatibility.
- The global color saturation value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code].
+ The global color saturation value of the rendered scene (default value is 1). Effective only if [member adjustment_enabled] is [code]true[/code].
The ambient light's [Color]. Only effective if [member ambient_light_sky_contribution] is lower than [code]1.0[/code] (exclusive).
diff --git a/doc/classes/FileAccess.xml b/doc/classes/FileAccess.xml
index e50e610e710..42528dc2871 100644
--- a/doc/classes/FileAccess.xml
+++ b/doc/classes/FileAccess.xml
@@ -341,7 +341,7 @@
- Sets file [code]hidden[/code] attribute.
+ Sets file [b]hidden[/b] attribute.
[b]Note:[/b] This method is implemented on iOS, BSD, macOS, and Windows.
@@ -350,7 +350,7 @@
- Sets file [code]read only[/code] attribute.
+ Sets file [b]read only[/b] attribute.
[b]Note:[/b] This method is implemented on iOS, BSD, macOS, and Windows.
diff --git a/doc/classes/FontFile.xml b/doc/classes/FontFile.xml
index 1628f8819fa..e6557343d34 100644
--- a/doc/classes/FontFile.xml
+++ b/doc/classes/FontFile.xml
@@ -255,7 +255,7 @@
- Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
+ Returns list of the font sizes in the cache. Each size is [Vector2i] with font size and outline size.
diff --git a/doc/classes/FontVariation.xml b/doc/classes/FontVariation.xml
index 128f3b5a851..e21881fc3e7 100644
--- a/doc/classes/FontVariation.xml
+++ b/doc/classes/FontVariation.xml
@@ -70,7 +70,7 @@
Font OpenType variation coordinates. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]OpenType variation tags[/url].
- [b]Note:[/b] This [Dictionary] uses OpenType tags as keys. Variation axes can be identified both by tags([code]int[/code]) and names ([code]string[/code]). Some axes might be accessible by multiple names. For example, [code]wght[/code] refers to the same axis as [code]weight[/code]. Tags on the other hand are unique. To convert between names and tags, use [method TextServer.name_to_tag] and [method TextServer.tag_to_name].
+ [b]Note:[/b] This [Dictionary] uses OpenType tags as keys. Variation axes can be identified both by tags ([int], e.g. [code]0x77678674[/code]) and names ([String], e.g. [code]wght[/code]). Some axes might be accessible by multiple names. For example, [code]wght[/code] refers to the same axis as [code]weight[/code]. Tags on the other hand are unique. To convert between names and tags, use [method TextServer.name_to_tag] and [method TextServer.tag_to_name].
[b]Note:[/b] To get available variation axes of a font, use [method Font.get_supported_variation_list].
diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml
index e42aca1ada5..3d7243fcbdc 100644
--- a/doc/classes/GPUParticles3D.xml
+++ b/doc/classes/GPUParticles3D.xml
@@ -5,7 +5,7 @@
3D particle node used to create a variety of particle systems and effects. [GPUParticles3D] features an emitter that generates some number of particles at a given rate.
- Use the [code]process_material[/code] property to add a [ParticleProcessMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
+ Use [member process_material] to add a [ParticleProcessMaterial] to configure particle appearance and behavior. Alternatively, you can add a [ShaderMaterial] which will be applied to all particles.
$DOCS_URL/tutorials/3d/particles/index.html
@@ -108,7 +108,7 @@
If [code]true[/code], particles use the parent node's coordinate space (known as local coordinates). This will cause particles to move and rotate along the [GPUParticles3D] node (and its parents) when it is moved or rotated. If [code]false[/code], particles use global coordinates; they will not move or rotate along the [GPUParticles3D] node (and its parents) when it is moved or rotated.
- If [code]true[/code], only [code]amount[/code] particles will be emitted.
+ If [code]true[/code], only the number of particles equal to [member amount] will be emitted.
Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting.
diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml
index 961e9f216f8..03c1ce2e001 100644
--- a/doc/classes/HTTPRequest.xml
+++ b/doc/classes/HTTPRequest.xml
@@ -235,9 +235,9 @@
If [code]true[/code], this header will be added to each request: [code]Accept-Encoding: gzip, deflate[/code] telling servers that it's okay to compress response bodies.
- Any Response body declaring a [code]Content-Encoding[/code] of either [code]gzip[/code] or [code]deflate[/code] will then be automatically decompressed, and the uncompressed bytes will be delivered via [code]request_completed[/code].
- If the user has specified their own [code]Accept-Encoding[/code] header, then no header will be added regardless of [code]accept_gzip[/code].
- If [code]false[/code] no header will be added, and no decompression will be performed on response bodies. The raw bytes of the response body will be returned via [code]request_completed[/code].
+ Any Response body declaring a [code]Content-Encoding[/code] of either [code]gzip[/code] or [code]deflate[/code] will then be automatically decompressed, and the uncompressed bytes will be delivered via [signal request_completed].
+ If the user has specified their own [code]Accept-Encoding[/code] header, then no header will be added regardless of [member accept_gzip].
+ If [code]false[/code] no header will be added, and no decompression will be performed on response bodies. The raw bytes of the response body will be returned via [signal request_completed].
Maximum allowed size for response bodies. If the response body is compressed, this will be used as the maximum allowed size for the decompressed body.
diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml
index fabe6fe4bd7..310dae6c653 100644
--- a/doc/classes/Image.xml
+++ b/doc/classes/Image.xml
@@ -5,7 +5,7 @@
Native image datatype. Contains image data which can be converted to an [ImageTexture] and provides commonly used [i]image processing[/i] methods. The maximum width and height for an [Image] are [constant MAX_WIDTH] and [constant MAX_HEIGHT].
- An [Image] cannot be assigned to a [code]texture[/code] property of an object directly (such as [Sprite2D]), and has to be converted manually to an [ImageTexture] first.
+ An [Image] cannot be assigned to a texture property of an object directly (such as [member Sprite2D.texture]), and has to be converted manually to an [ImageTexture] first.
[b]Note:[/b] The maximum image size is 16384×16384 pixels due to graphics hardware limitations. Larger images may fail to import.
@@ -233,7 +233,7 @@
- Returns the offset where the image's mipmap with index [param mipmap] is stored in the [code]data[/code] dictionary.
+ Returns the offset where the image's mipmap with index [param mipmap] is stored in the [member data] dictionary.
diff --git a/doc/classes/ImageTextureLayered.xml b/doc/classes/ImageTextureLayered.xml
index 545c9289d15..e8d054bdd74 100644
--- a/doc/classes/ImageTextureLayered.xml
+++ b/doc/classes/ImageTextureLayered.xml
@@ -23,7 +23,7 @@
Replaces the existing [Image] data at the given [param layer] with this new image.
- The given [Image] must have the same width, height, image format and mipmapping setting (a [code]bool[/code] value) as the rest of the referenced images.
+ The given [Image] must have the same width, height, image format, and mipmapping flag as the rest of the referenced images.
If the image format is unsupported, it will be decompressed and converted to a similar and supported [enum Image.Format].
The update is immediate: it's synchronized with drawing.
diff --git a/doc/classes/JavaScriptBridge.xml b/doc/classes/JavaScriptBridge.xml
index 6ce58018643..faf5424c470 100644
--- a/doc/classes/JavaScriptBridge.xml
+++ b/doc/classes/JavaScriptBridge.xml
@@ -42,7 +42,7 @@
- Execute the string [param code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code]eval()[/code].
+ Execute the string [param code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code skip-lint]eval()[/code].
If [param use_global_execution_context] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment.
diff --git a/doc/classes/Joint2D.xml b/doc/classes/Joint2D.xml
index 9fb91548277..af0a54815fb 100644
--- a/doc/classes/Joint2D.xml
+++ b/doc/classes/Joint2D.xml
@@ -18,7 +18,7 @@
- When [member node_a] and [member node_b] move in different directions the [code]bias[/code] controls how fast the joint pulls them back to their original position. The lower the [code]bias[/code] the more the two bodies can pull on the joint.
+ When [member node_a] and [member node_b] move in different directions the [member bias] controls how fast the joint pulls them back to their original position. The lower the [member bias] the more the two bodies can pull on the joint.
When set to [code]0[/code], the default value from [member ProjectSettings.physics/2d/solver/default_constraint_bias] is used.
diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml
index d0aa89b2e7e..f13f1bdcf40 100644
--- a/doc/classes/Label.xml
+++ b/doc/classes/Label.xml
@@ -58,7 +58,7 @@
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
- The node ignores the first [code]lines_skipped[/code] lines before it starts to display text.
+ The number of the lines ignored and not displayed from the start of the [member text] value.
Limits the lines of text the node shows on screen.
diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml
index 4c444721f4f..283d847a936 100644
--- a/doc/classes/Line2D.xml
+++ b/doc/classes/Line2D.xml
@@ -92,7 +92,7 @@
Determines the miter limit of the polyline. Normally, when [member joint_mode] is set to [constant LINE_JOINT_SHARP], sharp angles fall back to using the logic of [constant LINE_JOINT_BEVEL] joints to prevent very long miters. Higher values of this property mean that the fallback to a bevel joint will happen at sharper angles.
- The texture used for the polyline. Uses [code]texture_mode[/code] for drawing style.
+ The texture used for the polyline. Uses [member texture_mode] for drawing style.
The style to render the [member texture] of the polyline. Use [enum LineTextureMode] constants.
diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml
index 4f38b4d3364..aa81b6fde06 100644
--- a/doc/classes/LinkButton.xml
+++ b/doc/classes/LinkButton.xml
@@ -94,7 +94,7 @@
Font size of the [LinkButton]'s text.
- [StyleBox] used when the [LinkButton] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ [StyleBox] used when the [LinkButton] is focused. The [theme_item focus] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml
index 1a6621d3549..b83ee7ba005 100644
--- a/doc/classes/MarginContainer.xml
+++ b/doc/classes/MarginContainer.xml
@@ -30,16 +30,16 @@
- All direct children of [MarginContainer] will have a bottom margin of [code]margin_bottom[/code] pixels.
+ Offsets towards the inside direct children of the container by this amount of pixels from the bottom.
- All direct children of [MarginContainer] will have a left margin of [code]margin_left[/code] pixels.
+ Offsets towards the inside direct children of the container by this amount of pixels from the left.
- All direct children of [MarginContainer] will have a right margin of [code]margin_right[/code] pixels.
+ Offsets towards the inside direct children of the container by this amount of pixels from the right.
- All direct children of [MarginContainer] will have a top margin of [code]margin_top[/code] pixels.
+ Offsets towards the inside direct children of the container by this amount of pixels from the top.
diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml
index 6aa17c1e164..16b3772fa90 100644
--- a/doc/classes/MenuButton.xml
+++ b/doc/classes/MenuButton.xml
@@ -39,7 +39,7 @@
The number of items currently in the list.
- If [code]true[/code], when the cursor hovers above another [MenuButton] within the same parent which also has [code]switch_on_hover[/code] enabled, it will close the current [MenuButton] and open the other one.
+ If [code]true[/code], when the cursor hovers above another [MenuButton] within the same parent which also has [member switch_on_hover] enabled, it will close the current [MenuButton] and open the other one.
diff --git a/doc/classes/NavigationMeshSourceGeometryData3D.xml b/doc/classes/NavigationMeshSourceGeometryData3D.xml
index dc446dcaaab..dad36234169 100644
--- a/doc/classes/NavigationMeshSourceGeometryData3D.xml
+++ b/doc/classes/NavigationMeshSourceGeometryData3D.xml
@@ -14,7 +14,7 @@
- Adds an array of vertex positions to the geometry data for navigation mesh baking to form triangulated faces. For each face the array must have three vertex positions in clockwise winding order. Since [NavigationMesh] resource have no transform all vertex positions need to be offset by the node's transform using the [code]xform[/code] parameter.
+ Adds an array of vertex positions to the geometry data for navigation mesh baking to form triangulated faces. For each face the array must have three vertex positions in clockwise winding order. Since [NavigationMesh] resources have no transform, all vertex positions need to be offset by the node's transform using [param xform].
@@ -22,7 +22,7 @@
- Adds the geometry data of a [Mesh] resource to the navigation mesh baking data. The mesh must have valid triangulated mesh data to be considered. Since [NavigationMesh] resource have no transform all vertex positions need to be offset by the node's transform using the [code]xform[/code] parameter.
+ Adds the geometry data of a [Mesh] resource to the navigation mesh baking data. The mesh must have valid triangulated mesh data to be considered. Since [NavigationMesh] resources have no transform, all vertex positions need to be offset by the node's transform using [param xform].
@@ -30,7 +30,7 @@
- Adds an [Array] the size of [constant Mesh.ARRAY_MAX] and with vertices at index [constant Mesh.ARRAY_VERTEX] and indices at index [constant Mesh.ARRAY_INDEX] to the navigation mesh baking data. The array must have valid triangulated mesh data to be considered. Since [NavigationMesh] resource have no transform all vertex positions need to be offset by the node's transform using the [code]xform[/code] parameter.
+ Adds an [Array] the size of [constant Mesh.ARRAY_MAX] and with vertices at index [constant Mesh.ARRAY_VERTEX] and indices at index [constant Mesh.ARRAY_INDEX] to the navigation mesh baking data. The array must have valid triangulated mesh data to be considered. Since [NavigationMesh] resources have no transform, all vertex positions need to be offset by the node's transform using [param xform].
diff --git a/doc/classes/NavigationPathQueryParameters2D.xml b/doc/classes/NavigationPathQueryParameters2D.xml
index 4acb6b697f7..74cf4bdb756 100644
--- a/doc/classes/NavigationPathQueryParameters2D.xml
+++ b/doc/classes/NavigationPathQueryParameters2D.xml
@@ -11,7 +11,7 @@
- The navigation [code]map[/code] [RID] used in the path query.
+ The navigation map [RID] used in the path query.
Additional information to include with the navigation path.
diff --git a/doc/classes/NavigationPathQueryParameters3D.xml b/doc/classes/NavigationPathQueryParameters3D.xml
index 204e915efde..2a366c0498a 100644
--- a/doc/classes/NavigationPathQueryParameters3D.xml
+++ b/doc/classes/NavigationPathQueryParameters3D.xml
@@ -11,7 +11,7 @@
- The navigation [code]map[/code] [RID] used in the path query.
+ The navigation map [RID] used in the path query.
Additional information to include with the navigation path.
diff --git a/doc/classes/NavigationRegion2D.xml b/doc/classes/NavigationRegion2D.xml
index e023d8dd7fb..ef660305f41 100644
--- a/doc/classes/NavigationRegion2D.xml
+++ b/doc/classes/NavigationRegion2D.xml
@@ -85,7 +85,7 @@
Determines if the [NavigationRegion2D] is enabled or disabled.
- When pathfinding enters this region's navigation mesh from another regions navigation mesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path.
+ When pathfinding enters this region's navigation mesh from another regions navigation mesh the [member enter_cost] value is added to the path distance for determining the shortest path.
A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with [method NavigationServer2D.map_get_path].
@@ -94,7 +94,7 @@
The [NavigationPolygon] resource to use.
- When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path.
+ When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with [member travel_cost] for determining the shortest path.
If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml
index 7e8ead20324..3257160485f 100644
--- a/doc/classes/NavigationRegion3D.xml
+++ b/doc/classes/NavigationRegion3D.xml
@@ -63,7 +63,7 @@
Determines if the [NavigationRegion3D] is enabled or disabled.
- When pathfinding enters this region's navigation mesh from another regions navigation mesh the [code]enter_cost[/code] value is added to the path distance for determining the shortest path.
+ When pathfinding enters this region's navigation mesh from another regions navigation mesh the [member enter_cost] value is added to the path distance for determining the shortest path.
A bitfield determining all navigation layers the region belongs to. These navigation layers can be checked upon when requesting a path with [method NavigationServer3D.map_get_path].
@@ -72,7 +72,7 @@
The [NavigationMesh] resource to use.
- When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with [code]travel_cost[/code] for determining the shortest path.
+ When pathfinding moves inside this region's navigation mesh the traveled distances are multiplied with [member travel_cost] for determining the shortest path.
If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml
index 8da2f0b86bf..7eff3fc950b 100644
--- a/doc/classes/Node.xml
+++ b/doc/classes/Node.xml
@@ -93,7 +93,7 @@
Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callbacks get triggered first, and the parent node will receive the ready notification afterwards.
Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the [code]@onready[/code] annotation for variables.
Usually used for initialization. For even earlier initialization, [method Object._init] may be used. See also [method _enter_tree].
- [b]Note:[/b] [method _ready] may be called only once for each node. After removing a node from the scene tree and adding it again, [code]_ready[/code] will not be called a second time. This can be bypassed by requesting another call with [method request_ready], which may be called anywhere before adding the node again.
+ [b]Note:[/b] [method _ready] may be called only once for each node. After removing a node from the scene tree and adding it again, [method _ready] will not be called a second time. This can be bypassed by requesting another call with [method request_ready], which may be called anywhere before adding the node again.
@@ -696,7 +696,7 @@
- Requests that [code]_ready[/code] be called again. Note that the method won't be called immediately, but is scheduled for when the node is added to the scene tree again (see [method _ready]). [code]_ready[/code] is called only for the node which requested it, which means that you need to request ready for each child if you want them to call [code]_ready[/code] too (in which case, [code]_ready[/code] will be called in the same order as it would normally).
+ Requests that [method _ready] be called again. Note that the method won't be called immediately, but is scheduled for when the node is added to the scene tree again. [method _ready] is called only for the node which requested it, which means that you need to request ready for each child if you want them to call [method _ready] too (in which case, [method _ready] will be called in the same order as it would normally).
diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml
index 7cfbca11788..ae2ca324e31 100644
--- a/doc/classes/OS.xml
+++ b/doc/classes/OS.xml
@@ -257,7 +257,7 @@
Returns the host OS locale as a string of the form [code]language_Script_COUNTRY_VARIANT@extra[/code]. If you want only the language code and not the fully specified locale from the OS, you can use [method get_locale_language].
[code]language[/code] - 2 or 3-letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url], in lower case.
- [code]Script[/code] - optional, 4-letter [url=https://en.wikipedia.org/wiki/ISO_15924]script code[/url], in title case.
+ [code skip-lint]Script[/code] - optional, 4-letter [url=https://en.wikipedia.org/wiki/ISO_15924]script code[/url], in title case.
[code]COUNTRY[/code] - optional, 2 or 3-letter [url=https://en.wikipedia.org/wiki/ISO_3166-1]country code[/url], in upper case.
[code]VARIANT[/code] - optional, language variant, region and sort order. Variant can have any number of underscored keywords.
[code]extra[/code] - optional, semicolon separated list of additional key words. Currency, calendar, sort order and numbering system information.
diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml
index c530569786e..bb7289cc990 100644
--- a/doc/classes/Object.xml
+++ b/doc/classes/Object.xml
@@ -487,7 +487,7 @@
}
[/csharp]
[/codeblocks]
- [b][code]Object.connect()[/code] or [code]Signal.connect()[/code]?[/b]
+ [b][code skip-lint]Object.connect()[/code] or [code skip-lint]Signal.connect()[/code]?[/b]
As seen above, the recommended method to connect signals is not [method Object.connect]. The code block below shows the four options for connecting signals, using either this legacy method or the recommended [method Signal.connect], and using either an implicit [Callable] or a manually defined one.
[codeblocks]
[gdscript]
@@ -718,7 +718,7 @@
Returns an [Array] of connections for the given [param signal] name. Each connection is represented as a [Dictionary] that contains three entries:
- - [code]signal[/code] is a reference to the [Signal];
+ - [code skip-lint]signal[/code] is a reference to the [Signal];
- [code]callable[/code] is a reference to the connected [Callable];
- [code]flags[/code] is a combination of [enum ConnectFlags].
diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml
index b706e2782f4..516cc9f0200 100644
--- a/doc/classes/PackedByteArray.xml
+++ b/doc/classes/PackedByteArray.xml
@@ -182,7 +182,7 @@
Returns a new [PackedByteArray] with the data decompressed. Set the compression mode using one of [enum FileAccess.CompressionMode]'s constants. [b]This method only accepts brotli, gzip, and deflate compression modes.[/b]
- This method is potentially slower than [code]decompress[/code], as it may have to re-allocate its output buffer multiple times while decompressing, whereas [code]decompress[/code] knows it's output buffer size from the beginning.
+ This method is potentially slower than [method decompress], as it may have to re-allocate its output buffer multiple times while decompressing, whereas [method decompress] knows it's output buffer size from the beginning.
GZIP has a maximal compression ratio of 1032:1, meaning it's very possible for a small compressed payload to decompress to a potentially very large output. To guard against this, you may provide a maximum size this function is allowed to allocate in bytes via [param max_output_size]. Passing -1 will allow for unbounded output. If any positive value is passed, and the decompression exceeds that amount in bytes, then an error will be returned.
@@ -447,7 +447,7 @@
- Returns a copy of the data converted to a [PackedFloat32Array], where each block of 4 bytes has been converted to a 32-bit float (C++ [code]float[/code]).
+ Returns a copy of the data converted to a [PackedFloat32Array], where each block of 4 bytes has been converted to a 32-bit float (C++ [code skip-lint]float[/code]).
The size of the input array must be a multiple of 4 (size of 32-bit float). The size of the new array will be [code]byte_array.size() / 4[/code].
If the original data can't be converted to 32-bit floats, the resulting data is undefined.
diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml
index f945ce30adc..a8cfc288f34 100644
--- a/doc/classes/PackedScene.xml
+++ b/doc/classes/PackedScene.xml
@@ -22,7 +22,7 @@
AddChild(scene);
[/csharp]
[/codeblocks]
- [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [Node2D] ([code]node[/code]), [RigidBody2D] ([code]body[/code]) and [CollisionObject2D] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [code]pack[/code] will therefore only save those two nodes, but not [code]collision[/code].
+ [b]Example of saving a node with different owners:[/b] The following example creates 3 objects: [Node2D] ([code]node[/code]), [RigidBody2D] ([code]body[/code]) and [CollisionObject2D] ([code]collision[/code]). [code]collision[/code] is a child of [code]body[/code] which is a child of [code]node[/code]. Only [code]body[/code] is owned by [code]node[/code] and [method pack] will therefore only save those two nodes, but not [code]collision[/code].
[codeblocks]
[gdscript]
# Create the objects.
@@ -85,7 +85,7 @@
- Returns the [code]SceneState[/code] representing the scene file contents.
+ Returns the [SceneState] representing the scene file contents.
diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml
index 85917efe254..9a2a23c9b71 100644
--- a/doc/classes/PacketPeer.xml
+++ b/doc/classes/PacketPeer.xml
@@ -57,7 +57,7 @@
Maximum buffer size allowed when encoding [Variant]s. Raise this value to support heavier memory allocations.
- The [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than [code]encode_buffer_max_size[/code], the method will error out with [constant ERR_OUT_OF_MEMORY].
+ The [method put_var] method allocates memory on the stack, and the buffer used will grow automatically to the closest power of two to match the size of the [Variant]. If the [Variant] is bigger than [member encode_buffer_max_size], the method will error out with [constant ERR_OUT_OF_MEMORY].
diff --git a/doc/classes/ParticleProcessMaterial.xml b/doc/classes/ParticleProcessMaterial.xml
index 355fec37139..0f6cc3b29ee 100644
--- a/doc/classes/ParticleProcessMaterial.xml
+++ b/doc/classes/ParticleProcessMaterial.xml
@@ -152,7 +152,7 @@
Unit vector specifying the particles' emission direction.
- The box's extents if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_BOX].
+ The box's extents if [member emission_shape] is set to [constant EMISSION_SHAPE_BOX].
Particle color will be modulated by color determined by sampling this texture at the same point as the [member emission_point_texture].
@@ -162,7 +162,7 @@
Particle velocity and rotation will be set by sampling this texture at the same point as the [member emission_point_texture]. Used only in [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.
- The number of emission points if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
+ The number of emission points if [member emission_shape] is set to [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS].
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.
@@ -183,7 +183,7 @@
Particles will be emitted inside this region. Use [enum EmissionShape] constants for values.
- The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE].
+ The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE].
Amount of [member spread] along the Y axis.
diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml
index ae25af1dd93..8be92edbad2 100644
--- a/doc/classes/PhysicsServer2D.xml
+++ b/doc/classes/PhysicsServer2D.xml
@@ -118,7 +118,7 @@
- Returns the [RID] of the space assigned to the area. Returns [code]RID()[/code] if no space is assigned.
+ Returns the [RID] of the space assigned to the area. Returns an empty [RID] if no space is assigned.
@@ -486,7 +486,7 @@
- Returns the [RID] of the space assigned to the body. Returns [code]RID()[/code] if no space is assigned.
+ Returns the [RID] of the space assigned to the body. Returns an empty [RID] if no space is assigned.
@@ -827,7 +827,7 @@
- Makes the joint a pin joint. If [param body_b] is [code]RID()[/code], then [param body_a] is pinned to the point [param anchor] (given in global coordinates); otherwise, [param body_a] is pinned to [param body_b] at the point [param anchor] (given in global coordinates). To set the parameters which are specific to the pin joint, see [method pin_joint_set_param].
+ Makes the joint a pin joint. If [param body_b] is an empty [RID], then [param body_a] is pinned to the point [param anchor] (given in global coordinates); otherwise, [param body_a] is pinned to [param body_b] at the point [param anchor] (given in global coordinates). To set the parameters which are specific to the pin joint, see [method pin_joint_set_param].
@@ -918,13 +918,13 @@
Sets the shape data that defines the configuration of the shape. The [param data] to be passed depends on the shape's type (see [method shape_get_type]):
- - [constant SHAPE_WORLD_BOUNDARY]: an array of length two containing a [Vector2] [code]normal[/code] direction and a [code]float[/code] distance [code]d[/code],
- - [constant SHAPE_SEPARATION_RAY]: a dictionary containing the key [code]length[/code] with a [code]float[/code] value and the key [code]slide_on_slope[/code] with a [code]bool[/code] value,
+ - [constant SHAPE_WORLD_BOUNDARY]: an array of length two containing a [Vector2] [code]normal[/code] direction and a [float] distance [code]d[/code],
+ - [constant SHAPE_SEPARATION_RAY]: a dictionary containing the key [code]length[/code] with a [float] value and the key [code]slide_on_slope[/code] with a [bool] value,
- [constant SHAPE_SEGMENT]: a [Rect2] [code]rect[/code] containing the first point of the segment in [code]rect.position[/code] and the second point of the segment in [code]rect.size[/code],
- - [constant SHAPE_CIRCLE]: a [code]float[/code] [code]radius[/code],
+ - [constant SHAPE_CIRCLE]: a [float] [code]radius[/code],
- [constant SHAPE_RECTANGLE]: a [Vector2] [code]half_extents[/code],
- - [constant SHAPE_CAPSULE]: an array of length two (or a [Vector2]) containing a [code]float[/code] [code]height[/code] and a [code]float[/code] [code]radius[/code],
- - [constant SHAPE_CONVEX_POLYGON]: either a [PackedVector2Array] of points defining a convex polygon in counterclockwise order (the clockwise outward normal of each segment formed by consecutive points is calculated internally), or a [PackedFloat32Array] of length divisible by four so that every 4-tuple of [code]float[/code]s contains the coordinates of a point followed by the coordinates of the clockwise outward normal vector to the segment between the current point and the next point,
+ - [constant SHAPE_CAPSULE]: an array of length two (or a [Vector2]) containing a [float] [code]height[/code] and a [float] [code]radius[/code],
+ - [constant SHAPE_CONVEX_POLYGON]: either a [PackedVector2Array] of points defining a convex polygon in counterclockwise order (the clockwise outward normal of each segment formed by consecutive points is calculated internally), or a [PackedFloat32Array] of length divisible by four so that every 4-tuple of [float]s contains the coordinates of a point followed by the coordinates of the clockwise outward normal vector to the segment between the current point and the next point,
- [constant SHAPE_CONCAVE_POLYGON]: a [PackedVector2Array] of length divisible by two (each pair of points forms one segment).
[b]Warning:[/b] In the case of [constant SHAPE_CONVEX_POLYGON], this method does not check if the points supplied actually form a convex polygon (unlike the [member CollisionPolygon2D.polygon] property).
diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml
index f3441f45ed2..32810b0daf3 100644
--- a/doc/classes/PhysicsServer3D.xml
+++ b/doc/classes/PhysicsServer3D.xml
@@ -582,10 +582,9 @@
- Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]).
- The force integration function takes 2 arguments:
- [code]state:[/code] [PhysicsDirectBodyState3D] used to retrieve and modify the body's state.
- [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code].
+ Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). The force integration function takes 2 arguments:
+ - [code]state[/code] — [PhysicsDirectBodyState3D] used to retrieve and modify the body's state.
+ - [code skip-lint]userdata[/code] — optional user data passed to [method body_set_force_integration_callback].
diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml
index 6faf83c0d62..a0da82d1d64 100644
--- a/doc/classes/Plane.xml
+++ b/doc/classes/Plane.xml
@@ -152,11 +152,11 @@
The distance from the origin to the plane, expressed in terms of [member normal] (according to its direction and magnitude). Actual absolute distance from the origin to the plane can be calculated as [code]abs(d) / normal.length()[/code] (if [member normal] has zero length then this [Plane] does not represent a valid plane).
- In the scalar equation of the plane [code]ax + by + cz = d[/code], this is [code]d[/code], while the [code](a, b, c)[/code] coordinates are represented by the [member normal] property.
+ In the scalar equation of the plane [code]ax + by + cz = d[/code], this is [code skip-lint]d[/code], while the [code](a, b, c)[/code] coordinates are represented by the [member normal] property.
The normal of the plane, typically a unit vector. Shouldn't be a zero vector as [Plane] with such [member normal] does not represent a valid plane.
- In the scalar equation of the plane [code]ax + by + cz = d[/code], this is the vector [code](a, b, c)[/code], where [code]d[/code] is the [member d] property.
+ In the scalar equation of the plane [code]ax + by + cz = d[/code], this is the vector [code](a, b, c)[/code], where [code skip-lint]d[/code] is the [member d] property.
The X component of the plane's [member normal] vector.
diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml
index 73c3c022b73..25adc57990e 100644
--- a/doc/classes/Polygon2D.xml
+++ b/doc/classes/Polygon2D.xml
@@ -75,7 +75,7 @@
Internal list of [Bone2D] nodes used by the assigned [member skeleton]. Edited using the Polygon2D editor ("UV" button on the top toolbar).
- The polygon's fill color. If [code]texture[/code] is defined, it will be multiplied by this color. It will also be the default color for vertices not set in [code]vertex_colors[/code].
+ The polygon's fill color. If [member texture] is set, it will be multiplied by this color. It will also be the default color for vertices not set in [member vertex_colors].
Number of internal vertices, used for UV mapping.
@@ -100,22 +100,22 @@
Path to a [Skeleton2D] node used for skeleton-based deformations of this polygon. If empty or invalid, skeletal deformations will not be used.
- The polygon's fill texture. Use [code]uv[/code] to set texture coordinates.
+ The polygon's fill texture. Use [member uv] to set texture coordinates.
- Amount to offset the polygon's [code]texture[/code]. If [code](0, 0)[/code] the texture's origin (its top-left corner) will be placed at the polygon's [code]position[/code].
+ Amount to offset the polygon's [member texture]. If set to [code]Vector2(0, 0)[/code], the texture's origin (its top-left corner) will be placed at the polygon's position.
The texture's rotation in radians.
- Amount to multiply the [code]uv[/code] coordinates when using a [code]texture[/code]. Larger values make the texture smaller, and vice versa.
+ Amount to multiply the [member uv] coordinates when using [member texture]. Larger values make the texture smaller, and vice versa.
- Texture coordinates for each vertex of the polygon. There should be one [code]uv[/code] per polygon vertex. If there are fewer, undefined vertices will use [code](0, 0)[/code].
+ Texture coordinates for each vertex of the polygon. There should be one UV value per polygon vertex. If there are fewer, undefined vertices will use [code]Vector2(0, 0)[/code].
- Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [code]color[/code].
+ Color for each vertex. Colors are interpolated between vertices, resulting in smooth gradients. There should be one per polygon vertex. If there are fewer, undefined vertices will use [member color].
diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml
index 11578367797..ba9c7456637 100644
--- a/doc/classes/ProjectSettings.xml
+++ b/doc/classes/ProjectSettings.xml
@@ -2722,7 +2722,7 @@
Specify whether OpenXR should be configured for an HMD or a hand held device.
- If true and foveation is supported, will automatically adjust foveation level based on framerate up to the level set on [code]xr/openxr/foveation_level[/code].
+ If true and foveation is supported, will automatically adjust foveation level based on framerate up to the level set on [member xr/openxr/foveation_level].
Applied foveation level if supported: 0 = off, 1 = low, 2 = medium, 3 = high.
diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml
index 0499d51d79d..74dfae77fc2 100644
--- a/doc/classes/Quaternion.xml
+++ b/doc/classes/Quaternion.xml
@@ -191,7 +191,7 @@
Performs a spherical cubic interpolation between quaternions [param pre_a], this vector, [param b], and [param post_b], by the given amount [param weight].
- It can perform smoother interpolation than [code]spherical_cubic_interpolate()[/code] by the time values.
+ It can perform smoother interpolation than [method spherical_cubic_interpolate] by the time values.
diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml
index 0f429c31fa6..ca95557f1b8 100644
--- a/doc/classes/RichTextEffect.xml
+++ b/doc/classes/RichTextEffect.xml
@@ -7,11 +7,11 @@
A custom effect for a [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.
[codeblocks]
- [gdscript]
+ [gdscript skip-lint]
# The RichTextEffect will be usable like this: `[example]Some text[/example]`
var bbcode = "example"
[/gdscript]
- [csharp]
+ [csharp skip-lint]
// The RichTextEffect will be usable like this: `[example]Some text[/example]`
string bbcode = "example";
[/csharp]
diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml
index 1e5b09516f6..405d189c547 100644
--- a/doc/classes/RichTextLabel.xml
+++ b/doc/classes/RichTextLabel.xml
@@ -6,9 +6,9 @@
A control for displaying text that can contain custom fonts, images, and basic formatting. [RichTextLabel] manages these as an internal tag stack. It also adapts itself to given width/heights.
[b]Note:[/b] Assignments to [member text] clear the tag stack and reconstruct it from the property's contents. Any edits made to [member text] will erase previous edits made from other manual sources such as [method append_text] and the [code]push_*[/code] / [method pop] methods.
- [b]Note:[/b] RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [code][b]bold[i]bold italic[/b]italic[/i][/code], use [code][b]bold[i]bold italic[/i][/b][i]italic[/i][/code].
+ [b]Note:[/b] RichTextLabel doesn't support entangled BBCode tags. For example, instead of using [code skip-lint][b]bold[i]bold italic[/b]italic[/i][/code], use [code skip-lint][b]bold[i]bold italic[/i][/b][i]italic[/i][/code].
[b]Note:[/b] [code]push_*/pop_*[/code] functions won't affect BBCode.
- [b]Note:[/b] Unlike [Label], [RichTextLabel] doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code][center][/code] tag as follows: [code][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content] property.
+ [b]Note:[/b] Unlike [Label], [RichTextLabel] doesn't have a [i]property[/i] to horizontally align text to the center. Instead, enable [member bbcode_enabled] and surround the text in a [code skip-lint][center][/code] tag as follows: [code skip-lint][center]Example[/center][/code]. There is currently no built-in way to vertically align text either, but this can be emulated by relying on anchors/containers and the [member fit_content] property.
$DOCS_URL/tutorials/ui/bbcode_in_richtextlabel.html
@@ -289,32 +289,32 @@
- Adds a [code][bgcolor][/code] tag to the tag stack.
+ Adds a [code skip-lint][bgcolor][/code] tag to the tag stack.
- Adds a [code][font][/code] tag with a bold font to the tag stack. This is the same as adding a [code][b][/code] tag if not currently in a [code][i][/code] tag.
+ Adds a [code skip-lint][font][/code] tag with a bold font to the tag stack. This is the same as adding a [code skip-lint][b][/code] tag if not currently in a [code skip-lint][i][/code] tag.
- Adds a [code][font][/code] tag with a bold italics font to the tag stack.
+ Adds a [code skip-lint][font][/code] tag with a bold italics font to the tag stack.
- Adds a [code][cell][/code] tag to the tag stack. Must be inside a [code][table][/code] tag. See [method push_table] for details.
+ Adds a [code skip-lint][cell][/code] tag to the tag stack. Must be inside a [code skip-lint][table][/code] tag. See [method push_table] for details.
- Adds a [code][color][/code] tag to the tag stack.
+ Adds a [code skip-lint][color][/code] tag to the tag stack.
@@ -341,14 +341,14 @@
- Adds a [code][dropcap][/code] tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
+ Adds a [code skip-lint][dropcap][/code] tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text.
- Adds a [code][fgcolor][/code] tag to the tag stack.
+ Adds a [code skip-lint][fgcolor][/code] tag to the tag stack.
@@ -356,7 +356,7 @@
- Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration.
+ Adds a [code skip-lint][font][/code] tag to the tag stack. Overrides default fonts for its duration.
Passing [code]0[/code] to [param font_size] will use the existing default font size.
@@ -364,27 +364,27 @@
- Adds a [code][font_size][/code] tag to the tag stack. Overrides default font size for its duration.
+ Adds a [code skip-lint][font_size][/code] tag to the tag stack. Overrides default font size for its duration.
- Adds a [code][hint][/code] tag to the tag stack. Same as BBCode [code][hint=something]{text}[/hint][/code].
+ Adds a [code skip-lint][hint][/code] tag to the tag stack. Same as BBCode [code skip-lint][hint=something]{text}[/hint][/code].
- Adds an [code][indent][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.
+ Adds an [code skip-lint][indent][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.
- Adds a [code][font][/code] tag with an italics font to the tag stack. This is the same as adding an [code][i][/code] tag if not currently in a [code][b][/code] tag.
+ Adds a [code skip-lint][font][/code] tag with an italics font to the tag stack. This is the same as adding an [code skip-lint][i][/code] tag if not currently in a [code skip-lint][b][/code] tag.
@@ -401,40 +401,40 @@
- Adds [code][ol][/code] or [code][ul][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.
+ Adds [code skip-lint][ol][/code] or [code skip-lint][ul][/code] tag to the tag stack. Multiplies [param level] by current [member tab_size] to determine new margin length.
- Adds a meta tag to the tag stack. Similar to the BBCode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types.
+ Adds a meta tag to the tag stack. Similar to the BBCode [code skip-lint][url=something]{text}[/url][/code], but supports non-[String] metadata types.
- Adds a [code][font][/code] tag with a monospace font to the tag stack.
+ Adds a [code skip-lint][font][/code] tag with a monospace font to the tag stack.
- Adds a [code][font][/code] tag with a normal font to the tag stack.
+ Adds a [code skip-lint][font][/code] tag with a normal font to the tag stack.
- Adds a [code][outline_color][/code] tag to the tag stack. Adds text outline for its duration.
+ Adds a [code skip-lint][outline_color][/code] tag to the tag stack. Adds text outline for its duration.
- Adds a [code][outline_size][/code] tag to the tag stack. Overrides default text outline size for its duration.
+ Adds a [code skip-lint][outline_size][/code] tag to the tag stack. Overrides default text outline size for its duration.
@@ -446,13 +446,13 @@
- Adds a [code][p][/code] tag to the tag stack.
+ Adds a [code skip-lint][p][/code] tag to the tag stack.
- Adds a [code][s][/code] tag to the tag stack.
+ Adds a [code skip-lint][s][/code] tag to the tag stack.
@@ -461,13 +461,13 @@
- Adds a [code][table=columns,inline_align][/code] tag to the tag stack.
+ Adds a [code skip-lint][table=columns,inline_align][/code] tag to the tag stack.
- Adds a [code][u][/code] tag to the tag stack.
+ Adds a [code skip-lint][u][/code] tag to the tag stack.
@@ -589,13 +589,13 @@
If [code]true[/code], the label's minimum size will be automatically updated to fit its content, matching the behavior of [Label].
- If [code]true[/code], the label underlines hint tags such as [code][hint=description]{text}[/hint][/code].
+ If [code]true[/code], the label underlines hint tags such as [code skip-lint][hint=description]{text}[/hint][/code].
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
- If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code].
+ If [code]true[/code], the label underlines meta tags such as [code skip-lint][url]{text}[/url][/code].
The delay after which the loading progress bar is displayed, in milliseconds. Set to [code]-1[/code] to disable progress bar entirely.
@@ -624,7 +624,7 @@
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] If [member bbcode_enabled] is [code]true[/code], it is unadvised to use the [code]+=[/code] operator with [code]text[/code] (e.g. [code]text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using [code]push_*[/code] methods. Use [method append_text] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
+ [b]Note:[/b] If [member bbcode_enabled] is [code]true[/code], it is unadvised to use the [code]+=[/code] operator with [member text] (e.g. [code]text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. It will also erase all BBCode that was added to stack using [code]push_*[/code] methods. Use [method append_text] for adding text instead, unless you absolutely need to close a tag that was opened in an earlier method call.
Base text writing direction.
@@ -653,7 +653,7 @@
- Triggered when the user clicks on content between meta tags. If the meta is defined in text, e.g. [code][url={"data"="hi"}]hi[/url][/code], then the parameter for this signal will be a [String] type. If a particular type or an object is desired, the [method push_meta] method must be used to manually insert the data into the tag stack.
+ Triggered when the user clicks on content between meta tags. If the meta is defined in text, e.g. [code skip-lint][url={"data"="hi"}]hi[/url][/code], then the parameter for this signal will be a [String] type. If a particular type or an object is desired, the [method push_meta] method must be used to manually insert the data into the tag stack.
@@ -800,7 +800,7 @@
The default text font size.
- The background used when the [RichTextLabel] is focused. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ The background used when the [RichTextLabel] is focused. The [theme_item focus] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
The normal background for the [RichTextLabel].
diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml
index 69cfd2bb07b..c507a7c39ae 100644
--- a/doc/classes/RigidBody3D.xml
+++ b/doc/classes/RigidBody3D.xml
@@ -182,7 +182,7 @@
The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value.
- If set to [code]Vector3.ZERO[/code], inertia is automatically computed (default value).
+ If set to [constant Vector3.ZERO], inertia is automatically computed (default value).
[b]Note:[/b] This value does not change when inertia is automatically computed. Use [PhysicsServer3D] to get the computed inertia.
[codeblocks]
[gdscript]
diff --git a/doc/classes/Slider.xml b/doc/classes/Slider.xml
index efb646b7ae0..0471b8c275f 100644
--- a/doc/classes/Slider.xml
+++ b/doc/classes/Slider.xml
@@ -42,7 +42,7 @@
Boolean constant. If [code]1[/code], the grabber texture size will be ignored and it will fit within slider's bounds based only on its center position.
- Vertical/horizontal offset of the grabber.
+ Vertical or horizontal offset of the grabber.
The texture for the grabber (the draggable element).
@@ -57,13 +57,13 @@
The texture for the ticks, visible when [member Slider.tick_count] is greater than 0.
- The background of the area to the left/bottom of the grabber.
+ The background of the area to the left or bottom of the grabber.
- The background of the area to the left/bottom of the grabber that displays when it's being hovered or focused.
+ The background of the area to the left or bottom of the grabber that displays when it's being hovered or focused.
- The background for the whole slider. Determines the height/width of the [code]grabber_area[/code].
+ The background for the whole slider. Affects the height or width of the [theme_item grabber_area].
diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml
index 217d0947dbc..0671bd5967a 100644
--- a/doc/classes/SpinBox.xml
+++ b/doc/classes/SpinBox.xml
@@ -49,13 +49,13 @@
Changes the alignment of the underlying [LineEdit].
- If not [code]0[/code], [code]value[/code] will always be rounded to a multiple of [code]custom_arrow_step[/code] when interacting with the arrow buttons of the [SpinBox].
+ If not [code]0[/code], [member Range.value] will always be rounded to a multiple of [member custom_arrow_step] when interacting with the arrow buttons of the [SpinBox].
If [code]true[/code], the [SpinBox] will be editable. Otherwise, it will be read only.
- Adds the specified [code]prefix[/code] string before the numerical value of the [SpinBox].
+ Adds the specified prefix string before the numerical value of the [SpinBox].
If [code]true[/code], the [SpinBox] will select the whole text when the [LineEdit] gains focus. Clicking the up and down arrows won't trigger this behavior.
@@ -63,7 +63,7 @@
- Adds the specified [code]suffix[/code] string after the numerical value of the [SpinBox].
+ Adds the specified suffix string after the numerical value of the [SpinBox].
Sets the value of the [Range] for this [SpinBox] when the [LineEdit] text is [i]changed[/i] instead of [i]submitted[/i]. See [signal LineEdit.text_changed] and [signal LineEdit.text_submitted].
diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml
index d22e646dd0a..1898b02166b 100644
--- a/doc/classes/TextEdit.xml
+++ b/doc/classes/TextEdit.xml
@@ -1463,7 +1463,7 @@
Sets a custom [Texture2D] for tab text characters.
- Sets the [StyleBox] when in focus. The [code]focus[/code] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
+ Sets the [StyleBox] when in focus. The [theme_item focus] [StyleBox] is displayed [i]over[/i] the base [StyleBox], so a partially transparent [StyleBox] should be used to ensure the base [StyleBox] remains visible. A [StyleBox] that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a [StyleBoxEmpty] resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons.
Sets the [StyleBox] of this [TextEdit].
diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml
index 3893ef8cbca..136d560deb7 100644
--- a/doc/classes/TextServer.xml
+++ b/doc/classes/TextServer.xml
@@ -187,7 +187,7 @@
- Returns outline contours of the glyph as a [code]Dictionary[/code] with the following contents:
+ Returns outline contours of the glyph as a [Dictionary] with the following contents:
[code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values.
[code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour.
[code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled.
@@ -375,7 +375,7 @@
- Returns list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size.
+ Returns list of the font sizes in the cache. Each size is [Vector2i] with font size and outline size.
@@ -1991,8 +1991,7 @@
BiDi override for email.
- BiDi override for lists.
- Structured text options: list separator [code]String[/code].
+ BiDi override for lists. Structured text options: list separator [String].
BiDi override for GDScript.
diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml
index 23cacf481f6..0c1e9adf716 100644
--- a/doc/classes/TextureProgressBar.xml
+++ b/doc/classes/TextureProgressBar.xml
@@ -71,13 +71,13 @@
[Texture2D] that draws under the progress bar. The bar's background.
- Multiplies the color of the bar's [code]texture_over[/code] texture. The effect is similar to [member CanvasItem.modulate], except it only affects this specific texture instead of the entire node.
+ Multiplies the color of the bar's [member texture_over] texture. The effect is similar to [member CanvasItem.modulate], except it only affects this specific texture instead of the entire node.
- Multiplies the color of the bar's [code]texture_progress[/code] texture.
+ Multiplies the color of the bar's [member texture_progress] texture.
- Multiplies the color of the bar's [code]texture_under[/code] texture.
+ Multiplies the color of the bar's [member texture_under] texture.
diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml
index 8c2a690ec90..37f4cc5c0b2 100644
--- a/doc/classes/TileSet.xml
+++ b/doc/classes/TileSet.xml
@@ -168,7 +168,7 @@
- Returns a new unused source ID. This generated ID is the same that a call to [code]add_source[/code] would return.
+ Returns a new unused source ID. This generated ID is the same that a call to [method add_source] would return.
diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml
index f478f37500c..755c266cd99 100644
--- a/doc/classes/TileSetAtlasSource.xml
+++ b/doc/classes/TileSetAtlasSource.xml
@@ -39,7 +39,7 @@
- Returns the atlas grid size, which depends on how many tiles can fit in the texture. It thus depends on the Texture's size, the atlas [code]margins[/code] the tiles' [code]texture_region_size[/code].
+ Returns the atlas grid size, which depends on how many tiles can fit in the texture. It thus depends on the [member texture]'s size, the atlas [member margins], and the tiles' [member texture_region_size].
diff --git a/doc/classes/Time.xml b/doc/classes/Time.xml
index 8ed17f6d8a0..9dc567562a0 100644
--- a/doc/classes/Time.xml
+++ b/doc/classes/Time.xml
@@ -48,8 +48,8 @@
- Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code].
- If [param weekday] is [code]false[/code], then the [code]weekday[/code] entry is excluded (the calculation is relatively expensive).
+ Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code skip-lint]weekday[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code].
+ If [param weekday] is [code]false[/code], then the [code skip-lint]weekday[/code] entry is excluded (the calculation is relatively expensive).
[b]Note:[/b] Any decimal fraction in the time string will be ignored silently.
diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml
index 62954126924..abb81b95cbb 100644
--- a/doc/classes/Transform2D.xml
+++ b/doc/classes/Transform2D.xml
@@ -133,7 +133,7 @@
- Returns [code]true[/code] if this transform and [param xform] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
+ Returns [code]true[/code] if this transform and [param xform] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml
index 7bca99d6977..c96be5124ee 100644
--- a/doc/classes/Transform3D.xml
+++ b/doc/classes/Transform3D.xml
@@ -80,7 +80,7 @@
- Returns [code]true[/code] if this transform and [param xform] are approximately equal, by calling [code]is_equal_approx[/code] on each component.
+ Returns [code]true[/code] if this transform and [param xform] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component.
diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml
index d85678cc819..e322e3adc0b 100644
--- a/doc/classes/Tree.xml
+++ b/doc/classes/Tree.xml
@@ -458,7 +458,7 @@
- Emitted instead of [code]item_selected[/code] if [code]select_mode[/code] is [constant SELECT_MULTI].
+ Emitted instead of [signal item_selected] if [member select_mode] is set to [constant SELECT_MULTI].
diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml
index dc3e25fa9b1..27348006422 100644
--- a/doc/classes/Variant.xml
+++ b/doc/classes/Variant.xml
@@ -28,7 +28,7 @@
[/codeblocks]
Godot tracks all scripting API variables within Variants. Without even realizing it, you use Variants all the time. When a particular language enforces its own rules for keeping data typed, then that language is applying its own custom logic over the base Variant scripting API.
- GDScript automatically wrap values in them. It keeps all data in plain Variants by default and then optionally enforces custom static typing rules on variable types.
- - C# is statically typed, but uses its own implementation of the [code]Variant[/code] type in place of Godot's Variant class when it needs to represent a dynamic value. A [code]Variant[/code] can be assigned any compatible type implicitly but converting requires an explicit cast.
+ - C# is statically typed, but uses its own implementation of the Variant type in place of Godot's [Variant] class when it needs to represent a dynamic value. C# Variant can be assigned any compatible type implicitly but converting requires an explicit cast.
The global [method @GlobalScope.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]).
[codeblocks]
[gdscript]
diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml
index b4718d96a31..fdaaf239f86 100644
--- a/doc/classes/Vector2.xml
+++ b/doc/classes/Vector2.xml
@@ -157,7 +157,7 @@
Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
- It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
+ It can perform smoother interpolation than [method cubic_interpolate] by the time values.
diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml
index 840e2ba61a8..92fbdf68506 100644
--- a/doc/classes/Vector3.xml
+++ b/doc/classes/Vector3.xml
@@ -131,7 +131,7 @@
Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
- It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
+ It can perform smoother interpolation than [method cubic_interpolate] by the time values.
diff --git a/doc/classes/Vector4.xml b/doc/classes/Vector4.xml
index 6f99234991c..e5ad5631e83 100644
--- a/doc/classes/Vector4.xml
+++ b/doc/classes/Vector4.xml
@@ -85,7 +85,7 @@
Performs a cubic interpolation between this vector and [param b] using [param pre_a] and [param post_b] as handles, and returns the result at position [param weight]. [param weight] is on the range of 0.0 to 1.0, representing the amount of interpolation.
- It can perform smoother interpolation than [code]cubic_interpolate()[/code] by the time values.
+ It can perform smoother interpolation than [method cubic_interpolate] by the time values.
diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml
index baf9eded56d..cc6394e2da7 100644
--- a/doc/classes/VisualShaderNode.xml
+++ b/doc/classes/VisualShaderNode.xml
@@ -67,28 +67,28 @@
- Floating-point scalar. Translated to [code]float[/code] type in shader code.
+ Floating-point scalar. Translated to [code skip-lint]float[/code] type in shader code.
- Integer scalar. Translated to [code]int[/code] type in shader code.
+ Integer scalar. Translated to [code skip-lint]int[/code] type in shader code.
- Unsigned integer scalar. Translated to [code]uint[/code] type in shader code.
+ Unsigned integer scalar. Translated to [code skip-lint]uint[/code] type in shader code.
- 2D vector of floating-point values. Translated to [code]vec2[/code] type in shader code.
+ 2D vector of floating-point values. Translated to [code skip-lint]vec2[/code] type in shader code.
- 3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code.
+ 3D vector of floating-point values. Translated to [code skip-lint]vec3[/code] type in shader code.
- 4D vector of floating-point values. Translated to [code]vec4[/code] type in shader code.
+ 4D vector of floating-point values. Translated to [code skip-lint]vec4[/code] type in shader code.
- Boolean type. Translated to [code]bool[/code] type in shader code.
+ Boolean type. Translated to [code skip-lint]bool[/code] type in shader code.
- Transform type. Translated to [code]mat4[/code] type in shader code.
+ Transform type. Translated to [code skip-lint]mat4[/code] type in shader code.
Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes.
diff --git a/doc/classes/VisualShaderNodeBooleanConstant.xml b/doc/classes/VisualShaderNodeBooleanConstant.xml
index d32af17940b..d2a7ff3d45d 100644
--- a/doc/classes/VisualShaderNodeBooleanConstant.xml
+++ b/doc/classes/VisualShaderNodeBooleanConstant.xml
@@ -5,7 +5,7 @@
Has only one output port and no inputs.
- Translated to [code]bool[/code] in the shader language.
+ Translated to [code skip-lint]bool[/code] in the shader language.
diff --git a/doc/classes/VisualShaderNodeFloatConstant.xml b/doc/classes/VisualShaderNodeFloatConstant.xml
index 9b57a9a240c..2436663f1fb 100644
--- a/doc/classes/VisualShaderNodeFloatConstant.xml
+++ b/doc/classes/VisualShaderNodeFloatConstant.xml
@@ -4,7 +4,7 @@
A scalar floating-point constant to be used within the visual shader graph.
- Translated to [code]float[/code] in the shader language.
+ Translated to [code skip-lint]float[/code] in the shader language.
diff --git a/doc/classes/VisualShaderNodeIntConstant.xml b/doc/classes/VisualShaderNodeIntConstant.xml
index bde1aaab5d8..f942bf299f5 100644
--- a/doc/classes/VisualShaderNodeIntConstant.xml
+++ b/doc/classes/VisualShaderNodeIntConstant.xml
@@ -4,7 +4,7 @@
A scalar integer constant to be used within the visual shader graph.
- Translated to [code]int[/code] in the shader language.
+ Translated to [code skip-lint]int[/code] in the shader language.
diff --git a/doc/classes/VisualShaderNodeSwitch.xml b/doc/classes/VisualShaderNodeSwitch.xml
index 9b9266c4782..a44ca3f0b3d 100644
--- a/doc/classes/VisualShaderNodeSwitch.xml
+++ b/doc/classes/VisualShaderNodeSwitch.xml
@@ -4,7 +4,7 @@
A selector function for use within the visual shader graph.
- Returns an associated value of the [code]op_type[/code] type if the provided boolean value is [code]true[/code] or [code]false[/code].
+ Returns an associated value of the [member op_type] type if the provided boolean value is [code]true[/code] or [code]false[/code].
diff --git a/doc/classes/WorldBoundaryShape2D.xml b/doc/classes/WorldBoundaryShape2D.xml
index 018e6289a35..ee1aa8d2249 100644
--- a/doc/classes/WorldBoundaryShape2D.xml
+++ b/doc/classes/WorldBoundaryShape2D.xml
@@ -14,7 +14,7 @@
In the scalar equation of the line [code]ax + by = d[/code], this is [code]d[/code], while the [code](a, b)[/code] coordinates are represented by the [member normal] property.
- The line's normal, typically a unit vector. Its direction indicates the non-colliding half-plane. Can be of any length but zero. Defaults to [code]Vector2.UP[/code].
+ The line's normal, typically a unit vector. Its direction indicates the non-colliding half-plane. Can be of any length but zero. Defaults to [constant Vector2.UP].
diff --git a/doc/classes/float.xml b/doc/classes/float.xml
index 7d74e3d8325..3ffaa60c320 100644
--- a/doc/classes/float.xml
+++ b/doc/classes/float.xml
@@ -5,7 +5,7 @@
The [float] built-in type is a 64-bit double-precision floating-point number, equivalent to [code]double[/code] in C++. This type has 14 reliable decimal digits of precision. The maximum value of [float] is approximately [code]1.79769e308[/code], and the minimum is approximately [code]-1.79769e308[/code].
- Many methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to [code]float[/code] in C++, which have 6 reliable decimal digits of precision. For data structures such as [Vector2] and [Vector3], Godot uses 32-bit floating-point numbers by default, but it can be changed to use 64-bit doubles if Godot is compiled with the [code]precision=double[/code] option.
+ Many methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to [code skip-lint]float[/code] in C++, which have 6 reliable decimal digits of precision. For data structures such as [Vector2] and [Vector3], Godot uses 32-bit floating-point numbers by default, but it can be changed to use 64-bit doubles if Godot is compiled with the [code]precision=double[/code] option.
Math done using the [float] type is not guaranteed to be exact and will often result in small errors. You should usually use the [method @GlobalScope.is_equal_approx] and [method @GlobalScope.is_zero_approx] methods instead of [code]==[/code] to compare [float] values for equality.
diff --git a/doc/tools/make_rst.py b/doc/tools/make_rst.py
index 54bad7cf05b..e62b3d56d7f 100755
--- a/doc/tools/make_rst.py
+++ b/doc/tools/make_rst.py
@@ -401,6 +401,15 @@ class State:
self.classes = OrderedDict(sorted(self.classes.items(), key=lambda t: t[0].lower()))
+class TagState:
+ def __init__(self, raw: str, name: str, arguments: List[str], closing: bool) -> None:
+ self.raw = raw
+
+ self.name = name
+ self.arguments = arguments
+ self.closing = closing
+
+
class TypeName:
def __init__(self, type_name: str, enum: Optional[str] = None, is_bitfield: bool = False) -> None:
self.type_name = type_name
@@ -694,6 +703,8 @@ def main() -> None:
print("")
+ # Print out warnings and errors, or lack thereof, and exit with an appropriate code.
+
if state.num_warnings >= 2:
print(
f'{STYLES["yellow"]}{state.num_warnings} warnings were found in the class reference XML. Please check the messages above.{STYLES["reset"]}'
@@ -703,19 +714,20 @@ def main() -> None:
f'{STYLES["yellow"]}1 warning was found in the class reference XML. Please check the messages above.{STYLES["reset"]}'
)
- if state.num_errors == 0:
- print(f'{STYLES["green"]}No errors found in the class reference XML.{STYLES["reset"]}')
+ if state.num_errors >= 2:
+ print(
+ f'{STYLES["red"]}{state.num_errors} errors were found in the class reference XML. Please check the messages above.{STYLES["reset"]}'
+ )
+ elif state.num_errors == 1:
+ print(
+ f'{STYLES["red"]}1 error was found in the class reference XML. Please check the messages above.{STYLES["reset"]}'
+ )
+
+ if state.num_warnings == 0 and state.num_errors == 0:
+ print(f'{STYLES["green"]}No warnings or errors found in the class reference XML.{STYLES["reset"]}')
if not args.dry_run:
print(f"Wrote reStructuredText files for each class to: {args.output}")
else:
- if state.num_errors >= 2:
- print(
- f'{STYLES["red"]}{state.num_errors} errors were found in the class reference XML. Please check the messages above.{STYLES["reset"]}'
- )
- else:
- print(
- f'{STYLES["red"]}1 error was found in the class reference XML. Please check the messages above.{STYLES["reset"]}'
- )
exit(1)
@@ -1562,8 +1574,20 @@ def make_rst_index(grouped_classes: Dict[str, List[str]], dry_run: bool, output_
RESERVED_FORMATTING_TAGS = ["i", "b", "u", "code", "kbd", "center", "url", "br"]
-RESERVED_CODEBLOCK_TAGS = ["codeblocks", "codeblock", "gdscript", "csharp"]
-RESERVED_CROSSLINK_TAGS = ["method", "member", "signal", "constant", "enum", "annotation", "theme_item", "param"]
+RESERVED_LAYOUT_TAGS = ["codeblocks"]
+RESERVED_CODEBLOCK_TAGS = ["codeblock", "gdscript", "csharp"]
+RESERVED_CROSSLINK_TAGS = [
+ "method",
+ "constructor",
+ "operator",
+ "member",
+ "signal",
+ "constant",
+ "enum",
+ "annotation",
+ "theme_item",
+ "param",
+]
def is_in_tagset(tag_text: str, tagset: List[str]) -> bool:
@@ -1581,6 +1605,35 @@ def is_in_tagset(tag_text: str, tagset: List[str]) -> bool:
return False
+def get_tag_and_args(tag_text: str) -> TagState:
+ tag_name = tag_text
+ arguments: List[str] = []
+
+ assign_pos = tag_text.find("=")
+ if assign_pos >= 0:
+ tag_name = tag_text[:assign_pos]
+ arguments = [tag_text[assign_pos + 1 :].strip()]
+ else:
+ space_pos = tag_text.find(" ")
+ if space_pos >= 0:
+ tag_name = tag_text[:space_pos]
+ arguments = [tag_text[space_pos + 1 :].strip()]
+
+ closing = False
+ if tag_name.startswith("/"):
+ tag_name = tag_name[1:]
+ closing = True
+
+ return TagState(tag_text, tag_name, arguments, closing)
+
+
+def parse_link_target(link_target: str, state: State, context_name: str) -> List[str]:
+ if link_target.find(".") != -1:
+ return link_target.split(".")
+ else:
+ return [state.current_class, link_target]
+
+
def format_text_block(
text: str,
context: Union[DefinitionBase, None],
@@ -1603,11 +1656,15 @@ def format_text_block(
# Handle codeblocks
if (
post_text.startswith("[codeblock]")
+ or post_text.startswith("[codeblock ")
or post_text.startswith("[gdscript]")
+ or post_text.startswith("[gdscript ")
or post_text.startswith("[csharp]")
+ or post_text.startswith("[csharp ")
):
- block_type = post_text[1:].split("]")[0]
- result = format_codeblock(block_type, post_text, indent_level, state)
+ tag_text = post_text[1:].split("]", 1)[0]
+ tag_state = get_tag_and_args(tag_text)
+ result = format_codeblock(tag_state, post_text, indent_level, state)
if result is None:
return ""
text = f"{pre_text}{result[0]}"
@@ -1627,6 +1684,8 @@ def format_text_block(
inside_code = False
inside_code_tag = ""
inside_code_tabs = False
+ ignore_code_warnings = False
+
pos = 0
tag_depth = 0
while True:
@@ -1657,33 +1716,34 @@ def format_text_block(
# Tag is a cross-reference or a formatting directive.
else:
- cmd = tag_text
- space_pos = tag_text.find(" ")
+ tag_state = get_tag_and_args(tag_text)
# Anything identified as a tag inside of a code block is valid,
# unless it's a matching closing tag.
if inside_code:
# Exiting codeblocks and inline code tags.
- if inside_code_tag == cmd[1:]:
- if cmd == "/codeblock" or cmd == "/gdscript" or cmd == "/csharp":
+ if tag_state.closing and tag_state.name == inside_code_tag:
+ if is_in_tagset(tag_state.name, RESERVED_CODEBLOCK_TAGS):
tag_text = ""
tag_depth -= 1
inside_code = False
+ ignore_code_warnings = False
# Strip newline if the tag was alone on one
if pre_text[-1] == "\n":
pre_text = pre_text[:-1]
- elif cmd == "/code":
+ elif is_in_tagset(tag_state.name, ["code"]):
tag_text = "``"
tag_depth -= 1
inside_code = False
+ ignore_code_warnings = False
escape_post = True
else:
- if cmd.startswith("/"):
+ if not ignore_code_warnings and tag_state.closing:
print_warning(
- f'{state.current_class}.xml: Potential error inside of a code tag, found a string that looks like a closing tag "[{cmd}]" in {context_name}.',
+ f'{state.current_class}.xml: Found a code string that looks like a closing tag "[{tag_state.raw}]" in {context_name}.',
state,
)
@@ -1691,26 +1751,27 @@ def format_text_block(
# Entering codeblocks and inline code tags.
- elif cmd == "codeblocks":
- tag_depth += 1
- tag_text = "\n.. tabs::"
- inside_code_tabs = True
- elif cmd == "/codeblocks":
- tag_depth -= 1
- tag_text = ""
- inside_code_tabs = False
+ elif tag_state.name == "codeblocks":
+ if tag_state.closing:
+ tag_depth -= 1
+ tag_text = ""
+ inside_code_tabs = False
+ else:
+ tag_depth += 1
+ tag_text = "\n.. tabs::"
+ inside_code_tabs = True
- elif cmd == "codeblock" or cmd == "gdscript" or cmd == "csharp":
+ elif is_in_tagset(tag_state.name, RESERVED_CODEBLOCK_TAGS):
tag_depth += 1
- if cmd == "gdscript":
+ if tag_state.name == "gdscript":
if not inside_code_tabs:
print_error(
f"{state.current_class}.xml: GDScript code block is used outside of [codeblocks] in {context_name}.",
state,
)
tag_text = "\n .. code-tab:: gdscript\n"
- elif cmd == "csharp":
+ elif tag_state.name == "csharp":
if not inside_code_tabs:
print_error(
f"{state.current_class}.xml: C# code block is used outside of [codeblocks] in {context_name}.",
@@ -1721,17 +1782,19 @@ def format_text_block(
tag_text = "\n::\n"
inside_code = True
- inside_code_tag = cmd
+ inside_code_tag = tag_state.name
+ ignore_code_warnings = "skip-lint" in tag_state.arguments
- elif cmd == "code":
+ elif is_in_tagset(tag_state.name, ["code"]):
tag_text = "``"
tag_depth += 1
+
inside_code = True
- inside_code_tag = cmd
+ inside_code_tag = "code"
+ ignore_code_warnings = "skip-lint" in tag_state.arguments
escape_pre = True
- valid_context = isinstance(context, (MethodDef, SignalDef, AnnotationDef))
- if valid_context:
+ if not ignore_code_warnings:
endcode_pos = text.find("[/code]", endq_pos + 1)
if endcode_pos == -1:
print_error(
@@ -1741,110 +1804,173 @@ def format_text_block(
break
inside_code_text = text[endq_pos + 1 : endcode_pos]
- context_params: List[ParameterDef] = context.parameters # type: ignore
- for param_def in context_params:
- if param_def.name == inside_code_text:
+ if inside_code_text.endswith("()"):
+ # It's formatted like a call for some reason, may still be a mistake.
+ inside_code_text = inside_code_text[:-2]
+
+ if inside_code_text in state.classes:
+ print_warning(
+ f'{state.current_class}.xml: Found a code string "{inside_code_text}" that matches one of the known classes in {context_name}.',
+ state,
+ )
+
+ target_class_name, target_name, *rest = parse_link_target(inside_code_text, state, context_name)
+ if len(rest) == 0 and target_class_name in state.classes:
+ class_def = state.classes[target_class_name]
+
+ if target_name in class_def.methods:
print_warning(
- f'{state.current_class}.xml: Potential error inside of a code tag, found a string "{inside_code_text}" that matches one of the parameters in {context_name}.',
+ f'{state.current_class}.xml: Found a code string "{inside_code_text}" that matches the {target_class_name}.{target_name} method in {context_name}.',
state,
)
- break
+
+ elif target_name in class_def.constructors:
+ print_warning(
+ f'{state.current_class}.xml: Found a code string "{inside_code_text}" that matches the {target_class_name}.{target_name} constructor in {context_name}.',
+ state,
+ )
+
+ elif target_name in class_def.operators:
+ print_warning(
+ f'{state.current_class}.xml: Found a code string "{inside_code_text}" that matches the {target_class_name}.{target_name} operator in {context_name}.',
+ state,
+ )
+
+ elif target_name in class_def.properties:
+ print_warning(
+ f'{state.current_class}.xml: Found a code string "{inside_code_text}" that matches the {target_class_name}.{target_name} member in {context_name}.',
+ state,
+ )
+
+ elif target_name in class_def.signals:
+ print_warning(
+ f'{state.current_class}.xml: Found a code string "{inside_code_text}" that matches the {target_class_name}.{target_name} signal in {context_name}.',
+ state,
+ )
+
+ elif target_name in class_def.annotations:
+ print_warning(
+ f'{state.current_class}.xml: Found a code string "{inside_code_text}" that matches the {target_class_name}.{target_name} annotation in {context_name}.',
+ state,
+ )
+
+ elif target_name in class_def.theme_items:
+ print_warning(
+ f'{state.current_class}.xml: Found a code string "{inside_code_text}" that matches the {target_class_name}.{target_name} theme item in {context_name}.',
+ state,
+ )
+
+ elif target_name in class_def.constants:
+ print_warning(
+ f'{state.current_class}.xml: Found a code string "{inside_code_text}" that matches the {target_class_name}.{target_name} constant in {context_name}.',
+ state,
+ )
+
+ else:
+ for enum in class_def.enums.values():
+ if target_name in enum.values:
+ print_warning(
+ f'{state.current_class}.xml: Found a code string "{inside_code_text}" that matches the {target_class_name}.{target_name} enum value in {context_name}.',
+ state,
+ )
+ break
+
+ valid_param_context = isinstance(context, (MethodDef, SignalDef, AnnotationDef))
+ if valid_param_context:
+ context_params: List[ParameterDef] = context.parameters # type: ignore
+ for param_def in context_params:
+ if param_def.name == inside_code_text:
+ print_warning(
+ f'{state.current_class}.xml: Found a code string "{inside_code_text}" that matches one of the parameters in {context_name}.',
+ state,
+ )
+ break
# Cross-references to items in this or other class documentation pages.
- elif is_in_tagset(cmd, RESERVED_CROSSLINK_TAGS):
- link_type: str = ""
- link_target: str = ""
- if space_pos >= 0:
- link_type = tag_text[:space_pos]
- link_target = tag_text[space_pos + 1 :].strip()
+ elif is_in_tagset(tag_state.name, RESERVED_CROSSLINK_TAGS):
+ link_target: str = tag_state.arguments[0] if len(tag_state.arguments) > 0 else ""
if link_target == "":
print_error(
- f'{state.current_class}.xml: Empty cross-reference link "{cmd}" in {context_name}.',
+ f'{state.current_class}.xml: Empty cross-reference link "[{tag_state.raw}]" in {context_name}.',
state,
)
tag_text = ""
else:
if (
- cmd.startswith("method")
- or cmd.startswith("constructor")
- or cmd.startswith("operator")
- or cmd.startswith("member")
- or cmd.startswith("signal")
- or cmd.startswith("annotation")
- or cmd.startswith("theme_item")
- or cmd.startswith("constant")
+ tag_state.name == "method"
+ or tag_state.name == "constructor"
+ or tag_state.name == "operator"
+ or tag_state.name == "member"
+ or tag_state.name == "signal"
+ or tag_state.name == "annotation"
+ or tag_state.name == "theme_item"
+ or tag_state.name == "constant"
):
- if link_target.find(".") != -1:
- ss = link_target.split(".")
- if len(ss) > 2:
- print_error(
- f'{state.current_class}.xml: Bad reference "{link_target}" in {context_name}.',
- state,
- )
- class_param, method_param = ss
-
- else:
- class_param = state.current_class
- method_param = link_target
+ target_class_name, target_name, *rest = parse_link_target(link_target, state, context_name)
+ if len(rest) > 0:
+ print_error(
+ f'{state.current_class}.xml: Bad reference "{link_target}" in {context_name}.',
+ state,
+ )
# Default to the tag command name. This works by default for most tags,
# but member and theme_item have special cases.
- ref_type = "_{}".format(link_type)
- if link_type == "member":
+ ref_type = "_{}".format(tag_state.name)
+ if tag_state.name == "member":
ref_type = "_property"
- if class_param in state.classes:
- class_def = state.classes[class_param]
+ if target_class_name in state.classes:
+ class_def = state.classes[target_class_name]
- if cmd.startswith("method") and method_param not in class_def.methods:
+ if tag_state.name == "method" and target_name not in class_def.methods:
print_error(
f'{state.current_class}.xml: Unresolved method reference "{link_target}" in {context_name}.',
state,
)
- elif cmd.startswith("constructor") and method_param not in class_def.constructors:
+ elif tag_state.name == "constructor" and target_name not in class_def.constructors:
print_error(
f'{state.current_class}.xml: Unresolved constructor reference "{link_target}" in {context_name}.',
state,
)
- elif cmd.startswith("operator") and method_param not in class_def.operators:
+ elif tag_state.name == "operator" and target_name not in class_def.operators:
print_error(
f'{state.current_class}.xml: Unresolved operator reference "{link_target}" in {context_name}.',
state,
)
- elif cmd.startswith("member") and method_param not in class_def.properties:
+ elif tag_state.name == "member" and target_name not in class_def.properties:
print_error(
f'{state.current_class}.xml: Unresolved member reference "{link_target}" in {context_name}.',
state,
)
- elif cmd.startswith("signal") and method_param not in class_def.signals:
+ elif tag_state.name == "signal" and target_name not in class_def.signals:
print_error(
f'{state.current_class}.xml: Unresolved signal reference "{link_target}" in {context_name}.',
state,
)
- elif cmd.startswith("annotation") and method_param not in class_def.annotations:
+ elif tag_state.name == "annotation" and target_name not in class_def.annotations:
print_error(
f'{state.current_class}.xml: Unresolved annotation reference "{link_target}" in {context_name}.',
state,
)
- elif cmd.startswith("theme_item"):
- if method_param not in class_def.theme_items:
+ elif tag_state.name == "theme_item":
+ if target_name not in class_def.theme_items:
print_error(
f'{state.current_class}.xml: Unresolved theme item reference "{link_target}" in {context_name}.',
state,
)
else:
# Needs theme data type to be properly linked, which we cannot get without a class.
- name = class_def.theme_items[method_param].data_name
+ name = class_def.theme_items[target_name].data_name
ref_type = f"_theme_{name}"
- elif cmd.startswith("constant"):
+ elif tag_state.name == "constant":
found = False
# Search in the current class
@@ -1855,14 +1981,14 @@ def format_text_block(
search_class_defs.append(state.classes["@GlobalScope"])
for search_class_def in search_class_defs:
- if method_param in search_class_def.constants:
- class_param = search_class_def.name
+ if target_name in search_class_def.constants:
+ target_class_name = search_class_def.name
found = True
else:
for enum in search_class_def.enums.values():
- if method_param in enum.values:
- class_param = search_class_def.name
+ if target_name in enum.values:
+ target_class_name = search_class_def.name
found = True
break
@@ -1874,25 +2000,25 @@ def format_text_block(
else:
print_error(
- f'{state.current_class}.xml: Unresolved type reference "{class_param}" in method reference "{link_target}" in {context_name}.',
+ f'{state.current_class}.xml: Unresolved type reference "{target_class_name}" in method reference "{link_target}" in {context_name}.',
state,
)
- repl_text = method_param
- if class_param != state.current_class:
- repl_text = f"{class_param}.{method_param}"
- tag_text = f":ref:`{repl_text}`"
+ repl_text = target_name
+ if target_class_name != state.current_class:
+ repl_text = f"{target_class_name}.{target_name}"
+ tag_text = f":ref:`{repl_text}`"
escape_pre = True
escape_post = True
- elif cmd.startswith("enum"):
+ elif tag_state.name == "enum":
tag_text = make_enum(link_target, False, state)
escape_pre = True
escape_post = True
- elif cmd.startswith("param"):
- valid_context = isinstance(context, (MethodDef, SignalDef, AnnotationDef))
- if not valid_context:
+ elif tag_state.name == "param":
+ valid_param_context = isinstance(context, (MethodDef, SignalDef, AnnotationDef))
+ if not valid_param_context:
print_error(
f'{state.current_class}.xml: Argument reference "{link_target}" used outside of method, signal, or annotation context in {context_name}.',
state,
@@ -1916,11 +2042,17 @@ def format_text_block(
# Formatting directives.
- elif is_in_tagset(cmd, ["url"]):
- if cmd.startswith("url="):
- # URLs are handled in full here as we need to extract the optional link
- # title to use `make_link`.
- link_url = cmd[4:]
+ elif is_in_tagset(tag_state.name, ["url"]):
+ url_target = tag_state.arguments[0] if len(tag_state.arguments) > 0 else ""
+
+ if url_target == "":
+ print_error(
+ f'{state.current_class}.xml: Misformatted [url] tag "[{tag_state.raw}]" in {context_name}.',
+ state,
+ )
+ else:
+ # Unlike other tags, URLs are handled in full here, as we need to extract
+ # the optional link title to use `make_link`.
endurl_pos = text.find("[/url]", endq_pos + 1)
if endurl_pos == -1:
print_error(
@@ -1929,7 +2061,7 @@ def format_text_block(
)
break
link_title = text[endq_pos + 1 : endurl_pos]
- tag_text = make_link(link_url, link_title)
+ tag_text = make_link(url_target, link_title)
pre_text = text[:pos]
post_text = text[endurl_pos + 6 :]
@@ -1942,28 +2074,23 @@ def format_text_block(
text = pre_text + tag_text + post_text
pos = len(pre_text) + len(tag_text)
continue
- else:
- print_error(
- f'{state.current_class}.xml: Misformatted [url] tag "{cmd}" in {context_name}.',
- state,
- )
- elif cmd == "br":
+ elif tag_state.name == "br":
# Make a new paragraph instead of a linebreak, rst is not so linebreak friendly
tag_text = "\n\n"
# Strip potential leading spaces
while post_text[0] == " ":
post_text = post_text[1:]
- elif cmd == "center" or cmd == "/center":
- if cmd == "/center":
+ elif tag_state.name == "center":
+ if tag_state.closing:
tag_depth -= 1
else:
tag_depth += 1
tag_text = ""
- elif cmd == "i" or cmd == "/i":
- if cmd == "/i":
+ elif tag_state.name == "i":
+ if tag_state.closing:
tag_depth -= 1
escape_post = True
else:
@@ -1971,8 +2098,8 @@ def format_text_block(
escape_pre = True
tag_text = "*"
- elif cmd == "b" or cmd == "/b":
- if cmd == "/b":
+ elif tag_state.name == "b":
+ if tag_state.closing:
tag_depth -= 1
escape_post = True
else:
@@ -1980,8 +2107,8 @@ def format_text_block(
escape_pre = True
tag_text = "**"
- elif cmd == "u" or cmd == "/u":
- if cmd == "/u":
+ elif tag_state.name == "u":
+ if tag_state.closing:
tag_depth -= 1
escape_post = True
else:
@@ -1989,9 +2116,9 @@ def format_text_block(
escape_pre = True
tag_text = ""
- elif cmd == "kbd" or cmd == "/kbd":
+ elif tag_state.name == "kbd":
tag_text = "`"
- if cmd == "/kbd":
+ if tag_state.closing:
tag_depth -= 1
escape_post = True
else:
@@ -1999,18 +2126,24 @@ def format_text_block(
tag_depth += 1
escape_pre = True
- # Invalid syntax checks.
- elif cmd.startswith("/"):
- print_error(f'{state.current_class}.xml: Unrecognized closing tag "{cmd}" in {context_name}.', state)
-
- tag_text = f"[{tag_text}]"
-
+ # Invalid syntax.
else:
- print_error(f'{state.current_class}.xml: Unrecognized opening tag "{cmd}" in {context_name}.', state)
+ if tag_state.closing:
+ print_error(
+ f'{state.current_class}.xml: Unrecognized closing tag "[{tag_state.raw}]" in {context_name}.',
+ state,
+ )
- tag_text = f"``{tag_text}``"
- escape_pre = True
- escape_post = True
+ tag_text = f"[{tag_text}]"
+ else:
+ print_error(
+ f'{state.current_class}.xml: Unrecognized opening tag "[{tag_state.raw}]" in {context_name}.',
+ state,
+ )
+
+ tag_text = f"``{tag_text}``"
+ escape_pre = True
+ escape_post = True
# Properly escape things like `[Node]s`
if escape_pre and pre_text and pre_text[-1] not in MARKUP_ALLOWED_PRECEDENT:
@@ -2092,13 +2225,22 @@ def escape_rst(text: str, until_pos: int = -1) -> str:
return text
-def format_codeblock(code_type: str, post_text: str, indent_level: int, state: State) -> Union[Tuple[str, int], None]:
- end_pos = post_text.find("[/" + code_type + "]")
+def format_codeblock(
+ tag_state: TagState, post_text: str, indent_level: int, state: State
+) -> Union[Tuple[str, int], None]:
+ end_pos = post_text.find("[/" + tag_state.name + "]")
if end_pos == -1:
- print_error(f"{state.current_class}.xml: [{code_type}] without a closing tag.", state)
+ print_error(
+ f"{state.current_class}.xml: Tag depth mismatch for [{tag_state.name}]: no closing [/{tag_state.name}].",
+ state,
+ )
return None
- code_text = post_text[len(f"[{code_type}]") : end_pos]
+ opening_formatted = tag_state.name
+ if len(tag_state.arguments) > 0:
+ opening_formatted += " " + " ".join(tag_state.arguments)
+
+ code_text = post_text[len(f"[{opening_formatted}]") : end_pos]
post_text = post_text[end_pos:]
# Remove extraneous tabs
@@ -2114,7 +2256,7 @@ def format_codeblock(code_type: str, post_text: str, indent_level: int, state: S
if to_skip > indent_level:
print_error(
- f"{state.current_class}.xml: Four spaces should be used for indentation within [{code_type}].",
+ f"{state.current_class}.xml: Four spaces should be used for indentation within [{tag_state.name}].",
state,
)
@@ -2124,7 +2266,7 @@ def format_codeblock(code_type: str, post_text: str, indent_level: int, state: S
else:
code_text = f"{code_text[:code_pos]}\n {code_text[code_pos + to_skip + 1 :]}"
code_pos += 5 - to_skip
- return (f"\n[{code_type}]{code_text}{post_text}", len(f"\n[{code_type}]{code_text}"))
+ return (f"\n[{opening_formatted}]{code_text}{post_text}", len(f"\n[{opening_formatted}]{code_text}"))
def format_table(f: TextIO, data: List[Tuple[Optional[str], ...]], remove_empty_columns: bool = False) -> None:
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index b3bcb9f0140..98c9c58a5fe 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -216,6 +216,12 @@ void EditorHelp::_class_desc_select(const String &p_select) {
if (tag == "method") {
topic = "class_method";
table = &this->method_line;
+ } else if (tag == "constructor") {
+ topic = "class_method";
+ table = &this->method_line;
+ } else if (tag == "operator") {
+ topic = "class_method";
+ table = &this->method_line;
} else if (tag == "member") {
topic = "class_property";
table = &this->property_line;
@@ -410,8 +416,10 @@ String EditorHelp::_fix_constant(const String &p_constant) const {
class_desc->add_text(" (" + TTR("Experimental") + ")"); \
class_desc->pop();
-void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview) {
- method_line[p_method.name] = class_desc->get_paragraph_count() - 2; // Gets overridden if description
+void EditorHelp::_add_method(const DocData::MethodDoc &p_method, bool p_overview, bool p_override) {
+ if (p_override) {
+ method_line[p_method.name] = class_desc->get_paragraph_count() - 2; // Gets overridden if description.
+ }
const bool is_vararg = p_method.qualifiers.contains("vararg");
@@ -582,7 +590,7 @@ Error EditorHelp::_goto_desc(const String &p_class) {
return OK;
}
-void EditorHelp::_update_method_list(const Vector p_methods) {
+void EditorHelp::_update_method_list(const Vector p_methods, MethodType p_method_type) {
class_desc->add_newline();
_push_code_font();
@@ -628,7 +636,8 @@ void EditorHelp::_update_method_list(const Vector p_methods)
class_desc->pop(); // cell
}
- _add_method(m[i], true);
+ // For constructors always point to the first one.
+ _add_method(m[i], true, (p_method_type != METHOD_TYPE_CONSTRUCTOR || i == 0));
}
any_previous = !m.is_empty();
@@ -660,7 +669,8 @@ void EditorHelp::_update_method_descriptions(const DocData::ClassDoc p_classdoc,
for (int i = 0; i < methods_filtered.size(); i++) {
_push_code_font();
- _add_method(methods_filtered[i], false);
+ // For constructors always point to the first one.
+ _add_method(methods_filtered[i], false, (p_method_type != METHOD_TYPE_CONSTRUCTOR || i == 0));
_pop_code_font();
class_desc->add_newline();
@@ -1151,7 +1161,7 @@ void EditorHelp::_update_doc() {
class_desc->add_text(TTR("Constructors"));
_pop_title_font();
- _update_method_list(cd.constructors);
+ _update_method_list(cd.constructors, METHOD_TYPE_CONSTRUCTOR);
}
if (!methods.is_empty()) {
@@ -1164,7 +1174,7 @@ void EditorHelp::_update_doc() {
class_desc->add_text(TTR("Methods"));
_pop_title_font();
- _update_method_list(methods);
+ _update_method_list(methods, METHOD_TYPE_METHOD);
}
if (!cd.operators.is_empty()) {
@@ -1177,7 +1187,7 @@ void EditorHelp::_update_doc() {
class_desc->add_text(TTR("Operators"));
_pop_title_font();
- _update_method_list(cd.operators);
+ _update_method_list(cd.operators, METHOD_TYPE_OPERATOR);
}
// Theme properties
@@ -1991,10 +2001,10 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
// Select the correct code examples.
switch ((int)EDITOR_GET("text_editor/help/class_reference_examples")) {
case 0: // GDScript
- bbcode = bbcode.replace("[gdscript]", "[codeblock]");
+ bbcode = bbcode.replace("[gdscript", "[codeblock"); // Tag can have extra arguments.
bbcode = bbcode.replace("[/gdscript]", "[/codeblock]");
- for (int pos = bbcode.find("[csharp]"); pos != -1; pos = bbcode.find("[csharp]")) {
+ for (int pos = bbcode.find("[csharp"); pos != -1; pos = bbcode.find("[csharp")) {
int end_pos = bbcode.find("[/csharp]");
if (end_pos == -1) {
WARN_PRINT("Unclosed [csharp] block or parse fail in code (search for tag errors)");
@@ -2008,10 +2018,10 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
}
break;
case 1: // C#
- bbcode = bbcode.replace("[csharp]", "[codeblock]");
+ bbcode = bbcode.replace("[csharp", "[codeblock"); // Tag can have extra arguments.
bbcode = bbcode.replace("[/csharp]", "[/codeblock]");
- for (int pos = bbcode.find("[gdscript]"); pos != -1; pos = bbcode.find("[gdscript]")) {
+ for (int pos = bbcode.find("[gdscript"); pos != -1; pos = bbcode.find("[gdscript")) {
int end_pos = bbcode.find("[/gdscript]");
if (end_pos == -1) {
WARN_PRINT("Unclosed [gdscript] block or parse fail in code (search for tag errors)");
@@ -2025,8 +2035,8 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
}
break;
case 2: // GDScript and C#
- bbcode = bbcode.replace("[csharp]", "[b]C#:[/b]\n[codeblock]");
- bbcode = bbcode.replace("[gdscript]", "[b]GDScript:[/b]\n[codeblock]");
+ bbcode = bbcode.replace("[csharp", "[b]C#:[/b]\n[codeblock"); // Tag can have extra arguments.
+ bbcode = bbcode.replace("[gdscript", "[b]GDScript:[/b]\n[codeblock"); // Tag can have extra arguments.
bbcode = bbcode.replace("[/csharp]", "[/codeblock]");
bbcode = bbcode.replace("[/gdscript]", "[/codeblock]");
@@ -2041,6 +2051,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
// Remove extra new lines around code blocks.
bbcode = bbcode.replace("[codeblock]\n", "[codeblock]");
+ bbcode = bbcode.replace("[codeblock skip-lint]\n", "[codeblock skip-lint]"); // Extra argument to silence validation warnings.
bbcode = bbcode.replace("\n[/codeblock]", "[/codeblock]");
List tag_stack;
@@ -2114,7 +2125,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
p_rt->add_text("[");
pos = brk_pos + 1;
- } else if (tag.begins_with("method ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("annotation ") || tag.begins_with("theme_item ")) {
+ } else if (tag.begins_with("method ") || tag.begins_with("constructor ") || tag.begins_with("operator ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("annotation ") || tag.begins_with("theme_item ")) {
const int tag_end = tag.find(" ");
const String link_tag = tag.substr(0, tag_end);
const String link_target = tag.substr(tag_end + 1, tag.length()).lstrip(" ");
@@ -2125,7 +2136,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
p_rt->push_font_size(doc_code_font_size);
Color target_color = link_color;
- if (link_tag == "method") {
+ if (link_tag == "method" || link_tag == "constructor" || link_tag == "operator") {
target_color = link_method_color;
} else if (link_tag == "member" || link_tag == "signal" || link_tag == "theme property") {
target_color = link_property_color;
@@ -2196,7 +2207,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
pos = brk_end + 1;
tag_stack.push_front(tag);
- } else if (tag == "code") {
+ } else if (tag == "code" || tag.begins_with("code ")) {
// Use monospace font with darkened background color to make code easier to distinguish from other text.
p_rt->push_font(doc_code_font);
p_rt->push_font_size(doc_code_font_size);
@@ -2205,8 +2216,8 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
code_tag = true;
pos = brk_end + 1;
- tag_stack.push_front(tag);
- } else if (tag == "codeblock") {
+ tag_stack.push_front("code");
+ } else if (tag == "codeblock" || tag.begins_with("codeblock ")) {
// Use monospace font with darkened background color to make code easier to distinguish from other text.
// Use a single-column table with cell row background color instead of `[bgcolor]`.
// This makes the background color highlight cover the entire block, rather than individual lines.
@@ -2221,7 +2232,7 @@ static void _add_text_to_rt(const String &p_bbcode, RichTextLabel *p_rt, Control
codeblock_tag = true;
pos = brk_end + 1;
- tag_stack.push_front(tag);
+ tag_stack.push_front("codeblock");
} else if (tag == "kbd") {
// Use keyboard font with custom color and background color.
p_rt->push_font(doc_kbd_font);
diff --git a/editor/editor_help.h b/editor/editor_help.h
index 1f1528945b4..38246254368 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -157,7 +157,7 @@ class EditorHelp : public VBoxContainer {
//void _button_pressed(int p_idx);
void _add_type(const String &p_type, const String &p_enum = String(), bool p_is_bitfield = false);
void _add_type_icon(const String &p_type, int p_size = 0, const String &p_fallback = "");
- void _add_method(const DocData::MethodDoc &p_method, bool p_overview = true);
+ void _add_method(const DocData::MethodDoc &p_method, bool p_overview, bool p_override = true);
void _add_bulletpoint();
@@ -177,7 +177,7 @@ class EditorHelp : public VBoxContainer {
Error _goto_desc(const String &p_class);
//void _update_history_buttons();
- void _update_method_list(const Vector p_methods);
+ void _update_method_list(const Vector p_methods, MethodType p_method_type);
void _update_method_descriptions(const DocData::ClassDoc p_classdoc, const Vector p_methods, MethodType p_method_type);
void _update_doc();
diff --git a/modules/gdscript/doc_classes/@GDScript.xml b/modules/gdscript/doc_classes/@GDScript.xml
index 806ab1e3df7..4fec745999c 100644
--- a/modules/gdscript/doc_classes/@GDScript.xml
+++ b/modules/gdscript/doc_classes/@GDScript.xml
@@ -601,8 +601,8 @@
@icon("res://path/to/class/icon.svg")
[/codeblock]
[b]Note:[/b] Only the script can have a custom icon. Inner classes are not supported.
- [b]Note:[/b] As annotations describe their subject, the [code]@icon[/code] annotation must be placed before the class definition and inheritance.
- [b]Note:[/b] Unlike other annotations, the argument of the [code]@icon[/code] annotation must be a string literal (constant expressions are not supported).
+ [b]Note:[/b] As annotations describe their subject, the [annotation @icon] annotation must be placed before the class definition and inheritance.
+ [b]Note:[/b] Unlike other annotations, the argument of the [annotation @icon] annotation must be a string literal (constant expressions are not supported).
@@ -653,7 +653,7 @@
@tool
extends Node
[/codeblock]
- [b]Note:[/b] As annotations describe their subject, the [code]@tool[/code] annotation must be placed before the class definition and inheritance.
+ [b]Note:[/b] As annotations describe their subject, the [annotation @tool] annotation must be placed before the class definition and inheritance.
diff --git a/modules/mono/editor/bindings_generator.cpp b/modules/mono/editor/bindings_generator.cpp
index ccfcf2a87c8..36fdda46255 100644
--- a/modules/mono/editor/bindings_generator.cpp
+++ b/modules/mono/editor/bindings_generator.cpp
@@ -264,7 +264,7 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
} else if (code_tag) {
xml_output.append("[");
pos = brk_pos + 1;
- } else if (tag.begins_with("method ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ") || tag.begins_with("param ")) {
+ } else if (tag.begins_with("method ") || tag.begins_with("constructor ") || tag.begins_with("operator ") || tag.begins_with("member ") || tag.begins_with("signal ") || tag.begins_with("enum ") || tag.begins_with("constant ") || tag.begins_with("theme_item ") || tag.begins_with("param ")) {
const int tag_end = tag.find(" ");
const String link_tag = tag.substr(0, tag_end);
const String link_target = tag.substr(tag_end + 1, tag.length()).lstrip(" ");
@@ -298,6 +298,12 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
if (link_tag == "method") {
_append_xml_method(xml_output, target_itype, target_cname, link_target, link_target_parts);
+ } else if (link_tag == "constructor") {
+ // TODO: Support constructors?
+ _append_xml_undeclared(xml_output, link_target);
+ } else if (link_tag == "operator") {
+ // TODO: Support operators?
+ _append_xml_undeclared(xml_output, link_target);
} else if (link_tag == "member") {
_append_xml_member(xml_output, target_itype, target_cname, link_target, link_target_parts);
} else if (link_tag == "signal") {
@@ -401,29 +407,29 @@ String BindingsGenerator::bbcode_to_xml(const String &p_bbcode, const TypeInterf
pos = brk_end + 1;
tag_stack.push_front(tag);
- } else if (tag == "code") {
+ } else if (tag == "code" || tag.begins_with("code ")) {
xml_output.append("");
code_tag = true;
pos = brk_end + 1;
- tag_stack.push_front(tag);
- } else if (tag == "codeblock") {
+ tag_stack.push_front("code");
+ } else if (tag == "codeblock" || tag.begins_with("codeblock ")) {
xml_output.append("");
code_tag = true;
pos = brk_end + 1;
- tag_stack.push_front(tag);
+ tag_stack.push_front("codeblock");
} else if (tag == "codeblocks") {
line_del = true;
pos = brk_end + 1;
tag_stack.push_front(tag);
- } else if (tag == "csharp") {
+ } else if (tag == "csharp" || tag.begins_with("csharp ")) {
xml_output.append("");
line_del = false;
code_tag = true;
pos = brk_end + 1;
- tag_stack.push_front(tag);
+ tag_stack.push_front("csharp");
} else if (tag == "kbd") {
// keyboard combinations are not supported in xml comments
pos = brk_end + 1;
diff --git a/platform/macos/doc_classes/EditorExportPlatformMacOS.xml b/platform/macos/doc_classes/EditorExportPlatformMacOS.xml
index 99187fe60e6..85fefe65c09 100644
--- a/platform/macos/doc_classes/EditorExportPlatformMacOS.xml
+++ b/platform/macos/doc_classes/EditorExportPlatformMacOS.xml
@@ -66,7 +66,7 @@
Array of the additional command line arguments passed to the code signing tool.
- Enable to allow access to contacts in the user's address book, if it's enabled you should also provide usage message in the [code]privacy/address_book_usage_description[/code] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_personal-information_addressbook]com.apple.security.personal-information.addressbook[/url].
+ Enable to allow access to contacts in the user's address book, if it's enabled you should also provide usage message in the [member privacy/address_book_usage_description] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_personal-information_addressbook]com.apple.security.personal-information.addressbook[/url].
Allows app to use dynamic linker environment variables to inject code. If you are using add-ons with dynamic or self-modifying native code, enable them according to the add-on documentation. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_allow-dyld-environment-variables]com.apple.security.cs.allow-dyld-environment-variables[/url].
@@ -115,13 +115,13 @@
Enable to allow app to send Apple events to other apps. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_automation_apple-events]com.apple.security.automation.apple-events[/url].
- Enable if you need to use the microphone or other audio input sources, if it's enabled you should also provide usage message in the [code]privacy/microphone_usage_description[/code] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_device_audio-input]com.apple.security.device.audio-input[/url].
+ Enable if you need to use the microphone or other audio input sources, if it's enabled you should also provide usage message in the [member privacy/microphone_usage_description] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_device_audio-input]com.apple.security.device.audio-input[/url].
- Enable to allow access to the user's calendar, if it's enabled you should also provide usage message in the [code]privacy/calendar_usage_description[/code] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_personal-information_calendars]com.apple.security.personal-information.calendars[/url].
+ Enable to allow access to the user's calendar, if it's enabled you should also provide usage message in the [member privacy/calendar_usage_description] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_personal-information_calendars]com.apple.security.personal-information.calendars[/url].
- Enable if you need to use the camera, if it's enabled you should also provide usage message in the [code]privacy/camera_usage_description[/code] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_device_camera]com.apple.security.device.camera[/url].
+ Enable if you need to use the camera, if it's enabled you should also provide usage message in the [member privacy/camera_usage_description] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_device_camera]com.apple.security.device.camera[/url].
Custom entitlements [code].plist[/code] file, if specified the rest of entitlements in the export config are ignored.
@@ -133,10 +133,10 @@
Allows app to load arbitrary libraries and frameworks (not signed with the same Team ID as the main executable or by Apple). Enable it if you are using GDExtension add-ons or ad-hoc signing, or want to support user-provided external add-ons. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_cs_disable-library-validation]com.apple.security.cs.disable-library-validation[/url].
- Enable if you need to use location information from Location Services, if it's enabled you should also provide usage message in the [code]privacy/location_usage_description[/code] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_personal-information_location]com.apple.security.personal-information.location[/url].
+ Enable if you need to use location information from Location Services, if it's enabled you should also provide usage message in the [member privacy/location_usage_description] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_personal-information_location]com.apple.security.personal-information.location[/url].
- Enable to allow access to the user's Photos library, if it's enabled you should also provide usage message in the [code]privacy/photos_library_usage_description[/code] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_personal-information_photos-library]com.apple.security.personal-information.photos-library[/url].
+ Enable to allow access to the user's Photos library, if it's enabled you should also provide usage message in the [member privacy/photos_library_usage_description] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_personal-information_photos-library]com.apple.security.personal-information.photos-library[/url].
The "Full Name", "Common Name" or SHA-1 hash of the signing identity used to sign [code].app[/code] bundle.