diff options
-rw-r--r-- | doc/base/classes.xml | 86 | ||||
-rw-r--r-- | doc/tools/makerst.py | 6 |
2 files changed, 48 insertions, 44 deletions
diff --git a/doc/base/classes.xml b/doc/base/classes.xml index d24abe7c38..c59ed36c7d 100644 --- a/doc/base/classes.xml +++ b/doc/base/classes.xml @@ -1407,7 +1407,7 @@ <constant name="JOY_ANALOG_R2" value="7"> </constant> <constant name="OK" value="0"> - Functions that return [Error] return OK when everything went ok. Most functions don't return error anyway and/or just print errors to stdout. + Functions that return Error return OK when everything went ok. Most functions don't return error anyway and/or just print errors to stdout. </constant> <constant name="FAILED" value="1"> Generic fail return error. @@ -1973,7 +1973,7 @@ <return type="bool"> </return> <description> - Return true when centered. See [set_centered]. + Return true when centered. See [method set_centered]. </description> </method> <method name="set_offset"> @@ -2101,7 +2101,8 @@ Contains data used to animate everything in the engine. </brief_description> <description> - An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. [br] Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back. + An Animation resource contains data used to animate everything in the engine. Animations are divided into tracks, and each track must be linked to a node. The state of that node can be changed through time, by adding timed keys (events) to the track. + Animations are just data containers, and must be added to odes such as an [AnimationPlayer] or [AnimationTreePlayer] to be played back. </description> <methods> <method name="add_track"> @@ -2678,7 +2679,7 @@ <return type="NodePath"> </return> <description> - Return path to root node (see [set_root]). + Return path to root node (see [method set_root]). </description> </method> <method name="seek"> @@ -5634,7 +5635,7 @@ Group of Buttons. </brief_description> <description> - Group of [Button]s. All direct and indirect children buttons become radios. Only one allows being pressed. + Group of [Button]. All direct and indirect children buttons become radios. Only one allows being pressed. </description> <methods> <method name="get_pressed_button" qualifiers="const"> @@ -6174,7 +6175,7 @@ <return type="bool"> </return> <description> - Return if set as toplevel. See [method set_as_toplevel]/ + Return if set as toplevel. See [method set_as_toplevel]. </description> </method> <method name="set_blend_mode"> @@ -7381,7 +7382,7 @@ </return> <description> Return the index of the first shape generated by the editor. - When [code]build_mode[/code] is set to generate convex polygons, the shape shown in the editor may be decomopsed into many convex polygons. In that case, a range of indexes is needed to directly access the [Shape2D]s. + When [code]build_mode[/code] is set to generate convex polygons, the shape shown in the editor may be decomopsed into many convex polygons. In that case, a range of indexes is needed to directly access the [Shape2D]. When [code]build_mode[/code] is set to generate concave polygons, there is only one [Shape2D] generated, so the start index and the end index are the same. </description> </method> @@ -8163,7 +8164,7 @@ Control is the base class Node for all the GUI components. Every GUI component inherits from it, directly or indirectly. In this way, sections of the scene tree made of contiguous control nodes, become user interfaces. Controls are relative to the parent position and size by using anchors and margins. This ensures that they can adapt easily in most situation to changing dialog and screen sizes. When more flexibility is desired, [Container] derived nodes can be used. Anchors work by defining which margin do they follow, and a value relative to it. Allowed anchoring modes are ANCHOR_BEGIN, where the margin is relative to the top or left margins of the parent (in pixels), ANCHOR_END for the right and bottom margins of the parent and ANCHOR_RATIO, which is a ratio from 0 to 1 in the parent range. - Input device events ([InputEvent]) are first sent to the root controls via the [method Node._input], which distribute it through the tree, then delivers them to the adequate one (under cursor or keyboard focus based) by calling [Node._input_event]. There is no need to enable input processing on controls to receive such events. To ensure that no one else will receive the event (not even [method Node._unhandled_input]), the control can accept it by calling [method accept_event]. + Input device events ([InputEvent]) are first sent to the root controls via the [method Node._input], which distribute it through the tree, then delivers them to the adequate one (under cursor or keyboard focus based) by calling [method Node._input_event]. There is no need to enable input processing on controls to receive such events. To ensure that no one else will receive the event (not even [method Node._unhandled_input]), the control can accept it by calling [method accept_event]. Only one control can hold the keyboard focus (receiving keyboard events), for that the control must define the focus mode with [method set_focus_mode]. Focus is lost when another control gains it, or the current focus owner is hidden. It is sometimes desired for a control to ignore mouse/pointer events. This is often the case when placing other controls on top of a button, in such cases. Calling [method set_ignore_mouse] enables this function. Finally, controls are skinned according to a [Theme]. Setting a [Theme] on a control will propagate all the skinning down the tree. Optionally, skinning can be overrided per each control by calling the add_*_override functions, or from the editor. @@ -8389,21 +8390,21 @@ <return type="Rect2"> </return> <description> - Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see [method get_pos],[method get_size]). + Return position and size of the Control, relative to the top-left corner of the parent Control. This is a helper (see [method get_pos], [method get_size]). </description> </method> <method name="get_global_rect" qualifiers="const"> <return type="Rect2"> </return> <description> - Return position and size of the Control, relative to the top-left corner of the [i]window[/i] Control. This is a helper (see [method get_global_pos],[method get_size]). + Return position and size of the Control, relative to the top-left corner of the [i]window[/i] Control. This is a helper (see [method get_global_pos], [method get_size]). </description> </method> <method name="set_area_as_parent_rect"> <argument index="0" name="margin" type="int" default="0"> </argument> <description> - Change all margins and anchors, so this Control always takes up the same area as the parent Control. This is a helper (see [method set_anchor],[method set_margin]). + Change all margins and anchors, so this Control always takes up the same area as the parent Control. This is a helper (see [method set_anchor], [method set_margin]). </description> </method> <method name="show_modal"> @@ -10374,7 +10375,7 @@ This approximation makes straight segments between each point, then subdivides t <argument index="0" name="db" type="float"> </argument> <description> - Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for overamplifying (see [set_volume]) still apply. + Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for overamplifying (see [method set_volume]) still apply. </description> </method> <method name="get_volume_db" qualifiers="const"> @@ -10439,7 +10440,7 @@ This approximation makes straight segments between each point, then subdivides t <argument index="1" name="channel_volume" type="float"> </argument> <description> - Set the volume scale for an individual channel of the stream, with the same value range as [methid set_volume]. The channel number depends on the stream format. For example, MIDIs range from 0 to 15, and MODs from 0 to 63. + Set the volume scale for an individual channel of the stream, with the same value range as [method set_volume]. The channel number depends on the stream format. For example, MIDIs range from 0 to 15, and MODs from 0 to 63. Many stream formats are multichannel, so this allows to affect only a part of the music. </description> </method> @@ -11988,7 +11989,7 @@ This approximation makes straight segments between each point, then subdivides t </brief_description> <description> GraphEdit manages the showing of GraphNodes it contains, as well as connections an disconnections between them. Signals are sent for each of these two events. Disconnection between GraphNodes slots is disabled by default. - It is greatly advised to enable low processor usage mode [OS.set_low_processor_usage_mode()] when using GraphEdits. + It is greatly advised to enable low processor usage mode (see [method OS.set_low_processor_usage_mode]) when using GraphEdits. </description> <methods> <method name="connect_node"> @@ -17400,22 +17401,22 @@ returns:= "username=user&password=pass" Amount of weights/bone indices per vertex (always 4). </constant> <constant name="ARRAY_VERTEX" value="0"> - Vertex array (array of [Vector3]() vertices). + Vertex array (array of [Vector3] vertices). </constant> <constant name="ARRAY_NORMAL" value="1"> - Normal array (array of [Vector3]() normals). + Normal array (array of [Vector3] normals). </constant> <constant name="ARRAY_TANGENT" value="2"> Tangent array, array of groups of 4 floats. first 3 floats determine the tangent, and the last the binormal direction as -1 or 1. </constant> <constant name="ARRAY_COLOR" value="3"> - Vertex array (array of [Color]() colors). + Vertex array (array of [Color] colors). </constant> <constant name="ARRAY_TEX_UV" value="4"> - UV array (array of [Vector3]() UVs or float array of groups of 2 floats (u,v)). + UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)). </constant> <constant name="ARRAY_TEX_UV2" value="5"> - Second UV array (array of [Vector3]() UVs or float array of groups of 2 floats (u,v)). + Second UV array (array of [Vector3] UVs or float array of groups of 2 floats (u,v)). </constant> <constant name="ARRAY_BONES" value="6"> Array of bone indices, as a float array. Each element in groups of 4 floats. @@ -17933,7 +17934,8 @@ returns:= "username=user&password=pass" </brief_description> <description> MultiMesh provides low level mesh instancing. If the amount of [Mesh] instances needed goes from hundreds to thousands (and most need to be visible at close proximity) creating such a large amount of [MeshInstance] nodes may affect performance by using too much CPU or video memory. - For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead.[br] As a drawback, if the instances are too far away of each other, performance may be reduced as every sigle instance will always rendered (they are spatially indexed as one, for the whole object). + For this case a MultiMesh becomes very useful, as it can draw thousands of instances with little API overhead. + As a drawback, if the instances are too far away of each other, performance may be reduced as every sigle instance will always rendered (they are spatially indexed as one, for the whole object). Since instances may have any behavior, the AABB used for visibility must be provided by the user, or generated with [method generate_aabb]. </description> <methods> @@ -20116,7 +20118,7 @@ returns:= "username=user&password=pass" Base class for all non built-in types. Everything not a built-in type starts the inheritance chain from this class. Objects do not manage memory, if inheriting from one the object will most likely have to be deleted manually (call the [method free] function from the script or delete from C++). Some derivates add memory management, such as [Reference] (which keps a reference count and deletes itself automatically when no longer referenced) and [Node], which deletes the children tree when deleted. - Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [_set]. However, scripting languages and C++ have simper means to export them. + Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simper means to export them. Objects also receive notifications ([method _notification]). Notifications are a simple way to notify the object about simple events, so they can all be handled together. </description> <methods> @@ -20871,7 +20873,7 @@ returns:= "username=user&password=pass" <argument index="0" name="path" type="Node"> </argument> <description> - Pack will ignore any sub-nodes not owned by given node. See [Node.set_owner]. + Pack will ignore any sub-nodes not owned by given node. See [method Node.set_owner]. </description> </method> <method name="instance" qualifiers="const"> @@ -27065,7 +27067,7 @@ This method controls whether the position between two cached points is interpola <return type="Object"> </return> <description> - Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [is_colliding] to check if the object returned is actually colliding with the ray. + Return the closest object the ray is pointing to. Note that this does not consider the length of the vector, so you must also use [method is_colliding] to check if the object returned is actually colliding with the ray. </description> </method> <method name="get_collider_shape" qualifiers="const"> @@ -27727,7 +27729,7 @@ This method controls whether the position between two cached points is interpola <return type="int"> </return> <description> - Poll the load. If OK is returned, this means poll will have to be called again. If ERR_EOF is returned, them the load has finished and the resource can be obtained by calling [get_resource]. + Poll the load. If OK is returned, this means poll will have to be called again. If ERR_EOF is returned, them the load has finished and the resource can be obtained by calling [method get_resource]. </description> </method> <method name="wait"> @@ -27740,14 +27742,14 @@ This method controls whether the position between two cached points is interpola <return type="int"> </return> <description> - Return the load stage. The total amount of stages can be queried with [get_stage_count] + Return the load stage. The total amount of stages can be queried with [method get_stage_count] </description> </method> <method name="get_stage_count" qualifiers="const"> <return type="int"> </return> <description> - Return the total amount of stages (calls to [poll] ) needed to completely load this resource. + Return the total amount of stages (calls to [method poll]) needed to completely load this resource. </description> </method> </methods> @@ -28646,7 +28648,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="linear_velocity" type="Vector2"> </argument> <description> - Set the body linear velocity. Can be used sporadically, but[b] DONT SET THIS IN EVERY FRAME [/b], because physics may be running in another thread and definitely runs at a different granularity. Use [_integrate_forces] as your process loop if you want to have precise control of the body state. + Set the body linear velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state. </description> </method> <method name="get_linear_velocity" qualifiers="const"> @@ -28660,7 +28662,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="angular_velocity" type="float"> </argument> <description> - Set the body angular velocity. Can be used sporadically, but[b] DONT SET THIS IN EVERY FRAME [/b], because physics may be running in another thread and definitely runs at a different granularity. Use [_integrate_forces] as your process loop if you want to have precise control of the body state. + Set the body angular velocity. Can be used sporadically, but [b]DON'T SET THIS IN EVERY FRAME[/b], because physics may be running in another thread and definitely runs at a different granularity. Use [method _integrate_forces] as your process loop if you want to have precise control of the body state. </description> </method> <method name="get_angular_velocity" qualifiers="const"> @@ -28761,7 +28763,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="sleeping" type="bool"> </argument> <description> - Set whether a body is isleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse]/[method set_applied_force] wakes them up. Until then, they behave like a static body. + Set whether a body is sleeping or not. Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body. </description> </method> <method name="is_sleeping" qualifiers="const"> @@ -28776,7 +28778,7 @@ This method controls whether the position between two cached points is interpola </argument> <description> Set the body ability to fall asleep when not moving. This saves an enormous amount of processor time when there are plenty of rigid bodies (non static) in a scene. - Sleeping bodies are not affected by forces until a collision or an [method apply_impulse]/[method set_applied_force] wakes them up. Until then, they behave like a static body. + Sleeping bodies are not affected by forces until a collision or an [method apply_impulse] / [method set_applied_force] wakes them up. Until then, they behave like a static body. </description> </method> <method name="is_able_to_sleep" qualifiers="const"> @@ -29099,7 +29101,7 @@ This method controls whether the position between two cached points is interpola Library that contains a collection of samples. </brief_description> <description> - Library that contains a collection of [Sample]s, each identified by a text ID. This is used as a data container for the majority of the SamplePlayer classes and derivatives. + Library that contains a collection of [Sample], each identified by a text ID. This is used as a data container for the majority of the SamplePlayer classes and derivatives. </description> <methods> <method name="add_sample"> @@ -32745,7 +32747,7 @@ This method controls whether the position between two cached points is interpola <return type="int"> </return> <description> - Return the amount of vertical frames. See [set_vframes]. + Return the amount of vertical frames. See [method set_vframes]. </description> </method> <method name="set_hframes"> @@ -32759,7 +32761,7 @@ This method controls whether the position between two cached points is interpola <return type="int"> </return> <description> - Return the amount of horizontal frames. See [set_hframes]. + Return the amount of horizontal frames. See [method set_hframes]. </description> </method> <method name="set_modulate"> @@ -33227,7 +33229,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="data" type="RawArray"> </argument> <description> - Send a chunk of data through the connection, blocking if necesary until the data is done sending. This function returns an [Error] code. + Send a chunk of data through the connection, blocking if necesary until the data is done sending. This function returns an Error code. </description> </method> <method name="put_partial_data"> @@ -33236,7 +33238,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="data" type="RawArray"> </argument> <description> - Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an [Error] code and an integer, describing how much data was actually sent. + Send a chunk of data through the connection, if all the data could not be sent at once, only part of it will. This function returns two values, an Error code and an integer, describing how much data was actually sent. </description> </method> <method name="get_data"> @@ -33245,7 +33247,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="bytes" type="int"> </argument> <description> - Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [Error] code and a data array. + Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an Error code and a data array. </description> </method> <method name="get_partial_data"> @@ -33254,7 +33256,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="bytes" type="int"> </argument> <description> - Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [Error] code, and a data array. + Return a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an Error code, and a data array. </description> </method> <method name="get_available_bytes" qualifiers="const"> @@ -33626,7 +33628,7 @@ This method controls whether the position between two cached points is interpola <argument index="0" name="db" type="float"> </argument> <description> - Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for overamplifying (see [set_volume]) still apply. + Set the playback volume for this player, in decibels. This is a float between -80.0 (silent) and 0.0 (full volume). Values under -79.0 get truncated to -80, but values over 0.0 do not, so the warnings for overamplifying (see [method set_volume]) still apply. </description> </method> <method name="get_volume_db" qualifiers="const"> @@ -34076,7 +34078,7 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="allow_empty" type="bool" default="True"> </argument> <description> - Split the string by a divisor string, return an array of the substrings. Example "One,Two,Three" will return ["One","Two","Three"] if split by ",". + Split the string by a divisor string, return an array of the substrings. Example "One,Two,Three" will return \["One","Two","Three"\] if split by ",". </description> </method> <method name="split_floats"> @@ -34087,7 +34089,7 @@ This method controls whether the position between two cached points is interpola <argument index="1" name="allow_empty" type="bool" default="True"> </argument> <description> - Split the string in floats by using a divisor string, return an array of the substrings. Example "1,2.5,3" will return [1,2.5,3] if split by ",". + Split the string in floats by using a divisor string, return an array of the substrings. Example "1,2.5,3" will return \[1,2.5,3\] if split by ",". </description> </method> <method name="strip_edges"> @@ -34407,7 +34409,7 @@ This method controls whether the position between two cached points is interpola <return type="Image"> </return> <description> - Return the image used for mask testing. (see [method set_imag]). + Return the image used for mask testing. (see [method set_image]). </description> </method> <method name="set_expand"> @@ -35342,7 +35344,7 @@ This method controls whether the position between two cached points is interpola Texture for 2D and 3D. </brief_description> <description> - A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control]s. + A texture works by registering an image in the video hardware, which then can be used in 3D models or 2D [Sprite] or GUI [Control]. </description> <methods> <method name="get_width" qualifiers="const"> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 5cd99a797f..a31b7134f1 100644 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -130,7 +130,7 @@ def rstize_text(text,cclass): pos = text.find('_', pos) if pos == -1: break - if text[pos + 1] == ' ' or text[pos + 1] == '\\': + if not text[pos + 1].isalnum(): # don't escape within a snake_case word text = text[:pos] + "\_" + text[pos + 1:] pos += 2 else: @@ -159,7 +159,7 @@ def rstize_text(text,cclass): if cmd.find('html') == 0: cmd = tag_text[:space_pos] param = tag_text[space_pos + 1:] - tag_text = param + tag_text = param elif cmd.find('method') == 0: cmd = tag_text[:space_pos] param = tag_text[space_pos + 1:] @@ -191,6 +191,8 @@ def rstize_text(text,cclass): tag_text = '**' elif cmd == 'u' or cmd == '/u': tag_text = '' + elif cmd == 'code' or cmd == '/code': + tag_text = '``' else: tag_text = ':ref:`' + tag_text + '<class_'+tag_text.lower()+'>`' |