Backport fixes to documentation for paths, curves and navigation servers

This commit is contained in:
Yuri Sizov 2022-08-19 15:41:59 +03:00
parent dff0e76910
commit 39f46613bb
9 changed files with 26 additions and 26 deletions

View File

@ -15,10 +15,10 @@
<argument index="0" name="position" type="Vector2" /> <argument index="0" name="position" type="Vector2" />
<argument index="1" name="in" type="Vector2" default="Vector2( 0, 0 )" /> <argument index="1" name="in" type="Vector2" default="Vector2( 0, 0 )" />
<argument index="2" name="out" type="Vector2" default="Vector2( 0, 0 )" /> <argument index="2" name="out" type="Vector2" default="Vector2( 0, 0 )" />
<argument index="3" name="at_position" type="int" default="-1" /> <argument index="3" name="index" type="int" default="-1" />
<description> <description>
Adds a point to a curve at [code]position[/code] relative to the [Curve2D]'s position, with control points [code]in[/code] and [code]out[/code]. Adds a point with the specified [code]position[/code] relative to the curve's own position, with control points [code]in[/code] and [code]out[/code]. Appends the new point at the end of the point list.
If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position &lt;0[/code] or [code]at_position &gt;= [method get_point_count][/code]), the point will be appended at the end of the point list. If [code]index[/code] is given, the new point is inserted before the existing point identified by index [code]index[/code]. Every existing point starting from [code]index[/code] is shifted further down the list of points. The index must be greater than or equal to [code]0[/code] and must not exceed the number of existing points in the line. See [method get_point_count].
</description> </description>
</method> </method>
<method name="clear_points"> <method name="clear_points">

View File

@ -15,10 +15,10 @@
<argument index="0" name="position" type="Vector3" /> <argument index="0" name="position" type="Vector3" />
<argument index="1" name="in" type="Vector3" default="Vector3( 0, 0, 0 )" /> <argument index="1" name="in" type="Vector3" default="Vector3( 0, 0, 0 )" />
<argument index="2" name="out" type="Vector3" default="Vector3( 0, 0, 0 )" /> <argument index="2" name="out" type="Vector3" default="Vector3( 0, 0, 0 )" />
<argument index="3" name="at_position" type="int" default="-1" /> <argument index="3" name="index" type="int" default="-1" />
<description> <description>
Adds a point to a curve at [code]position[/code] relative to the [Curve3D]'s position, with control points [code]in[/code] and [code]out[/code]. Adds a point with the specified [code]position[/code] relative to the curve's own position, with control points [code]in[/code] and [code]out[/code]. Appends the new point at the end of the point list.
If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position &lt;0[/code] or [code]at_position &gt;= [method get_point_count][/code]), the point will be appended at the end of the point list. If [code]index[/code] is given, the new point is inserted before the existing point identified by index [code]index[/code]. Every existing point starting from [code]index[/code] is shifted further down the list of points. The index must be greater than or equal to [code]0[/code] and must not exceed the number of existing points in the line. See [method get_point_count].
</description> </description>
</method> </method>
<method name="clear_points"> <method name="clear_points">

View File

@ -15,10 +15,10 @@
<method name="add_point"> <method name="add_point">
<return type="void" /> <return type="void" />
<argument index="0" name="position" type="Vector2" /> <argument index="0" name="position" type="Vector2" />
<argument index="1" name="at_position" type="int" default="-1" /> <argument index="1" name="index" type="int" default="-1" />
<description> <description>
Adds a point at the [code]position[/code]. Appends the point at the end of the line. Adds a point with the specified [code]position[/code] relative to the line's own position. Appends the new point at the end of the point list.
If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position &lt; 0[/code] or [code]at_position &gt;= [method get_point_count][/code]), the point will be appended at the end of the point list. If [code]index[/code] is given, the new point is inserted before the existing point identified by index [code]index[/code]. Every existing point starting from [code]index[/code] is shifted further down the list of points. The index must be greater than or equal to [code]0[/code] and must not exceed the number of existing points in the line. See [method get_point_count].
</description> </description>
</method> </method>
<method name="clear_points"> <method name="clear_points">
@ -30,29 +30,29 @@
<method name="get_point_count" qualifiers="const"> <method name="get_point_count" qualifiers="const">
<return type="int" /> <return type="int" />
<description> <description>
Returns the Line2D's amount of points. Returns the amount of points in the line.
</description> </description>
</method> </method>
<method name="get_point_position" qualifiers="const"> <method name="get_point_position" qualifiers="const">
<return type="Vector2" /> <return type="Vector2" />
<argument index="0" name="i" type="int" /> <argument index="0" name="index" type="int" />
<description> <description>
Returns point [code]i[/code]'s position. Returns the position of the point at index [code]index[/code].
</description> </description>
</method> </method>
<method name="remove_point"> <method name="remove_point">
<return type="void" /> <return type="void" />
<argument index="0" name="i" type="int" /> <argument index="0" name="index" type="int" />
<description> <description>
Removes the point at index [code]i[/code] from the line. Removes the point at index [code]index[/code] from the line.
</description> </description>
</method> </method>
<method name="set_point_position"> <method name="set_point_position">
<return type="void" /> <return type="void" />
<argument index="0" name="i" type="int" /> <argument index="0" name="index" type="int" />
<argument index="1" name="position" type="Vector2" /> <argument index="1" name="position" type="Vector2" />
<description> <description>
Overwrites the position in point [code]i[/code] with the supplied [code]position[/code]. Overwrites the position of the point at index [code]index[/code] with the supplied [code]position[/code].
</description> </description>
</method> </method>
</methods> </methods>

View File

@ -214,7 +214,7 @@
</method> </method>
<method name="map_is_active" qualifiers="const"> <method name="map_is_active" qualifiers="const">
<return type="bool" /> <return type="bool" />
<argument index="0" name="nap" type="RID" /> <argument index="0" name="map" type="RID" />
<description> <description>
Returns [code]true[/code] if the map is active. Returns [code]true[/code] if the map is active.
</description> </description>

View File

@ -238,7 +238,7 @@
</method> </method>
<method name="map_is_active" qualifiers="const"> <method name="map_is_active" qualifiers="const">
<return type="bool" /> <return type="bool" />
<argument index="0" name="nap" type="RID" /> <argument index="0" name="map" type="RID" />
<description> <description>
Returns [code]true[/code] if the map is active. Returns [code]true[/code] if the map is active.
</description> </description>

View File

@ -355,13 +355,13 @@ void Line2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("set_points", "points"), &Line2D::set_points); ClassDB::bind_method(D_METHOD("set_points", "points"), &Line2D::set_points);
ClassDB::bind_method(D_METHOD("get_points"), &Line2D::get_points); ClassDB::bind_method(D_METHOD("get_points"), &Line2D::get_points);
ClassDB::bind_method(D_METHOD("set_point_position", "i", "position"), &Line2D::set_point_position); ClassDB::bind_method(D_METHOD("set_point_position", "index", "position"), &Line2D::set_point_position);
ClassDB::bind_method(D_METHOD("get_point_position", "i"), &Line2D::get_point_position); ClassDB::bind_method(D_METHOD("get_point_position", "index"), &Line2D::get_point_position);
ClassDB::bind_method(D_METHOD("get_point_count"), &Line2D::get_point_count); ClassDB::bind_method(D_METHOD("get_point_count"), &Line2D::get_point_count);
ClassDB::bind_method(D_METHOD("add_point", "position", "at_position"), &Line2D::add_point, DEFVAL(-1)); ClassDB::bind_method(D_METHOD("add_point", "position", "index"), &Line2D::add_point, DEFVAL(-1));
ClassDB::bind_method(D_METHOD("remove_point", "i"), &Line2D::remove_point); ClassDB::bind_method(D_METHOD("remove_point", "index"), &Line2D::remove_point);
ClassDB::bind_method(D_METHOD("clear_points"), &Line2D::clear_points); ClassDB::bind_method(D_METHOD("clear_points"), &Line2D::clear_points);

View File

@ -962,7 +962,7 @@ PoolVector2Array Curve2D::tessellate(int p_max_stages, float p_tolerance) const
void Curve2D::_bind_methods() { void Curve2D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_point_count"), &Curve2D::get_point_count); ClassDB::bind_method(D_METHOD("get_point_count"), &Curve2D::get_point_count);
ClassDB::bind_method(D_METHOD("add_point", "position", "in", "out", "at_position"), &Curve2D::add_point, DEFVAL(Vector2()), DEFVAL(Vector2()), DEFVAL(-1)); ClassDB::bind_method(D_METHOD("add_point", "position", "in", "out", "index"), &Curve2D::add_point, DEFVAL(Vector2()), DEFVAL(Vector2()), DEFVAL(-1));
ClassDB::bind_method(D_METHOD("set_point_position", "idx", "position"), &Curve2D::set_point_position); ClassDB::bind_method(D_METHOD("set_point_position", "idx", "position"), &Curve2D::set_point_position);
ClassDB::bind_method(D_METHOD("get_point_position", "idx"), &Curve2D::get_point_position); ClassDB::bind_method(D_METHOD("get_point_position", "idx"), &Curve2D::get_point_position);
ClassDB::bind_method(D_METHOD("set_point_in", "idx", "position"), &Curve2D::set_point_in); ClassDB::bind_method(D_METHOD("set_point_in", "idx", "position"), &Curve2D::set_point_in);
@ -1626,7 +1626,7 @@ PoolVector3Array Curve3D::tessellate(int p_max_stages, float p_tolerance) const
void Curve3D::_bind_methods() { void Curve3D::_bind_methods() {
ClassDB::bind_method(D_METHOD("get_point_count"), &Curve3D::get_point_count); ClassDB::bind_method(D_METHOD("get_point_count"), &Curve3D::get_point_count);
ClassDB::bind_method(D_METHOD("add_point", "position", "in", "out", "at_position"), &Curve3D::add_point, DEFVAL(Vector3()), DEFVAL(Vector3()), DEFVAL(-1)); ClassDB::bind_method(D_METHOD("add_point", "position", "in", "out", "index"), &Curve3D::add_point, DEFVAL(Vector3()), DEFVAL(Vector3()), DEFVAL(-1));
ClassDB::bind_method(D_METHOD("set_point_position", "idx", "position"), &Curve3D::set_point_position); ClassDB::bind_method(D_METHOD("set_point_position", "idx", "position"), &Curve3D::set_point_position);
ClassDB::bind_method(D_METHOD("get_point_position", "idx"), &Curve3D::get_point_position); ClassDB::bind_method(D_METHOD("get_point_position", "idx"), &Curve3D::get_point_position);
ClassDB::bind_method(D_METHOD("set_point_tilt", "idx", "tilt"), &Curve3D::set_point_tilt); ClassDB::bind_method(D_METHOD("set_point_tilt", "idx", "tilt"), &Curve3D::set_point_tilt);

View File

@ -175,7 +175,7 @@ void Navigation2DServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("map_create"), &Navigation2DServer::map_create); ClassDB::bind_method(D_METHOD("map_create"), &Navigation2DServer::map_create);
ClassDB::bind_method(D_METHOD("map_set_active", "map", "active"), &Navigation2DServer::map_set_active); ClassDB::bind_method(D_METHOD("map_set_active", "map", "active"), &Navigation2DServer::map_set_active);
ClassDB::bind_method(D_METHOD("map_is_active", "nap"), &Navigation2DServer::map_is_active); ClassDB::bind_method(D_METHOD("map_is_active", "map"), &Navigation2DServer::map_is_active);
ClassDB::bind_method(D_METHOD("map_set_cell_size", "map", "cell_size"), &Navigation2DServer::map_set_cell_size); ClassDB::bind_method(D_METHOD("map_set_cell_size", "map", "cell_size"), &Navigation2DServer::map_set_cell_size);
ClassDB::bind_method(D_METHOD("map_get_cell_size", "map"), &Navigation2DServer::map_get_cell_size); ClassDB::bind_method(D_METHOD("map_get_cell_size", "map"), &Navigation2DServer::map_get_cell_size);
ClassDB::bind_method(D_METHOD("map_set_cell_height", "map", "cell_height"), &Navigation2DServer::map_set_cell_size); ClassDB::bind_method(D_METHOD("map_set_cell_height", "map", "cell_height"), &Navigation2DServer::map_set_cell_size);

View File

@ -37,7 +37,7 @@ void NavigationServer::_bind_methods() {
ClassDB::bind_method(D_METHOD("map_create"), &NavigationServer::map_create); ClassDB::bind_method(D_METHOD("map_create"), &NavigationServer::map_create);
ClassDB::bind_method(D_METHOD("map_set_active", "map", "active"), &NavigationServer::map_set_active); ClassDB::bind_method(D_METHOD("map_set_active", "map", "active"), &NavigationServer::map_set_active);
ClassDB::bind_method(D_METHOD("map_is_active", "nap"), &NavigationServer::map_is_active); ClassDB::bind_method(D_METHOD("map_is_active", "map"), &NavigationServer::map_is_active);
ClassDB::bind_method(D_METHOD("map_set_up", "map", "up"), &NavigationServer::map_set_up); ClassDB::bind_method(D_METHOD("map_set_up", "map", "up"), &NavigationServer::map_set_up);
ClassDB::bind_method(D_METHOD("map_get_up", "map"), &NavigationServer::map_get_up); ClassDB::bind_method(D_METHOD("map_get_up", "map"), &NavigationServer::map_get_up);
ClassDB::bind_method(D_METHOD("map_set_cell_size", "map", "cell_size"), &NavigationServer::map_set_cell_size); ClassDB::bind_method(D_METHOD("map_set_cell_size", "map", "cell_size"), &NavigationServer::map_set_cell_size);