Merge pull request #82691 from YuriSizov/rst-validate-with-exceptions
Validate `code` tags for class and member references
This commit is contained in:
commit
1e544505be
|
@ -120,7 +120,7 @@
|
|||
<param index="0" name="x" type="float" />
|
||||
<description>
|
||||
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 @@
|
|||
<param index="7" name="post_t" type="float" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="cubic_interpolate_in_time">
|
||||
|
@ -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 @@
|
|||
<param index="1" name="type" type="int" />
|
||||
<description>
|
||||
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
|
||||
|
@ -1521,7 +1521,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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="wrapi">
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
|
@ -45,7 +45,7 @@
|
|||
<param index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_estimate_cost" qualifiers="virtual const">
|
||||
|
@ -54,7 +54,7 @@
|
|||
<param index="1" name="to_id" type="int" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_point">
|
||||
|
@ -204,7 +204,7 @@
|
|||
<method name="get_point_capacity" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_point_connections">
|
||||
|
|
|
@ -35,7 +35,7 @@
|
|||
<param index="1" name="to_id" type="Vector2i" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_estimate_cost" qualifiers="virtual const">
|
||||
|
@ -44,7 +44,7 @@
|
|||
<param index="1" name="to_id" type="Vector2i" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear">
|
||||
|
@ -84,7 +84,7 @@
|
|||
<param index="0" name="from_id" type="Vector2i" />
|
||||
<param index="1" name="to_id" type="Vector2i" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -79,7 +79,7 @@
|
|||
The [AudioStream] object to be played.
|
||||
</member>
|
||||
<member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false">
|
||||
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].
|
||||
</member>
|
||||
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
|
||||
Volume of sound, in dB.
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
The [AudioStream] object to be played.
|
||||
</member>
|
||||
<member name="stream_paused" type="bool" setter="set_stream_paused" getter="get_stream_paused" default="false">
|
||||
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].
|
||||
</member>
|
||||
<member name="volume_db" type="float" setter="set_volume_db" getter="get_volume_db" default="0.0">
|
||||
Base volume before attenuation.
|
||||
|
|
|
@ -184,11 +184,11 @@
|
|||
</member>
|
||||
<member name="distance_fade_max_distance" type="float" setter="set_distance_fade_max_distance" getter="get_distance_fade_max_distance" default="10.0">
|
||||
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].
|
||||
</member>
|
||||
<member name="distance_fade_min_distance" type="float" setter="set_distance_fade_min_distance" getter="get_distance_fade_min_distance" default="0.0">
|
||||
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].
|
||||
</member>
|
||||
<member name="distance_fade_mode" type="int" setter="set_distance_fade" getter="get_distance_fade" enum="BaseMaterial3D.DistanceFadeMode" default="0">
|
||||
Specifies which type of fade to use. Can be any of the [enum DistanceFadeMode]s.
|
||||
|
|
|
@ -207,7 +207,7 @@
|
|||
<constants>
|
||||
<constant name="IDENTITY" value="Basis(1, 0, 0, 0, 1, 0, 0, 0, 1)">
|
||||
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#.
|
||||
</constant>
|
||||
<constant name="FLIP_X" value="Basis(-1, 0, 0, 0, 1, 0, 0, 0, 1)">
|
||||
The basis that will flip something along the X axis when used in a transformation.
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
<method name="get_skeleton_rest" qualifiers="const">
|
||||
<return type="Transform2D" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_autocalculate_length_and_angle">
|
||||
|
|
|
@ -140,7 +140,7 @@
|
|||
[StyleBox] used when the [Button] is disabled (for right-to-left layouts).
|
||||
</theme_item>
|
||||
<theme_item name="focus" data_type="style" type="StyleBox">
|
||||
[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.
|
||||
</theme_item>
|
||||
<theme_item name="hover" data_type="style" type="StyleBox">
|
||||
[StyleBox] used when the [Button] is being hovered.
|
||||
|
|
|
@ -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.
|
||||
</member>
|
||||
<member name="fov" type="float" setter="set_fov" getter="get_fov" default="75.0">
|
||||
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
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
<return type="float" />
|
||||
<param index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_floor_normal" qualifiers="const">
|
||||
|
@ -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.
|
||||
</member>
|
||||
<member name="up_direction" type="Vector2" setter="set_up_direction" getter="get_up_direction" default="Vector2(0, -1)">
|
||||
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].
|
||||
</member>
|
||||
<member name="velocity" type="Vector2" setter="set_velocity" getter="get_velocity" default="Vector2(0, 0)">
|
||||
Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide].
|
||||
|
|
|
@ -25,7 +25,7 @@
|
|||
<return type="float" />
|
||||
<param index="0" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_floor_normal" qualifiers="const">
|
||||
|
@ -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.
|
||||
</member>
|
||||
<member name="up_direction" type="Vector3" setter="set_up_direction" getter="get_up_direction" default="Vector3(0, 1, 0)">
|
||||
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].
|
||||
</member>
|
||||
<member name="velocity" type="Vector3" setter="set_velocity" getter="get_velocity" default="Vector3(0, 0, 0)">
|
||||
Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide].
|
||||
|
|
|
@ -544,7 +544,7 @@
|
|||
Prefixes to trigger an automatic indent.
|
||||
</member>
|
||||
<member name="indent_size" type="int" setter="set_indent_size" getter="get_indent_size" default="4">
|
||||
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.
|
||||
</member>
|
||||
<member name="indent_use_spaces" type="bool" setter="set_indent_using_spaces" getter="is_indent_using_spaces" default="false">
|
||||
Use spaces instead of tabs for indentation.
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
<param index="1" name="event" type="InputEvent" />
|
||||
<param index="2" name="shape_idx" type="int" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -21,7 +21,7 @@
|
|||
</member>
|
||||
<member name="polygon" type="PackedVector2Array" setter="set_polygon" getter="get_polygon" default="PackedVector2Array()">
|
||||
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.
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
|
@ -1052,7 +1052,7 @@
|
|||
[b]Note:[/b] [Window] styles will have no effect unless the window is embedded.
|
||||
</member>
|
||||
<member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&""">
|
||||
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.
|
||||
|
|
|
@ -117,8 +117,7 @@
|
|||
<param index="0" name="offset" type="float" default="0.0" />
|
||||
<param index="1" name="cubic" type="bool" default="false" />
|
||||
<description>
|
||||
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).
|
||||
</description>
|
||||
</method>
|
||||
|
@ -127,8 +126,7 @@
|
|||
<param index="0" name="offset" type="float" />
|
||||
<param index="1" name="apply_tilt" type="bool" default="false" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
|
@ -138,7 +136,7 @@
|
|||
<param index="1" name="cubic" type="bool" default="false" />
|
||||
<param index="2" name="apply_tilt" type="bool" default="false" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="samplef" qualifiers="const">
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
</tutorials>
|
||||
<members>
|
||||
<member name="damping" type="float" setter="set_damping" getter="get_damping" default="1.0">
|
||||
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.
|
||||
</member>
|
||||
<member name="length" type="float" setter="set_length" getter="get_length" default="50.0">
|
||||
The spring joint's maximum length. The two attached bodies cannot stretch it past this value.
|
||||
|
|
|
@ -120,7 +120,7 @@
|
|||
<description>
|
||||
Displays OS native dialog for selecting files or directories in the file system.
|
||||
Callbacks have the following arguments: [code]bool status, PackedStringArray selected_paths, int selected_filter_index[/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.
|
||||
|
@ -1095,7 +1095,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.
|
||||
|
|
|
@ -228,8 +228,8 @@
|
|||
<param index="0" name="path" type="String" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_ios_framework">
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
<method name="get_vbox">
|
||||
<return type="VBoxContainer" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -234,7 +234,7 @@
|
|||
<param index="2" name="custom_importer" type="String" default="""" />
|
||||
<param index="3" name="generator_parameters" type="Variant" default="null" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
|
@ -339,7 +339,7 @@
|
|||
<return type="void" />
|
||||
<param index="0" name="name" type="String" />
|
||||
<description>
|
||||
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).
|
||||
</description>
|
||||
</method>
|
||||
<method name="set_plugin_enabled">
|
||||
|
|
|
@ -95,7 +95,7 @@
|
|||
<param index="0" name="camera" type="Camera3D" />
|
||||
<param index="1" name="frustum" type="Plane[]" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="_subgizmos_intersect_ray" qualifiers="virtual const">
|
||||
|
|
|
@ -147,7 +147,7 @@
|
|||
<param index="1" name="camera" type="Camera3D" />
|
||||
<param index="2" name="frustum_planes" type="Plane[]" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_subgizmos_intersect_ray" qualifiers="virtual const">
|
||||
|
|
|
@ -36,20 +36,20 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness" default="1.0">
|
||||
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].
|
||||
</member>
|
||||
<member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction">
|
||||
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].
|
||||
</member>
|
||||
<member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast" default="1.0">
|
||||
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].
|
||||
</member>
|
||||
<member name="adjustment_enabled" type="bool" setter="set_adjustment_enabled" getter="is_adjustment_enabled" default="false">
|
||||
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.
|
||||
</member>
|
||||
<member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0">
|
||||
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].
|
||||
</member>
|
||||
<member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" default="Color(0, 0, 0, 1)">
|
||||
The ambient light's [Color]. Only effective if [member ambient_light_sky_contribution] is lower than [code]1.0[/code] (exclusive).
|
||||
|
|
|
@ -341,7 +341,7 @@
|
|||
<param index="0" name="file" type="String" />
|
||||
<param index="1" name="hidden" type="bool" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
|
@ -350,7 +350,7 @@
|
|||
<param index="0" name="file" type="String" />
|
||||
<param index="1" name="ro" type="bool" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -255,7 +255,7 @@
|
|||
<return type="Vector2i[]" />
|
||||
<param index="0" name="cache_index" type="int" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_texture_count" qualifiers="const">
|
||||
|
|
|
@ -70,7 +70,7 @@
|
|||
</member>
|
||||
<member name="variation_opentype" type="Dictionary" setter="set_variation_opentype" getter="get_variation_opentype" default="{}">
|
||||
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].
|
||||
</member>
|
||||
<member name="variation_transform" type="Transform2D" setter="set_variation_transform" getter="get_variation_transform" default="Transform2D(1, 0, 0, 1, 0, 0)">
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="Particle systems (3D)">$DOCS_URL/tutorials/3d/particles/index.html</link>
|
||||
|
@ -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.
|
||||
</member>
|
||||
<member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false">
|
||||
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.
|
||||
</member>
|
||||
<member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0">
|
||||
Amount of time to preprocess the particles before animation starts. Lets you start the animation some time after particles have started emitting.
|
||||
|
|
|
@ -235,9 +235,9 @@
|
|||
<members>
|
||||
<member name="accept_gzip" type="bool" setter="set_accept_gzip" getter="is_accepting_gzip" default="true">
|
||||
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].
|
||||
</member>
|
||||
<member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit" default="-1">
|
||||
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.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
|
@ -233,7 +233,7 @@
|
|||
<return type="int" />
|
||||
<param index="0" name="mipmap" type="int" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_pixel" qualifiers="const">
|
||||
|
|
|
@ -23,7 +23,7 @@
|
|||
<param index="1" name="layer" type="int" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
|
|
|
@ -42,7 +42,7 @@
|
|||
<param index="0" name="code" type="String" />
|
||||
<param index="1" name="use_global_execution_context" type="bool" default="false" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
</methods>
|
||||
<members>
|
||||
<member name="bias" type="float" setter="set_bias" getter="get_bias" default="0.0">
|
||||
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.
|
||||
</member>
|
||||
<member name="disable_collision" type="bool" setter="set_exclude_nodes_from_collision" getter="get_exclude_nodes_from_collision" default="true">
|
||||
|
|
|
@ -58,7 +58,7 @@
|
|||
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
|
||||
</member>
|
||||
<member name="lines_skipped" type="int" setter="set_lines_skipped" getter="get_lines_skipped" default="0">
|
||||
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.
|
||||
</member>
|
||||
<member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" default="-1">
|
||||
Limits the lines of text the node shows on screen.
|
||||
|
|
|
@ -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.
|
||||
</member>
|
||||
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
|
||||
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.
|
||||
</member>
|
||||
<member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode" default="0">
|
||||
The style to render the [member texture] of the polyline. Use [enum LineTextureMode] constants.
|
||||
|
|
|
@ -94,7 +94,7 @@
|
|||
Font size of the [LinkButton]'s text.
|
||||
</theme_item>
|
||||
<theme_item name="focus" data_type="style" type="StyleBox">
|
||||
[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.
|
||||
</theme_item>
|
||||
</theme_items>
|
||||
</class>
|
||||
|
|
|
@ -30,16 +30,16 @@
|
|||
</tutorials>
|
||||
<theme_items>
|
||||
<theme_item name="margin_bottom" data_type="constant" type="int" default="0">
|
||||
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.
|
||||
</theme_item>
|
||||
<theme_item name="margin_left" data_type="constant" type="int" default="0">
|
||||
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.
|
||||
</theme_item>
|
||||
<theme_item name="margin_right" data_type="constant" type="int" default="0">
|
||||
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.
|
||||
</theme_item>
|
||||
<theme_item name="margin_top" data_type="constant" type="int" default="0">
|
||||
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.
|
||||
</theme_item>
|
||||
</theme_items>
|
||||
</class>
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
The number of items currently in the list.
|
||||
</member>
|
||||
<member name="switch_on_hover" type="bool" setter="set_switch_on_hover" getter="is_switch_on_hover" default="false">
|
||||
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.
|
||||
</member>
|
||||
<member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" overrides="BaseButton" default="true" />
|
||||
</members>
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
<param index="0" name="faces" type="PackedVector3Array" />
|
||||
<param index="1" name="xform" type="Transform3D" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_mesh">
|
||||
|
@ -22,7 +22,7 @@
|
|||
<param index="0" name="mesh" type="Mesh" />
|
||||
<param index="1" name="xform" type="Transform3D" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="add_mesh_array">
|
||||
|
@ -30,7 +30,7 @@
|
|||
<param index="0" name="mesh_array" type="Array" />
|
||||
<param index="1" name="xform" type="Transform3D" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="clear">
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</tutorials>
|
||||
<members>
|
||||
<member name="map" type="RID" setter="set_map" getter="get_map" default="RID()">
|
||||
The navigation [code]map[/code] [RID] used in the path query.
|
||||
The navigation map [RID] used in the path query.
|
||||
</member>
|
||||
<member name="metadata_flags" type="int" setter="set_metadata_flags" getter="get_metadata_flags" enum="NavigationPathQueryParameters2D.PathMetadataFlags" is_bitfield="true" default="7">
|
||||
Additional information to include with the navigation path.
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
</tutorials>
|
||||
<members>
|
||||
<member name="map" type="RID" setter="set_map" getter="get_map" default="RID()">
|
||||
The navigation [code]map[/code] [RID] used in the path query.
|
||||
The navigation map [RID] used in the path query.
|
||||
</member>
|
||||
<member name="metadata_flags" type="int" setter="set_metadata_flags" getter="get_metadata_flags" enum="NavigationPathQueryParameters3D.PathMetadataFlags" is_bitfield="true" default="7">
|
||||
Additional information to include with the navigation path.
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
Determines if the [NavigationRegion2D] is enabled or disabled.
|
||||
</member>
|
||||
<member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
|
||||
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.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
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.
|
||||
</member>
|
||||
<member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
|
||||
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.
|
||||
</member>
|
||||
<member name="use_edge_connections" type="bool" setter="set_use_edge_connections" getter="get_use_edge_connections" default="true">
|
||||
If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
Determines if the [NavigationRegion3D] is enabled or disabled.
|
||||
</member>
|
||||
<member name="enter_cost" type="float" setter="set_enter_cost" getter="get_enter_cost" default="0.0">
|
||||
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.
|
||||
</member>
|
||||
<member name="navigation_layers" type="int" setter="set_navigation_layers" getter="get_navigation_layers" default="1">
|
||||
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.
|
||||
</member>
|
||||
<member name="travel_cost" type="float" setter="set_travel_cost" getter="get_travel_cost" default="1.0">
|
||||
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.
|
||||
</member>
|
||||
<member name="use_edge_connections" type="bool" setter="set_use_edge_connections" getter="get_use_edge_connections" default="true">
|
||||
If enabled the navigation region will use edge connections to connect with other navigation regions within proximity of the navigation map edge connection margin.
|
||||
|
|
|
@ -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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_shortcut_input" qualifiers="virtual">
|
||||
|
@ -696,7 +696,7 @@
|
|||
<method name="request_ready">
|
||||
<return type="void" />
|
||||
<description>
|
||||
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).
|
||||
</description>
|
||||
</method>
|
||||
<method name="rpc" qualifiers="vararg">
|
||||
|
|
|
@ -257,7 +257,7 @@
|
|||
<description>
|
||||
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.
|
||||
|
|
|
@ -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 @@
|
|||
<param index="0" name="signal" type="StringName" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
<param index="1" name="compression_mode" type="int" default="0" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
|
@ -447,7 +447,7 @@
|
|||
<method name="to_float32_array" qualifiers="const">
|
||||
<return type="PackedFloat32Array" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
|
|
|
@ -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 @@
|
|||
<method name="get_state" qualifiers="const">
|
||||
<return type="SceneState" />
|
||||
<description>
|
||||
Returns the [code]SceneState[/code] representing the scene file contents.
|
||||
Returns the [SceneState] representing the scene file contents.
|
||||
</description>
|
||||
</method>
|
||||
<method name="instantiate" qualifiers="const">
|
||||
|
|
|
@ -57,7 +57,7 @@
|
|||
<members>
|
||||
<member name="encode_buffer_max_size" type="int" setter="set_encode_buffer_max_size" getter="get_encode_buffer_max_size" default="8388608">
|
||||
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].
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
|
@ -152,7 +152,7 @@
|
|||
Unit vector specifying the particles' emission direction.
|
||||
</member>
|
||||
<member name="emission_box_extents" type="Vector3" setter="set_emission_box_extents" getter="get_emission_box_extents">
|
||||
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].
|
||||
</member>
|
||||
<member name="emission_color_texture" type="Texture2D" setter="set_emission_color_texture" getter="get_emission_color_texture">
|
||||
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.
|
||||
</member>
|
||||
<member name="emission_point_count" type="int" setter="set_emission_point_count" getter="get_emission_point_count">
|
||||
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].
|
||||
</member>
|
||||
<member name="emission_point_texture" type="Texture2D" setter="set_emission_point_texture" getter="get_emission_point_texture">
|
||||
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.
|
||||
</member>
|
||||
<member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius">
|
||||
The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE].
|
||||
The sphere's radius if [member emission_shape] is set to [constant EMISSION_SHAPE_SPHERE].
|
||||
</member>
|
||||
<member name="flatness" type="float" setter="set_flatness" getter="get_flatness" default="0.0">
|
||||
Amount of [member spread] along the Y axis.
|
||||
|
|
|
@ -118,7 +118,7 @@
|
|||
<return type="RID" />
|
||||
<param index="0" name="area" type="RID" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="area_get_transform" qualifiers="const">
|
||||
|
@ -486,7 +486,7 @@
|
|||
<return type="RID" />
|
||||
<param index="0" name="body" type="RID" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="body_get_state" qualifiers="const">
|
||||
|
@ -827,7 +827,7 @@
|
|||
<param index="2" name="body_a" type="RID" />
|
||||
<param index="3" name="body_b" type="RID" default="RID()" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="joint_set_param">
|
||||
|
@ -918,13 +918,13 @@
|
|||
<param index="1" name="data" type="Variant" />
|
||||
<description>
|
||||
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).
|
||||
</description>
|
||||
|
|
|
@ -582,10 +582,9 @@
|
|||
<param index="1" name="callable" type="Callable" />
|
||||
<param index="2" name="userdata" type="Variant" default="null" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="body_set_max_contacts_reported">
|
||||
|
|
|
@ -152,11 +152,11 @@
|
|||
<members>
|
||||
<member name="d" type="float" setter="" getter="" default="0.0">
|
||||
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.
|
||||
</member>
|
||||
<member name="normal" type="Vector3" setter="" getter="" default="Vector3(0, 0, 0)">
|
||||
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.
|
||||
</member>
|
||||
<member name="x" type="float" setter="" getter="" default="0.0">
|
||||
The X component of the plane's [member normal] vector.
|
||||
|
|
|
@ -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).
|
||||
</member>
|
||||
<member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)">
|
||||
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].
|
||||
</member>
|
||||
<member name="internal_vertex_count" type="int" setter="set_internal_vertex_count" getter="get_internal_vertex_count" default="0">
|
||||
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.
|
||||
</member>
|
||||
<member name="texture" type="Texture2D" setter="set_texture" getter="get_texture">
|
||||
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.
|
||||
</member>
|
||||
<member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2(0, 0)">
|
||||
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.
|
||||
</member>
|
||||
<member name="texture_rotation" type="float" setter="set_texture_rotation" getter="get_texture_rotation" default="0.0">
|
||||
The texture's rotation in radians.
|
||||
</member>
|
||||
<member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" default="Vector2(1, 1)">
|
||||
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.
|
||||
</member>
|
||||
<member name="uv" type="PackedVector2Array" setter="set_uv" getter="get_uv" default="PackedVector2Array()">
|
||||
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].
|
||||
</member>
|
||||
<member name="vertex_colors" type="PackedColorArray" setter="set_vertex_colors" getter="get_vertex_colors" default="PackedColorArray()">
|
||||
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].
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
|
@ -2732,7 +2732,7 @@
|
|||
Specify whether OpenXR should be configured for an HMD or a hand held device.
|
||||
</member>
|
||||
<member name="xr/openxr/foveation_dynamic" type="bool" setter="" getter="" default="false">
|
||||
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].
|
||||
</member>
|
||||
<member name="xr/openxr/foveation_level" type="int" setter="" getter="" default=""0"">
|
||||
Applied foveation level if supported: 0 = off, 1 = low, 2 = medium, 3 = high.
|
||||
|
|
|
@ -191,7 +191,7 @@
|
|||
<param index="6" name="post_b_t" type="float" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -6,9 +6,9 @@
|
|||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
<link title="BBCode in RichTextLabel">$DOCS_URL/tutorials/ui/bbcode_in_richtextlabel.html</link>
|
||||
|
@ -289,32 +289,32 @@
|
|||
<return type="void" />
|
||||
<param index="0" name="bgcolor" type="Color" />
|
||||
<description>
|
||||
Adds a [code][bgcolor][/code] tag to the tag stack.
|
||||
Adds a [code skip-lint][bgcolor][/code] tag to the tag stack.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_bold">
|
||||
<return type="void" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_bold_italics">
|
||||
<return type="void" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_cell">
|
||||
<return type="void" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_color">
|
||||
<return type="void" />
|
||||
<param index="0" name="color" type="Color" />
|
||||
<description>
|
||||
Adds a [code][color][/code] tag to the tag stack.
|
||||
Adds a [code skip-lint][color][/code] tag to the tag stack.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_context">
|
||||
|
@ -341,14 +341,14 @@
|
|||
<param index="5" name="outline_size" type="int" default="0" />
|
||||
<param index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_fgcolor">
|
||||
<return type="void" />
|
||||
<param index="0" name="fgcolor" type="Color" />
|
||||
<description>
|
||||
Adds a [code][fgcolor][/code] tag to the tag stack.
|
||||
Adds a [code skip-lint][fgcolor][/code] tag to the tag stack.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_font">
|
||||
|
@ -356,7 +356,7 @@
|
|||
<param index="0" name="font" type="Font" />
|
||||
<param index="1" name="font_size" type="int" default="0" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
|
@ -364,27 +364,27 @@
|
|||
<return type="void" />
|
||||
<param index="0" name="font_size" type="int" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_hint">
|
||||
<return type="void" />
|
||||
<param index="0" name="description" type="String" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_indent">
|
||||
<return type="void" />
|
||||
<param index="0" name="level" type="int" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_italics">
|
||||
<return type="void" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_language">
|
||||
|
@ -401,40 +401,40 @@
|
|||
<param index="2" name="capitalize" type="bool" />
|
||||
<param index="3" name="bullet" type="String" default=""•"" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_meta">
|
||||
<return type="void" />
|
||||
<param index="0" name="data" type="Variant" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_mono">
|
||||
<return type="void" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_normal">
|
||||
<return type="void" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_outline_color">
|
||||
<return type="void" />
|
||||
<param index="0" name="color" type="Color" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_outline_size">
|
||||
<return type="void" />
|
||||
<param index="0" name="outline_size" type="int" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_paragraph">
|
||||
|
@ -446,13 +446,13 @@
|
|||
<param index="4" name="justification_flags" type="int" enum="TextServer.JustificationFlag" is_bitfield="true" default="163" />
|
||||
<param index="5" name="tab_stops" type="PackedFloat32Array" default="PackedFloat32Array()" />
|
||||
<description>
|
||||
Adds a [code][p][/code] tag to the tag stack.
|
||||
Adds a [code skip-lint][p][/code] tag to the tag stack.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_strikethrough">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Adds a [code][s][/code] tag to the tag stack.
|
||||
Adds a [code skip-lint][s][/code] tag to the tag stack.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_table">
|
||||
|
@ -461,13 +461,13 @@
|
|||
<param index="1" name="inline_align" type="int" enum="InlineAlignment" default="0" />
|
||||
<param index="2" name="align_to_row" type="int" default="-1" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="push_underline">
|
||||
<return type="void" />
|
||||
<description>
|
||||
Adds a [code][u][/code] tag to the tag stack.
|
||||
Adds a [code skip-lint][u][/code] tag to the tag stack.
|
||||
</description>
|
||||
</method>
|
||||
<method name="remove_paragraph">
|
||||
|
@ -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].
|
||||
</member>
|
||||
<member name="hint_underlined" type="bool" setter="set_hint_underline" getter="is_hint_underlined" default="true">
|
||||
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].
|
||||
</member>
|
||||
<member name="language" type="String" setter="set_language" getter="get_language" default="""">
|
||||
Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead.
|
||||
</member>
|
||||
<member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true">
|
||||
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].
|
||||
</member>
|
||||
<member name="progress_bar_delay" type="int" setter="set_progress_bar_delay" getter="get_progress_bar_delay" default="1000">
|
||||
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 @@
|
|||
</member>
|
||||
<member name="text" type="String" setter="set_text" getter="get_text" default="""">
|
||||
The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited.
|
||||
[b]Note:[/b] 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.
|
||||
</member>
|
||||
<member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0">
|
||||
Base text writing direction.
|
||||
|
@ -653,7 +653,7 @@
|
|||
<signal name="meta_clicked">
|
||||
<param index="0" name="meta" type="Variant" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="meta_hover_ended">
|
||||
|
@ -800,7 +800,7 @@
|
|||
The default text font size.
|
||||
</theme_item>
|
||||
<theme_item name="focus" data_type="style" type="StyleBox">
|
||||
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.
|
||||
</theme_item>
|
||||
<theme_item name="normal" data_type="style" type="StyleBox">
|
||||
The normal background for the [RichTextLabel].
|
||||
|
|
|
@ -182,7 +182,7 @@
|
|||
</member>
|
||||
<member name="inertia" type="Vector3" setter="set_inertia" getter="get_inertia" default="Vector3(0, 0, 0)">
|
||||
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]
|
||||
|
|
|
@ -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.
|
||||
</theme_item>
|
||||
<theme_item name="grabber_offset" data_type="constant" type="int" default="0">
|
||||
Vertical/horizontal offset of the grabber.
|
||||
Vertical or horizontal offset of the grabber.
|
||||
</theme_item>
|
||||
<theme_item name="grabber" data_type="icon" type="Texture2D">
|
||||
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.
|
||||
</theme_item>
|
||||
<theme_item name="grabber_area" data_type="style" type="StyleBox">
|
||||
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.
|
||||
</theme_item>
|
||||
<theme_item name="grabber_area_highlight" data_type="style" type="StyleBox">
|
||||
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.
|
||||
</theme_item>
|
||||
<theme_item name="slider" data_type="style" type="StyleBox">
|
||||
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].
|
||||
</theme_item>
|
||||
</theme_items>
|
||||
</class>
|
||||
|
|
|
@ -49,13 +49,13 @@
|
|||
Changes the alignment of the underlying [LineEdit].
|
||||
</member>
|
||||
<member name="custom_arrow_step" type="float" setter="set_custom_arrow_step" getter="get_custom_arrow_step" default="0.0">
|
||||
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].
|
||||
</member>
|
||||
<member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true">
|
||||
If [code]true[/code], the [SpinBox] will be editable. Otherwise, it will be read only.
|
||||
</member>
|
||||
<member name="prefix" type="String" setter="set_prefix" getter="get_prefix" default="""">
|
||||
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].
|
||||
</member>
|
||||
<member name="select_all_on_focus" type="bool" setter="set_select_all_on_focus" getter="is_select_all_on_focus" default="false">
|
||||
If [code]true[/code], the [SpinBox] will select the whole text when the [LineEdit] gains focus. Clicking the up and down arrows won't trigger this behavior.
|
||||
|
@ -63,7 +63,7 @@
|
|||
<member name="size_flags_vertical" type="int" setter="set_v_size_flags" getter="get_v_size_flags" overrides="Control" enum="Control.SizeFlags" is_bitfield="true" default="1" />
|
||||
<member name="step" type="float" setter="set_step" getter="get_step" overrides="Range" default="1.0" />
|
||||
<member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default="""">
|
||||
Adds the specified [code]suffix[/code] string after the numerical value of the [SpinBox].
|
||||
Adds the specified suffix string after the numerical value of the [SpinBox].
|
||||
</member>
|
||||
<member name="update_on_text_changed" type="bool" setter="set_update_on_text_changed" getter="get_update_on_text_changed" default="false">
|
||||
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].
|
||||
|
|
|
@ -1463,7 +1463,7 @@
|
|||
Sets a custom [Texture2D] for tab text characters.
|
||||
</theme_item>
|
||||
<theme_item name="focus" data_type="style" type="StyleBox">
|
||||
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.
|
||||
</theme_item>
|
||||
<theme_item name="normal" data_type="style" type="StyleBox">
|
||||
Sets the [StyleBox] of this [TextEdit].
|
||||
|
|
|
@ -194,7 +194,7 @@
|
|||
<param index="1" name="size" type="int" />
|
||||
<param index="2" name="index" type="int" />
|
||||
<description>
|
||||
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.
|
||||
|
@ -382,7 +382,7 @@
|
|||
<return type="Vector2i[]" />
|
||||
<param index="0" name="font_rid" type="RID" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="font_get_spacing" qualifiers="const">
|
||||
|
@ -1998,8 +1998,7 @@
|
|||
BiDi override for email.
|
||||
</constant>
|
||||
<constant name="STRUCTURED_TEXT_LIST" value="4" enum="StructuredTextParser">
|
||||
BiDi override for lists.
|
||||
Structured text options: list separator [code]String[/code].
|
||||
BiDi override for lists. Structured text options: list separator [String].
|
||||
</constant>
|
||||
<constant name="STRUCTURED_TEXT_GDSCRIPT" value="5" enum="StructuredTextParser">
|
||||
BiDi override for GDScript.
|
||||
|
|
|
@ -71,13 +71,13 @@
|
|||
[Texture2D] that draws under the progress bar. The bar's background.
|
||||
</member>
|
||||
<member name="tint_over" type="Color" setter="set_tint_over" getter="get_tint_over" default="Color(1, 1, 1, 1)">
|
||||
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.
|
||||
</member>
|
||||
<member name="tint_progress" type="Color" setter="set_tint_progress" getter="get_tint_progress" default="Color(1, 1, 1, 1)">
|
||||
Multiplies the color of the bar's [code]texture_progress[/code] texture.
|
||||
Multiplies the color of the bar's [member texture_progress] texture.
|
||||
</member>
|
||||
<member name="tint_under" type="Color" setter="set_tint_under" getter="get_tint_under" default="Color(1, 1, 1, 1)">
|
||||
Multiplies the color of the bar's [code]texture_under[/code] texture.
|
||||
Multiplies the color of the bar's [member texture_under] texture.
|
||||
</member>
|
||||
</members>
|
||||
<constants>
|
||||
|
|
|
@ -168,7 +168,7 @@
|
|||
<method name="get_next_source_id" qualifiers="const">
|
||||
<return type="int" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_occlusion_layer_light_mask" qualifiers="const">
|
||||
|
|
|
@ -39,7 +39,7 @@
|
|||
<method name="get_atlas_grid_size" qualifiers="const">
|
||||
<return type="Vector2i" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_next_alternative_tile_id" qualifiers="const">
|
||||
|
|
|
@ -48,8 +48,8 @@
|
|||
<param index="0" name="datetime" type="String" />
|
||||
<param index="1" name="weekday" type="bool" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
|
|
|
@ -133,7 +133,7 @@
|
|||
<return type="bool" />
|
||||
<param index="0" name="xform" type="Transform2D" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_finite" qualifiers="const">
|
||||
|
|
|
@ -80,7 +80,7 @@
|
|||
<return type="bool" />
|
||||
<param index="0" name="xform" type="Transform3D" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="is_finite" qualifiers="const">
|
||||
|
|
|
@ -458,7 +458,7 @@
|
|||
<param index="1" name="column" type="int" />
|
||||
<param index="2" name="selected" type="bool" />
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
</signal>
|
||||
<signal name="nothing_selected">
|
||||
|
|
|
@ -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]
|
||||
|
|
|
@ -157,7 +157,7 @@
|
|||
<param index="6" name="post_b_t" type="float" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="direction_to" qualifiers="const">
|
||||
|
|
|
@ -131,7 +131,7 @@
|
|||
<param index="6" name="post_b_t" type="float" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="direction_to" qualifiers="const">
|
||||
|
|
|
@ -85,7 +85,7 @@
|
|||
<param index="6" name="post_b_t" type="float" />
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
</method>
|
||||
<method name="direction_to" qualifiers="const">
|
||||
|
|
|
@ -67,28 +67,28 @@
|
|||
</members>
|
||||
<constants>
|
||||
<constant name="PORT_TYPE_SCALAR" value="0" enum="PortType">
|
||||
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.
|
||||
</constant>
|
||||
<constant name="PORT_TYPE_SCALAR_INT" value="1" enum="PortType">
|
||||
Integer scalar. Translated to [code]int[/code] type in shader code.
|
||||
Integer scalar. Translated to [code skip-lint]int[/code] type in shader code.
|
||||
</constant>
|
||||
<constant name="PORT_TYPE_SCALAR_UINT" value="2" enum="PortType">
|
||||
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.
|
||||
</constant>
|
||||
<constant name="PORT_TYPE_VECTOR_2D" value="3" enum="PortType">
|
||||
2D vector of floating-point values. Translated to [code]vec2[/code] type in shader code.
|
||||
2D vector of floating-point values. Translated to [code skip-lint]vec2[/code] type in shader code.
|
||||
</constant>
|
||||
<constant name="PORT_TYPE_VECTOR_3D" value="4" enum="PortType">
|
||||
3D vector of floating-point values. Translated to [code]vec3[/code] type in shader code.
|
||||
3D vector of floating-point values. Translated to [code skip-lint]vec3[/code] type in shader code.
|
||||
</constant>
|
||||
<constant name="PORT_TYPE_VECTOR_4D" value="5" enum="PortType">
|
||||
4D vector of floating-point values. Translated to [code]vec4[/code] type in shader code.
|
||||
4D vector of floating-point values. Translated to [code skip-lint]vec4[/code] type in shader code.
|
||||
</constant>
|
||||
<constant name="PORT_TYPE_BOOLEAN" value="6" enum="PortType">
|
||||
Boolean type. Translated to [code]bool[/code] type in shader code.
|
||||
Boolean type. Translated to [code skip-lint]bool[/code] type in shader code.
|
||||
</constant>
|
||||
<constant name="PORT_TYPE_TRANSFORM" value="7" enum="PortType">
|
||||
Transform type. Translated to [code]mat4[/code] type in shader code.
|
||||
Transform type. Translated to [code skip-lint]mat4[/code] type in shader code.
|
||||
</constant>
|
||||
<constant name="PORT_TYPE_SAMPLER" value="8" enum="PortType">
|
||||
Sampler type. Translated to reference of sampler uniform in shader code. Can only be used for input ports in non-uniform nodes.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
A scalar floating-point constant to be used within the visual shader graph.
|
||||
</brief_description>
|
||||
<description>
|
||||
Translated to [code]float[/code] in the shader language.
|
||||
Translated to [code skip-lint]float[/code] in the shader language.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
A scalar integer constant to be used within the visual shader graph.
|
||||
</brief_description>
|
||||
<description>
|
||||
Translated to [code]int[/code] in the shader language.
|
||||
Translated to [code skip-lint]int[/code] in the shader language.
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
A selector function for use within the visual shader graph.
|
||||
</brief_description>
|
||||
<description>
|
||||
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].
|
||||
</description>
|
||||
<tutorials>
|
||||
</tutorials>
|
||||
|
|
|
@ -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.
|
||||
</member>
|
||||
<member name="normal" type="Vector2" setter="set_normal" getter="get_normal" default="Vector2(0, -1)">
|
||||
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].
|
||||
</member>
|
||||
</members>
|
||||
</class>
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
</brief_description>
|
||||
<description>
|
||||
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.
|
||||
</description>
|
||||
<tutorials>
|
||||
|
|
|
@ -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}<class_{class_param}{ref_type}_{method_param}>`"
|
||||
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}<class_{target_class_name}{ref_type}_{target_name}>`"
|
||||
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:
|
||||
|
|
|
@ -217,6 +217,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;
|
||||
|
@ -411,8 +417,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");
|
||||
|
||||
|
@ -583,7 +591,7 @@ Error EditorHelp::_goto_desc(const String &p_class) {
|
|||
return OK;
|
||||
}
|
||||
|
||||
void EditorHelp::_update_method_list(const Vector<DocData::MethodDoc> p_methods) {
|
||||
void EditorHelp::_update_method_list(const Vector<DocData::MethodDoc> p_methods, MethodType p_method_type) {
|
||||
class_desc->add_newline();
|
||||
|
||||
_push_code_font();
|
||||
|
@ -629,7 +637,8 @@ void EditorHelp::_update_method_list(const Vector<DocData::MethodDoc> 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();
|
||||
|
@ -661,7 +670,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();
|
||||
|
@ -1152,7 +1162,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()) {
|
||||
|
@ -1165,7 +1175,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()) {
|
||||
|
@ -1178,7 +1188,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
|
||||
|
@ -1992,10 +2002,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)");
|
||||
|
@ -2009,10 +2019,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)");
|
||||
|
@ -2026,8 +2036,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]");
|
||||
|
@ -2042,6 +2052,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<String> tag_stack;
|
||||
|
@ -2115,7 +2126,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(" ");
|
||||
|
@ -2126,7 +2137,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;
|
||||
|
@ -2197,7 +2208,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);
|
||||
|
@ -2206,8 +2217,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.
|
||||
|
@ -2222,7 +2233,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);
|
||||
|
|
|
@ -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<DocData::MethodDoc> p_methods);
|
||||
void _update_method_list(const Vector<DocData::MethodDoc> p_methods, MethodType p_method_type);
|
||||
void _update_method_descriptions(const DocData::ClassDoc p_classdoc, const Vector<DocData::MethodDoc> p_methods, MethodType p_method_type);
|
||||
void _update_doc();
|
||||
|
||||
|
|
|
@ -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).
|
||||
</description>
|
||||
</annotation>
|
||||
<annotation name="@onready">
|
||||
|
@ -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.
|
||||
</description>
|
||||
</annotation>
|
||||
<annotation name="@warning_ignore" qualifiers="vararg">
|
||||
|
|
|
@ -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("<c>");
|
||||
|
||||
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>");
|
||||
|
||||
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("<code>");
|
||||
|
||||
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;
|
||||
|
|
|
@ -66,7 +66,7 @@
|
|||
Array of the additional command line arguments passed to the code signing tool.
|
||||
</member>
|
||||
<member name="codesign/entitlements/address_book" type="bool" setter="" getter="">
|
||||
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].
|
||||
</member>
|
||||
<member name="codesign/entitlements/allow_dyld_environment_variables" type="bool" setter="" getter="">
|
||||
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].
|
||||
</member>
|
||||
<member name="codesign/entitlements/audio_input" type="bool" setter="" getter="">
|
||||
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].
|
||||
</member>
|
||||
<member name="codesign/entitlements/calendars" type="bool" setter="" getter="">
|
||||
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].
|
||||
</member>
|
||||
<member name="codesign/entitlements/camera" type="bool" setter="" getter="">
|
||||
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].
|
||||
</member>
|
||||
<member name="codesign/entitlements/custom_file" type="String" setter="" getter="">
|
||||
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].
|
||||
</member>
|
||||
<member name="codesign/entitlements/location" type="bool" setter="" getter="">
|
||||
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].
|
||||
</member>
|
||||
<member name="codesign/entitlements/photos_library" type="bool" setter="" getter="">
|
||||
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].
|
||||
</member>
|
||||
<member name="codesign/identity" type="String" setter="" getter="">
|
||||
The "Full Name", "Common Name" or SHA-1 hash of the signing identity used to sign [code].app[/code] bundle.
|
||||
|
|
Loading…
Reference in New Issue